How can I remove some of the objects from COCO dataset for YOLOv3

1.8k Views Asked by At

I have fallowed Train Custom Data to train my custom model. But there are some classes/objects in COCO dataset that want to include as well. Is there fast way to extract only those classes from the dataset. I'm thinking to write a script to do so but it feels like there should my much faster way to accomplish this.

1

There are 1 best solutions below

0
On

You can either modify the labels, or you can modify the dataloader to filter by class. The dataloader is here:

https://github.com/ultralytics/yolov3/blob/master/utils/datasets.py#L258

The last option is to train on all 80 classes, or just used the pretrained weights, and then run detection only for certain classes:

python3 detect.py --classes 0,3,5

This was answered by Glenn Jocher in GitHub. Original issues link