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

Object Detection is unable to build a dataloader #59

Open
RVirmoors opened this issue Jul 7, 2022 · 0 comments
Open

Object Detection is unable to build a dataloader #59

RVirmoors opened this issue Jul 7, 2022 · 0 comments

Comments

@RVirmoors
Copy link

https://walkwithfastai.com/Object_Detection

Using the current version of fastai, attempting to show a batch produces this error:

RuntimeError: Error when trying to collate the data into batches with fa_collate, at least two tensors in the batch are not the same size.

Mismatch found on axis 1 of the batch and is of type `TensorBBox`:
	Item at index 0 has shape: torch.Size([6, 4])
	Item at index 1 has shape: torch.Size([1, 4])

Please include a transform in `after_item` that ensures all data of type TensorBBox is the same size

If I install the versions listed on the page (fastai==2.1.10 fastcore==1.3.13 wwf==0.0.8), I get an initial import error:
ModuleNotFoundError: No module named 'torchvision.models.utils'
... for which there is a workaround, which then leaves me with this error for pascal.summary:

TypeError: no implementation found for 'torch.Tensor.__getitem__' on types that implement __torch_function__: [<class 'fastai.torch_core.TensorMultiCategory'>, <class 'fastai.vision.core.TensorBBox'>]
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