MONAI icon indicating copy to clipboard operation
MONAI copied to clipboard

Issue: Similar Transform Names with Different Functionalities

Open chezhia opened this issue 2 months ago • 1 comments

Description The NormalizeLabelsInDatasetd transform defined here and the NormalizeLabeld transform defined here have very similar names but perform entirely different functions. This can cause confusion, especially when both are likely to be used in a MONAI Label workflow.

NormalizeLabelsInDatasetd:

Creates a label matrix according to what is defined in the label dictionary. Sets undefined labels in the mask to zero (background). NormalizeLabeld:

By default, changes the mask file so that all labels greater than zero become 1. Impact Having such similarly named transforms with entirely different functionalities can lead to significant confusion and potential errors in workflows. The MONAI documentation currently lacks clear definitions for these transforms, making the situation particularly challenging for users.

Suggestion To improve clarity and prevent potential misuse, I propose the following:

Rename NormalizeLabeld to a more descriptive name that reflects its functionality of converting all non-zero labels to one. This would distinguish it clearly from NormalizeLabelsInDatasetd.

Update the MONAI documentation to include clear definitions and examples for both transforms, ensuring that users can easily understand the differences and appropriate use cases for each.

By implementing these changes, we can enhance the usability and clarity of the MONAI Label workflows, reducing the risk of errors and improving user experience.

chezhia avatar May 23 '24 19:05 chezhia