Project-MONAI / Project-MONAI/MONAI
Revisit "include_background" variable name in loss functions
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 8.7k
- Forks
- 1.6k
- Avg merge
- 5d 1h
- Merged PRs (30d)
- 20
Description
I believe that using "include_channel_zero" as an alternative to "include_background" may not be the best choice due to the loss of argument semantics. In contrast, the name "include_background" directly conveys the purpose of this argument to the user. The core issue of original post is that the channel of background is confusing. One potential solution could be to introduce an optional argument, such as
background_channel: int | Sequence[int] = 0, to clarify this aspect. BTW, argument such asinclude_channel: int | Sequence[int] = 0could be better than "include_channel_zero" .
Originally posted by @ChenglongWang in https://github.com/Project-MONAI/MONAI/discussions/6915#discussioncomment-7097583
See whole discussion for further feedback.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Read the linked discussion and its feedback first, then inspect the loss functions affected by the include_background naming question. The work is complete only after the project has settled on a clear argument name and background-channel representation, with the affected API consistently reflecting that decision.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- machine-learning
- Issue type
- Refactor
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100