1
votes

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.

2
once you have the bounding boxes, if you can go box by box and get the corresponding binary mask (which can be extended to a binary mask of the whole image), and then use a mask rcnn like architecture.IntegrateThis

2 Answers

0
votes

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.

-1
votes

Try to use the DeepLab you will be able to do the segmentation with this tool - https://github.com/tensorflow/models/tree/master/research/deeplab