tensorflow / models

Models and examples built with TensorFlow
Other
77k stars 45.78k forks source link

HELP! how to draw mask picture with mask.dtype=(15,15) from tensorflow object detection API #9462

Open gehaoyu-cn opened 3 years ago

gehaoyu-cn commented 3 years ago

I downloaded the tensorflow object detection mask rcnn model and make inference successfully. The model has 5 outputs, they are num_detections, detection_classes, detection_scores, detection_boxes, detection_masks. The num_detections, detection_classes, detection_scores, detection_boxes work very well and I got all output result. But detection_masks.dtypr = array(num_detections, 15, 15), the number in it is float and within (0, 1). I don't know hot to use this (15,15) data to draw a mask picture of an object. PLEASE HELP!

zshancock commented 3 years ago

The 15x15 box is a grid of the predicted box. So use your box[0] to plot mask[0] using the dimensions of the box. Hope this helps even though it was asked a month ago 👍