You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am trying to use SemTorch for instance segmentation for the case when multiple masks are present in the same image. By looking at the source code and the MaskRCNN notebook , it seems that only one mask per image is supported. Am I correct?
I have written a small function that builds the bounding boxes for all the masks in an image, and assigns the corresponding (binary) labels:
Collating items in a batch
Error! It's not possible to collate your items in a batch
Could not collate the 0-th members of your tuples because got the following shapes
torch.Size([3, 305, 305]),torch.Size([3, 305, 305]),torch.Size([3, 305, 305]),torch.Size([3, 305, 305])
---------------------------------------------------------------------------
RuntimeError Traceback (most recent call last)
<ipython-input-137-c9f5d49c6974> in <module>()
----> 1 maskrccnnDataBlock.summary(path_im)
2 # print("Batch Size {}".format(bs))
[...]
/usr/local/lib/python3.7/dist-packages/torch/_tensor.py in __torch_function__(cls, func, types, args, kwargs)
1021
1022 with _C.DisableTorchFunction():
-> 1023 ret = func(*args, **kwargs)
1024 return _convert(ret, cls)
1025
RuntimeError: stack expects each tensor to be equal size, but got [4, 4] at entry 0 and [2, 4] at entry 1
which is probably due to the fact that in one image there are 4 masks, and in the other only 2. Any idea on how to go about this issue?
Thanks,
Zeno
The text was updated successfully, but these errors were encountered:
Hello,
I am trying to use SemTorch for instance segmentation for the case when multiple masks are present in the same image. By looking at the source code and the MaskRCNN notebook , it seems that only one mask per image is supported. Am I correct?
I have written a small function that builds the bounding boxes for all the masks in an image, and assigns the corresponding (binary) labels:
but when I run
I get the following error from
.summary()
:which is probably due to the fact that in one image there are 4 masks, and in the other only 2. Any idea on how to go about this issue?
Thanks,
Zeno
The text was updated successfully, but these errors were encountered: