Problem
I am trying to train an object detector using one of the existing models in Tensorflow 2’s model zoo.
I want to train the model using the dataset made available by MS COCO, converted into the tfrecord format.
This dataset contains annotations for 90 classes. I do not want to train my model on 90 classes. I am only interested in one class, the ‘person class’.
However, it is not possible to download annotations for just a single class. You must download the annotations for all classes.*
With this in mind - how can I configure my environment so that my model only trains using one of the classes in the dataset? How can i configure the training process so it ignores all the other annotations? I would like it to only try and detect the person class.
This seems like a very common use case and I’ve found numerous people asking this question while debugging but have not seen any definitive answer. It would be great to get this clear for myself and future users.
Additional info:
FiftyOne (python Coco helper API) does allow you to only download images which contain an instance of a specified class, however it will contain additional annotations.
One option could be to write code that modifies the annotation file. However, the file is vast and it risks errors. I would hope that there is a way to configure the pipeline.config or the label map so that it simply ignores annotations not relevant to training
Really been having trouble with this so any help is much appreciated. I’m also new to Tensorflow! Please let me know if you would like any additional info.