diff --git a/README.md b/README.md index 000bd21..923105a 100644 --- a/README.md +++ b/README.md @@ -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) \ No newline at end of file +- `rgb2yolo` Convert RGB labels to YOLO TXT format \ No newline at end of file diff --git a/src/main.rs b/src/main.rs index bd962f0..4a0f27e 100644 --- a/src/main.rs +++ b/src/main.rs @@ -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,