Closed daler-rahimov closed 4 years ago
Hello @daler-rahimov, thank you for your interest in our work! Please visit our Custom Training Tutorial to get started, and see our Google Colab Notebook, Docker Image, and GCP Quickstart Guide for example environments.
If this is a bug report, please provide screenshots and minimum viable code to reproduce your issue, otherwise we can not help you.
@daler-rahimov I don't quite understand what you are asking. You want to train a subset of classes on all of the coco images? Or you want to add classes to the existing coco dataset?
@daler-rahimov I don't quite understand what you are asking. You want to train a subset of classes on all of the coco images? Or you want to add classes to the existing coco dataset?
Just subset of classes. Lets say I want to train only for cars, motorcycles and airplanes nothing else from COCO
@daler-rahimov then 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
@daler-rahimov then 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
Thank a lot for the help. This definitely will make my life much easier
@glenn-jocher Hi Glenn. I want to train my model only on 5 classes with coco dataset. But it's hard to find images and labels of few classes to train in the huge coco dataset. Is there are a way to only train a model on few classes?
@joel5638 as I mentioned earlier in the issue, you can train with updated your labels, or you can train on the full dataset and then display detection on only certain classes.
Hey, I tried applying the "!python3 detect.py --classes 0,3,5" in Google Colab in the Inference section but it's giving me an error. Anyway to solve this?
@Alistar989 argparser list arguments are space-separated as the help shows: https://github.com/ultralytics/yolov3/blob/0f80f2f9054dd06d34c51e73ea1bc5ba808fed18/detect.py#L218
@Alistar989 argparser list arguments are space-separated as the help shows:
https://github.com/ultralytics/yolov3/blob/0f80f2f9054dd06d34c51e73ea1bc5ba808fed18/detect.py#L218
THANK YOU!!! I was stuck on this include/exclude situation for what felt like an eternity.
@Alistar989 You're welcome! I'm glad I could help. If you have any more questions or run into issues, feel free to ask. Happy training! 🚀
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.