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

ConvertBoxToStandardModed cannot handle empty boxes #5990

Closed
Can-Zhao opened this issue Feb 14, 2023 · 0 comments · Fixed by #6170
Closed

ConvertBoxToStandardModed cannot handle empty boxes #5990

Can-Zhao opened this issue Feb 14, 2023 · 0 comments · Fixed by #6170
Assignees
Labels
enhancement New feature or request

Comments

@Can-Zhao
Copy link
Collaborator

Describe the bug
When input boxes are empty [], it got error since the boxes are supposed to have shape [N,4] or [N,6].

ValueError: Currently we support only boxes with shape [N,4] or [N,6], got boxes with shape torch.Size([1, 0])

To Reproduce
Steps to reproduce the behavior:

  1. Go to '...'
  2. Install '....'
  3. Run commands '....'

Expected behavior
A clear and concise description of what you expected to happen.

Screenshots
If applicable, add screenshots to help explain your problem.

Environment

Ensuring you use the relevant python executable, please paste the output of:

python -c 'import monai; monai.config.print_debug_info()'

Additional context
Add any other context about the problem here.

@Can-Zhao Can-Zhao self-assigned this Feb 14, 2023
@Nic-Ma Nic-Ma added the enhancement New feature or request label Feb 14, 2023
wyli pushed a commit that referenced this issue Mar 25, 2023
Fixes #5990 .

### Description

Add transforms to convert empty box with shape (0,M) or (0,) into (0,4)
or (0,6).
Provide format checking inside detector so users can know how to solve
the format issue with empty box input.

### 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.
- [ ] Integration tests passed locally by running `./runtests.sh -f -u
--net --coverage`.
- [ ] Quick tests passed locally by running `./runtests.sh --quick
--unittests --disttests`.
- [ ] In-line docstrings updated.
- [ ] Documentation updated, tested `make html` command in the `docs/`
folder.

---------

Signed-off-by: Can Zhao <canz@nvidia.com>
jak0bw pushed a commit to jak0bw/MONAI that referenced this issue Mar 28, 2023
Fixes Project-MONAI#5990 .

### Description

Add transforms to convert empty box with shape (0,M) or (0,) into (0,4)
or (0,6).
Provide format checking inside detector so users can know how to solve
the format issue with empty box input.

### 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.
- [ ] Integration tests passed locally by running `./runtests.sh -f -u
--net --coverage`.
- [ ] Quick tests passed locally by running `./runtests.sh --quick
--unittests --disttests`.
- [ ] In-line docstrings updated.
- [ ] Documentation updated, tested `make html` command in the `docs/`
folder.

---------

Signed-off-by: Can Zhao <canz@nvidia.com>
jak0bw pushed a commit to jak0bw/MONAI that referenced this issue Mar 28, 2023
Fixes Project-MONAI#5990 .

### Description

Add transforms to convert empty box with shape (0,M) or (0,) into (0,4)
or (0,6).
Provide format checking inside detector so users can know how to solve
the format issue with empty box input.

### 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.
- [ ] Integration tests passed locally by running `./runtests.sh -f -u
--net --coverage`.
- [ ] Quick tests passed locally by running `./runtests.sh --quick
--unittests --disttests`.
- [ ] In-line docstrings updated.
- [ ] Documentation updated, tested `make html` command in the `docs/`
folder.

---------

Signed-off-by: Can Zhao <canz@nvidia.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants