Submitted by florinandrei t3_11kbuzq in MachineLearning
In December last year, I've completed my MS in Data Science. My capstone project had to do with semantic segmentation of medical ultrasound images (TLDR: cancer detection). I used a transformer model based on SegFormer. After the project was completed, I tried to improve the model performance a bit more.
I was surprised by the IoU performance, which seemed a little too good to be true. I ended up writing my own metrics which calculated IoU, Dice, precision, and recall, among other things. My IoU results, computed with my own code, were consistently less than the IoU results I got from the library I was using at the time - the Evaluate library from Hugging Face. But their IoU was equal to what my code computed as recall (sensitivity). I've opened a ticket with Hugging Face:
https://github.com/huggingface/evaluate/issues/421
They basically said they had copied that whole code from OpenMMLab and I should take it up with them. So I did:
https://github.com/open-mmlab/mmsegmentation/issues/2655
That was more than a week ago and there's still no reply. Meanwhile I've seen other bug reports which appear to point at the same problem:
https://github.com/open-mmlab/mmsegmentation/issues/2594
I'm pretty sure I am right. The definition of IoU is quite simple, and there isn't much room there for interpretation. Their code fails simple test cases.
My concern is - since they effectively calculate recall instead of IoU, and recall is larger than, or equal to IoU, and since the MMSegmentation library is widely used in image segmentation research, it's possible there are quite a few results floating out there in the literature that are a few percentage points larger than what they should be - e.g. 90% IoU instead of 85%.
Thoughts?
Mediocre-Bullfrog686 t1_jb71qkj wrote
Pixels with ignore_index mean that they should be ignored (e.g., pixels in the ground-truth image that the annotators are not sure about). It does not mean that they are from a "negative class". It is correct to ignore those pixels during IoU computation.