Errors with dataloaders for Object Detection

Hi, I hope I’m posting this in the right place.

I’m getting similar errors for the official fastai data block tutorial, and the walk with fastai tutorial. The library seems to be broken…

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 @muellerzr 's walkwith 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 ''>]
1 Like

I’m also receiving the same errors. Has anyone had a chance to solve this issue?

I ended up just using YOLOv7 with Roboflow, it’s super plug-and-play and no errors.