gil-uav / semantic-image-segmentation

Semantic segmentation of static objects in orthophotos.
MIT License
2 stars 0 forks source link

Investigate better loss-functions #6

Open vegovs opened 3 years ago

vegovs commented 3 years ago

Loss Functions for Medical Image Segmentation: A Taxonomy

Dice vs cross-entropy: https://stats.stackexchange.com/questions/321460/dice-coefficient-loss-function-vs-cross-entropy

Do this after dataset is "complete"

vegovs commented 3 years ago

As summarized by @shimao and @cherub, one cannot say apriori which one will work better on a particular dataset. The correct way is to try both and compare the results. Also, note that when it comes to segmentation, it is not so easy to "compare the results": IoU based measures like dice coefficient cover only some aspects of the quality of the segmentation; in some applications, different measures such as mean surface distance or Hausdorff surface distance need to be used. As you see, not even the choice of the correct quality metric is trivial, let alone the choice of the best cost function.

I personally have very good experience with the dice coefficient; it really does wonders when it comes to class imbalance (some segments occupy less pixels/voxels than others). On the other hand, the training error curve becomes a total mess: it gave me absolutely no information about the convergence, so in this regard cross-entropy wins. Of course, this can/should be bypassed by checking the validation error anyways.