/cocoConverter

coco数据集小工具

Primary LanguagePythonDo What The F*ck You Want To Public LicenseWTFPL

coco convert tools

Need only part of coco dataset for training yolov7.
Wrote these tools for further reference.

Category filter

Pick out some categories from coco dataset.

It runs through labels and picks out categories as command.
(Maybe just one category, but you get the idea)

Usage

python filter.py --labels /path/to/coco/labels/val2017  --out /path/to/coco-filtered/labels/val2017

Dataset split

To use just part of the whole dataset.

It runs through image list and picks randomly.

Usage

40% of coco2017 train

python split.py --txt /path/to/coco/train2017.txt --ratio=0.4 --out /path/to/coco/train2017-0.4.txt