image-segmentation-keras
image-segmentation-keras copied to clipboard
Loss Functions and Segmentation metrics
Hi,
I trained the model as shown in the tutorial and noticed that the default loss function is cross-entropy. Is there a way I can train the network with other loss functions, like dice loss, IoU loss, combo loss, etc? Also, I would appreciate it if there is a way to evaluate the performance of the model on different segmentation metrics, like, precision, accuracy, IoU, dice coefficient, etc.
Kindly assist and provide potential directions
Yusuf
yes, you can do that, you will need to play with train.py file, maybe add the loss you are interested in and call it under Line 114 https://github.com/divamgupta/image-segmentation-keras/blob/dc830bbd76371aaedbf8cb997bdedca388c544c4/keras_segmentation/train.py#L114
Changing to custom loss and metric still reports accuracy and cross-entropy. It doesn't have errors, it simply just reports accuracy even if you change it.