matterport / Mask_RCNN

Mask R-CNN for object detection and instance segmentation on Keras and TensorFlow
Other
24.53k stars 11.68k forks source link

background images generating masks #892

Open rohanricky opened 6 years ago

rohanricky commented 6 years ago

I am using 2 classes to train : background(class_id=0) & object class(class_id=1). My code is similar to balloons.py code. The object gets detected well but the problem is background also generates masks and it gets predicted as class_id=1. I trained the model for ~50 epochs. All the background images which don't have any object generate masks. How can I solve this issue? @waleedka Can this be resolved by training for more epochs/what have I done wrong?

fastlater commented 6 years ago

And your training output variables (loss, bbox, mask)? You need to check if the model was learning something useful. To run for x number of epochs does not mean model will learn for sure.

rohanricky commented 6 years ago

The model is giving sub-par results for image with object. But it is also giving masks & bboxes for images without objects. I can't train with background images only because they get filtered out: In model.py if not np.any(gt_class_ids > 0): continue

windson87 commented 5 years ago

@rohanricky Hi, i have the same issue. I wonder why it doesnt take pure background images to train, coz in many cases, the occurrence rate of instances is not that high to have enough train data. Also in that kind case, isn't it also important to learn images without any instances to avoid false positives, right?

MathiasKahlen commented 4 years ago

@windson87 Did you find any way to train with pure background images? I am having issues with false positives on certain objects in images without any of my desired objects. So it would be nice to be able to train negatives. I'm just not sure how though.

cooleel commented 3 years ago

Any updates on this topics? I saw the same issue, couldn't get rid of these false positive predictions on negative samples.

reedless commented 2 years ago

Been a while but you can check out #1088