qubvel / segmentation_models

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

Iou_score starts very high and keeps on decreasing/multi-class segmentation #458

Open kalliovi opened 3 years ago

kalliovi commented 3 years ago

Hi and thank you so much for your very useful work. I'm training a multi-class segmentation model based on an adaptation of the tutorial from segmentation_models and the performance of iou_score is not working as expected. I follow the example from this library and the only difference I have is that my initial masks are of shape (n,m) instead of (n,m,3) that are in the camvid dataset used in the example. iou_score_dice

The predicted masks seem to be ok but how is it possible to start on such a high iou_score and then to drop? Both in the example and others I have seen it is always starting low and keeps improving. test1_dice

Has anyone encountered such a result again? Any help would be highly appreciated

gkouros commented 3 years ago

I have the same issue. I followed the multiclass segmentation example and adjusted it for training an FPN with an inceptionv3 backbone on PASCAL VOC. Although the loss has a decreasing trend, the IoU and F1-score start high and keep on dropping instead of increasing which is certainly strange.

kalliovi commented 3 years ago

I have the same issue. I followed the multiclass segmentation example and adjusted it for training an FPN with an inceptionv3 backbone on PASCAL VOC. Although the loss has a decreasing trend, the IoU and F1-score start high and keep on dropping instead of increasing which is certainly strange.

Hi gkouros did you manage to find a solution for this problem?

gkouros commented 3 years ago

I have the same issue. I followed the multiclass segmentation example and adjusted it for training an FPN with an inceptionv3 backbone on PASCAL VOC. Although the loss has a decreasing trend, the IoU and F1-score start high and keep on dropping instead of increasing which is certainly strange.

Hi gkouros did you manage to find a solution for this problem?

I'm not entirely sure, but I think my problem was that I was using a sigmoid activation function instead of a softmax.