tf-faster-rcnn
tf-faster-rcnn copied to clipboard
When I use one category to train, I got a wrong result
I wanna use just one categrty(perosn) from COCO dataset for training a model, The bakebone is vgg16, I change four places in coco.py
-
line 39
cats = self._COCO.loadCats(self._COCO.getCatIds())
tocats = self._COCO.loadCats(self._COCO.getCatIds(catIds=[1]))
-
line 42
self._class_to_coco_cat_id = dict(list(zip([c['name'] for c in cats], self._COCO.getCatIds())))
toself._class_to_coco_cat_id = dict(list(zip([c['name'] for c in cats], self._COCO.getCatIds(catId=[1]))))
-
line 75
image_ids = self._COCO.getImgIds()
toimage_ids = self._COCO.getImgIds(catIds=[1])
-
line 133
annIds = self._COCO.getAnnIds(imgIds=index, iscrowd=None)
toannIds = self._COCO.getAnnIds(imgIds=index, catIds=[1], iscrowd=None)
And then I start to train the model, when I use demp.py
to test the model, I got the result like this. A dog has also detected to the person.
Is there somrthing wrong with my input data? Thank you.
Are you solve this problem ? i am also getting same error . please help me , in my model i am using pascal voc dataset. thanking you !