Search code examples
tensorflowimage-segmentationobject-detection-api

Label Images with overlapping objects for Instance Segmentation with Tensorflow Object Detection Api


I used TensorFlow for object detection and now I wanted to try the instance segmentation with an Mask RCNN Model from tensorflow model zoo https://github.com/tensorflow/models/blob/master/research/object_detection/g3doc/detection_model_zoo.md

I prepared the input data: original images, xml file with bounding boxes, png files as mask and created the TfRecords. It's working quite fine but the predictions are not very accurate. The mask contains a lot of the background.

I think this is because objects are overlapping each other in the images.

Is there a way to mask/label the training dataset so that each instance has a different color? (I'm not talking about the inference but about the training itself)

Like in the picture. Of course the white bounding boxes are not in my mask image. I added them to show that some instances are in the bounding box of another instance.

I would really appreciate some hints.


Solution

  • So I tried a few things and came to the conclusion that I need more images to train my model. I have a lot of images with overlapping instance and not many where the instances are clearly seperated. I was hoping that there is a better way to tell the model which pixel belongs to which instance.