Project-MONAI / Project-MONAI/MONAI

Revisit "include_background" variable name in loss functions

Open
#7,056 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Design discussions
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 as include_channel: int | Sequence[int] = 0 could 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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.