js-fan / ICD

Learning Integral Objects with Intra-Class Discriminator for Weakly-Supervised Semantic Segmentation
MIT License
72 stars 3 forks source link

Can you share the code for computing the AP? #3

Open WeitaoVan opened 3 years ago

WeitaoVan commented 3 years ago

Hi, Thanks for the great work! I'm interested in your Figure.5, which is the AP scores of different classes. Can you share the code for computing the AP given the CAM/ICD score maps as input? Or, can you give the detailed formulations? I read your description in the paper but remain a bit confused.

I appreciate your help.

js-fan commented 3 years ago

Hi, the AP is defined the same as those used in object detection tasks. In object detection tasks, you take each predicted bounding box as an individual instance and use the corresponding confidence score to rank them and compute the AP. Here, you just need to take each pixel as an individual instance, and the corresponding ICD/CAM score as the confidence score. For example, N images of size HxW contains NHW pixels in total, and the AP is computed on these NHW pixels.