-
Hi, I followed the semantic segmentation tutorial notebooks and I have some questions regarding them:
Also, I can't seem to understand the documentation for DiceMetric:
In my understanding, the first approach does not follow the documentation. The second one, similar to the way it is used in spleen_segmentation_3d.ipynb gives wrong results. The third one, which comes closer to the documentation, produces an error. Could anyone explain what's the correct way of using it? I had 3 approaches for solving a binary segmentation on CTs and obtained some very unexpected results, with the same model and the same hyperparameters. The only thing that differ are: last activation function and the post transformations applied before computing dice metric.
I achieve a best dice coefficient of 75%.
I achieve a best dice coefficient of 60% (with the exact same code except for the two lines above).
With this I achieve a best dice coefficient of 78%. If there is anyone that could take the time to answer the question above and / or explain why are there such differences between the approaches, I would very much appreciate it! Thank you! |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 15 replies
-
Hi @cosminbvb , For the usage example of DiceMetric, you can refer to: Thanks. |
Beta Was this translation helpful? Give feedback.
-
@ericspod @wyli, could you please take a moment to clarify what is the correct way of using DiceMetric (input shape/format/encoding) and clear the waters on the discrepancies detailed above? |
Beta Was this translation helpful? Give feedback.
-
I've tried to capture everything about the dice loss and metrics in regards to binary and multiclass formulations here: https://gist.github.com/ericspod/529e19038c403ea382cfd79e6012ca49 If I've missed anything or something doesn't make sense here let me know, we can add this eventually to the documentation and amend the docstrings again to clarify behaviour. |
Beta Was this translation helpful? Give feedback.
I've tried to capture everything about the dice loss and metrics in regards to binary and multiclass formulations here: https://gist.github.com/ericspod/529e19038c403ea382cfd79e6012ca49 If I've missed anything or something doesn't make sense here let me know, we can add this eventually to the documentation and amend the docstrings again to clarify behaviour.