Skip to content

Commit

Permalink
docs: update readme [skip-ci]
Browse files Browse the repository at this point in the history
4o3F committed Oct 9, 2024
1 parent 2d14209 commit c0f9592
Showing 2 changed files with 14 additions and 8 deletions.
19 changes: 12 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,14 +1,20 @@
# Image Tools
Some self used batch image process tools
Batch image process tools mainly designed for dataset preprocessing

## Current tools

### Global args

- `thread` The thread pool size for parallel operations

### Common

- `crop-rectangle` Crop a rectangle region of the image
- `normalize` Normalize image to given range
- `map-color` Map one RGB color to another in a given PNG image file
- `map-color-dir` Map one RGB color to another for all PNG images in a given folder
- `map-background-color` Map all the non-valid color in the image to a given color
- `split-images` Split large images to small pieces for augmentation purposes
- `split-images-with-bias` Split large images to small pieces with bias for augmentation purposes
- `split-images-with-bias` Split large images to small pieces for augmentation purposes with bias (Bias is added between each split)
- `split-images-with-filter` Split large images to small pieces with a filter for enough valid pixels
- `class2rgb` Map 8 bit grayscale PNG class image to RGB image
- `rgb2class` Map RGB image to 8 bit grayscale PNG class image
@@ -17,14 +23,13 @@ Some self used batch image process tools
- `split-dataset` Split dataset into train and test sets
- `count-classes` Count class for 8 bit PNG image & Calc class balance weight
- `strip-image-edge` Strip image edges
- `stich-images` Stich the splited images back together
- `calc-mean-std` Calc the mean and std of a dataset for normalization
- `calc-iou` Calc the IoU of two images


### Yolo

- `split-dataset` Split dataset into train and test sets Will store result in TXT file
- `count-types` Count the object number of each type in the dataset
- `rgb2yolo` Convert RGB labels to YOLO TXT format

## TODO
- [x] Fix hole issue (maybe change from imageproc to opencv contour detection)
- `rgb2yolo` Convert RGB labels to YOLO TXT format
3 changes: 2 additions & 1 deletion src/main.rs
Original file line number Diff line number Diff line change
@@ -77,6 +77,7 @@ enum CommonCommands {
dataset_path: String,
},

/// Map all the non-valid color in the image to a given color
MapBackgroundColor {
#[arg(short, long, help = "In R1,G1,B1;R2,G2,B2 format")]
valid_colors: String,
@@ -101,7 +102,7 @@ enum CommonCommands {
},

/// Split large images to small pieces for augmentation purposes with bias
/// Bias is added between each split
/// (Bias is added between each split)
SplitImagesWithBias {
#[arg(short, long, help = "The path for the folder containing images")]
dataset_path: String,

0 comments on commit c0f9592

Please sign in to comment.