davamix/cats-localization

Proposal visualization

Opened this issue · 2 comments

#3 @davamix

After training a proposal based model rpn_R_50_C4_1x, when testing using the modified test.py, values are show.

Now how to visualize the proposals into a predicted.jpg
show exact code

I don't know if Detectron2 has some utility like draw_instance_predictions to draw those boxes but you can use OpenCV to draw the proposals.

The proposals is a Boxes type, so you can iterate over list and use the values (x1, y1, x2, y2) of each row in order to draw a rectangle.

Check this to know how to draw a rectangle.

thanks