qubvel / segmentation_models

Segmentation models with pretrained backbones. Keras and TensorFlow Keras.
MIT License
4.77k stars 1.03k forks source link

Losses selection #349

Open asmagen opened 4 years ago

asmagen commented 4 years ago

The example from this pipeline uses the following loss:

Screen Shot 2020-06-05 at 10 32 27 PM

How do I select or optimize the proper loss function or combinations as described in the example to fit my context of multi-class pathology image segmentation?

JordanMakesMaps commented 4 years ago

The loss function (or combination of) depends on the objective of your project and your dataset. I'm assuming that since you're working with histopathology images you're looking for cancerous tumors and therefore want to ensure that you catch all them, even if its a false positive.

I'd highly recommend spending some time looking at the different loss functions that are available in this repo, and then based on your objective decide which metrics are most important, and then decided on the loss function (especially if what you're doing is actually going to be implemented in a real-world situation).