tf-faster-rcnn icon indicating copy to clipboard operation
tf-faster-rcnn copied to clipboard

When I use one category to train, I got a wrong result

Open unuan12 opened this issue 5 years ago • 1 comments

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

  1. line 39 cats = self._COCO.loadCats(self._COCO.getCatIds()) to cats = self._COCO.loadCats(self._COCO.getCatIds(catIds=[1]))

  2. line 42 self._class_to_coco_cat_id = dict(list(zip([c['name'] for c in cats], self._COCO.getCatIds()))) to self._class_to_coco_cat_id = dict(list(zip([c['name'] for c in cats], self._COCO.getCatIds(catId=[1]))))

  3. line 75 image_ids = self._COCO.getImgIds() to image_ids = self._COCO.getImgIds(catIds=[1])

  4. line 133 annIds = self._COCO.getAnnIds(imgIds=index, iscrowd=None) to annIds = 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.

image

unuan12 avatar Nov 12 '19 07:11 unuan12

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 !

devendraswamy avatar Jan 28 '20 06:01 devendraswamy