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

Error messages for ROIs #274

Open
lufre1 opened this issue May 23, 2024 · 0 comments
Open

Error messages for ROIs #274

lufre1 opened this issue May 23, 2024 · 0 comments

Comments

@lufre1
Copy link
Collaborator

lufre1 commented May 23, 2024

Description

When using ROIs in the torch_em Dataloader (I used: torch_em.default_segmentation_loader) there is a generic error message if the ROIs do not fit (e.g. empty or incorrect size).
Error message:

File "/home/freckmann15/miniforge3/envs/sam/lib/python3.11/site-packages/torch/utils/data/dataloader.py", line 631, in __next__
    data = self._next_data()
           ^^^^^^^^^^^^^^^^^
  File "/home/freckmann15/miniforge3/envs/sam/lib/python3.11/site-packages/torch/utils/data/dataloader.py", line 1319, in _next_data
    raise StopIteration
StopIteration

This message is quite difficult to interpret and therefore it is difficult to fix.
The error can be fixed by having a min_shape for the ROIs so ROIs are at least the shape of the patch_shape used.
I would suggest a more specific error message for this case.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant