-
- with what margin the photo is going to be cropped
-
- minimum wanted area of the cropped photo in pixels (width*height)
-
- minimum wanted width of the cropped photo in pixels
-
- minimum wanted height of the cropped photo in pixels
-
- which classes are wanted among all dataset
-
- margin = 0.12 (%)
- min_area = 16384 (pixels)
- min_width = 96 (pixels)
- min_height = 96 (pixels)
0-) Download the COCO dataset with the annotations json from below link if you do not have them yet:
https://cocodataset.org/#download
git clone https://github.com/senceryucel/coco-cropper
cd coco-cropper
python3 -m pip install -r requirements.txt
python3 src/main.py -h
python3 src/main.py -ij ~/path_to/instances_train2017.json -id ~/path_to/train2017 -o ~/path_to/outputs/ -m 0.12 -ma 16384 -mw 96 -mh 96 -c all