1

The computed masks by Mask R-CNN are of fixed size $m \times m$ each. How are they projected back to the image?

orbit
  • 21
  • 2
  • Is this the same question as your previous one [https://ai.stackexchange.com/q/34551/2444](https://ai.stackexchange.com/q/34551/2444)? If not, can you clarify why. If yes, I recommend that you delete one of the two. – nbro Feb 18 '22 at 09:10
  • No it's a different question, about how the masks are back-projected to the input image. – orbit Feb 19 '22 at 06:16

1 Answers1

0

Each computed mask is simply resized to the corresponding computed bounding-box. For example, using OpenCV:

mask = cv2.resize(mask, (bboxW, bboxH), interpolation=cv2.INTER_NEAREST)

Then, after converting it to a binary mask by thresholding it, you can overlay this mask on the input image using the coordinates of the corresponding computed bounding-box.

See here for more details.

Andreas K.
  • 91
  • 5