Skip to content

Issue: Similar Transform Names with Different Functionalities #7800

Description

@chezhia

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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions