0

Is it possible to get the results or coordinates of the mask detection or the bounding box surrounding the image? I am using Mask R-CNN from matterport and the visualization of the masks on the image works quite good, but I woukd like to save the coordinates.

st0412
  • 49
  • 4

1 Answers1

0

I am not sure how you are using this model. But when you import their model and use the detect method (which is the straightforward way to use their model), then the coordinates are returned immediately.

See for an explanation of what is returned from model.detect this documentation.

In short, per image you get a dict and your coordinates will be the_dict["rois"][1].

Michel Kok
  • 354
  • 1
  • 10
  • Thanks. But is it also possible to extract the mask coordinates? I want to extrakt those so that it is possible to pick up the object via a robot gripper. – st0412 Apr 13 '22 at 11:59
  • Of course for that you'd need to know how the actual coordinates translate into the image. E.g., if (0, 0) in your image corresponds with (x, y) in real space, then you can translate that. It is not possible without this. – Michel Kok Apr 14 '22 at 09:00
  • Alright, is there a way to extract the coordinaes with r['masks'] as ist only returns a boolean or do you have to use a different approach? – st0412 Apr 15 '22 at 05:55