-
Notifications
You must be signed in to change notification settings - Fork 46
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
"-1" dimension breaks if no bbox in crop or image #50
Comments
Hello, I encountered a similar issue while performing inference on a custom dataset. Do you have any solutions to resolve this? Thank you very much for your response! File "/home/com/anaconda3/envs/devit/lib/python3.9/site-packages/torch/multiprocessing/spawn.py", line 69, in _wrap |
In other type of dataset than COCO, having no bbox in a crop is likely. The "-1" dim in a reshape is imposible then.
Change this:
devit/lib/regionprop.py
Line 79 in cfd0e0e
to this:
pred_roi_mask = mask_h.reshape(N, mask_h.shape[-1], 1) * mask_w.reshape(N, 1, mask_w.shape[-1])
Same there:
gt_roi_mask = mask_h.reshape(N, mask_h.shape[-1], 1) * mask_w.reshape(N, 1, mask_w.shape[-1])
and there:
mask_logits = mask_logits.view(bs, np.prod(mask_logits.shape[1:])) / self.temperature # N x K2
The error is what follows:
The text was updated successfully, but these errors were encountered: