Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Clarification required for SurfaceDiceMetric #5906

Closed
tvercaut opened this issue Jan 26, 2023 · 2 comments · Fixed by #6549
Closed

Clarification required for SurfaceDiceMetric #5906

tvercaut opened this issue Jan 26, 2023 · 2 comments · Fixed by #6549
Assignees

Comments

@tvercaut
Copy link
Member

tvercaut commented Jan 26, 2023

Describe the bug
The documentation of the SurfaceDiceMetric is confusing and would benefit from being clarified:
https://github.com/Project-MONAI/MONAI/blob/dev/monai/metrics/surface_dice.py

It indeed says it computes the "Normalized Surface Distance (NSD)" intially and later it says it computes the "(Normalized) Surface Dice (NSD)". It then refers to https://github.com/deepmind/surface-distance which does not provide a metric called "Normalized Surface Distance" or "Normalized Surface Dice".

The DeepMind repo however provides a Surface Dice (with compute_surface_dice_at_tolerance) which may be what SurfaceDiceMetric implements but compute_surface_dice_at_tolerance requires a tolerance as input whereas SurfaceDiceMetric does not. It's thus unclear how these can be the same.

The referenced paper in MONAI's documentation, https://arxiv.org/abs/1809.04430, also does not mention a metric which accronym would be NSD. The reference for the 2D extension does though: https://arxiv.org/abs/2111.05408

Additional context
Similar confusions can be found in biomedical challenges:
https://doi.org/10.1038/s41467-022-30695-9
https://doi.org/10.1016/j.media.2020.101920

It's thus not only MONAI being confusing but it would be helpful to clarify nonetheless.

@Nic-Ma
Copy link
Contributor

Nic-Ma commented Jan 27, 2023

Hi @yiheng-wang-nv ,

Could you please help take a look at this ticket?

Thanks in advance.

@tvercaut
Copy link
Member Author

I had a quick discussion with @mjorgecardoso and Michela about NSD in the medical segmentation decathlon (https://doi.org/10.1038/s41467-022-30695-9). They confirmed that what they refer to as NSD in the challenge is the same as the Surface Dice in the Deepmind repo (compute_surface_dice_at_tolerance) and the Surface Dice Similarity Coefficient in section 2.2 of https://arxiv.org/abs/1809.04430

Screenshot 2023-01-27 at 13 36 31

I further assume that what MONAI refers to as class_thresholds is actually similar to what the other source call "tolerance". However class_thresholds is given in pixels/voxels rather than milimetres. This makes is harder to relate. Also, it's unclear to me how anisotropix voxels would be handled. If this is a limitation of MONAI's implementation, it would be worth highlighting.

Given that the NSD acronym has been used in a few existing challenges, it may be worth keeping it in MONAI as well but maybe expand it to "Normalized Surface Dice" to improve clarity.

wyli pushed a commit that referenced this issue May 24, 2023
### Description

This PR extends the `SurfaceDiceMetric` for 3D images. The
implementation already uses generic functions to obtain the boundary
edges and compute the distance, the extension just
- removes the assertion that the input is 2D (`[B,C,W,H]`).
- updates the docstrings
- adds a test case in
`TestAllSurfaceDiceMetrics.test_tolerance_euclidean_distance_3d`

fixes #5906
mentioning #4103

### Types of changes
<!--- Put an `x` in all the boxes that apply, and remove the not
applicable items -->
- [x] Non-breaking change (fix or new feature that would not break
existing functionality).
- [ ] Breaking change (fix or new feature that would cause existing
functionality to change).
- [x] New tests added to cover the changes.
- [x] Integration tests passed locally by running `./runtests.sh -f -u
--net --coverage`.
- [x] Quick tests passed locally by running `./runtests.sh --quick
--unittests --disttests`.
- [x] In-line docstrings updated.
- [ ] Documentation updated, tested `make html` command in the `docs/`
folder.

---------

Signed-off-by: Bryn Lloyd <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants