Training with a subset of coco classes #10866
Unanswered
rehan-kinara
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Is it possible to train for a subset of coco classes without having to re-label the coco dataset. I'll make up an example - lets say I want to train a model with only person and snowboard classes. If I modify the yolov5s.yaml file to set nc: 2, and modify the coco.yaml file to include only the two classes as below, should I expect that the training system will pick up the right two classes from the 80 class coco training set and train using only that?
names:
0: person
31: snowboard
It seems to me that the alternative would be that I create a new coco-small.yaml file with:
names:
0: person
1: snowboard
and then update all the .txt in the datasets/coco/labels/train2017 folder (as well as in test and val folders) to change all label reference of 31 to 1 and remove all other labels. Potentially I might also need to remove all other images and label files which don't contain the desired classes. If possible I would like to avoid that.
Beta Was this translation helpful? Give feedback.
All reactions