Why does one not use IOU for training?

zimmermc picture zimmermc · Nov 7, 2016 · Viewed 11.4k times · Source

When people try to solve the task of semantic segmentation with CNN's they usually use a softmax-crossentropy loss during training (see Fully conv. - Long). But when it comes to comparing the performance of different approaches measures like intersection-over-union are reported.

My question is why don't people train directly on the measure they want to optimize? Seems odd to me to train on some measure during training, but evaluate on another measure for benchmarks.

I can see that the IOU has problems for training samples, where the class is not present (union=0 and intersection=0 => division zero by zero). But when I can ensure that every sample of my ground truth contains all classes, is there another reason for not using this measure?

Answer

mathetes picture mathetes · Jul 31, 2017

Checkout this paper where they come up with a way to make the concept of IoU differentiable. I implemented their solution with amazing results!