Closed andreaceruti closed 2 years ago
Hi @andreaceruti
You would have to replace the BoundingBox.py and its contents to something that considers the blobs (your segmented areas).
Functions iou, have_intersection, get_intersection_area, and get_union_areas should look at the blobs instead of the bounding box.
Also, thecoordinates instead of being a tuple of 4 components (x,y,width,height), it should represent the contour.
@rafaelpadilla can you please elaborate on this. I am trying to calculate the metric for my instance segmentation results. It would be really helpful as i have to evaluate fro my master thesis
@bhuvanofc
This code was developed for bounding boxes only. For instance segmentations, the easiest way is to transform the polygons into binary blobs and work with it.
The IOU between ground-truth A and detection B would be (A and B)/(A or B)
. That's why, you need to change the BoundingBox.py
file.
Unfortunately I'm busy with other projects and can't make that for you. But feel free to post here your questions. Maybe someone can help you
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
Hello,
@andreaceruti and @bhuvanofc, did you find any helpful solution??
I am also working on a segmentation task and I am not sure how to calculate mAP between 2 masks (i.e., ground truth and prediction).
It would be helpful if anyone can point out to useful code or give some insights.
How to modify the code in order to get the same metrics but using the instance mask (polygons/RLE) instead of using the bounding boxes for IoU overlap calculation?