Multi-object detection

Using the pascal dataset i’m trying to do a multi class object detection model using fastai
but i’m having problems with creating a datablock because some images have multiple object with their respective bounding boxes and other images only have one object with one bounding boxe coordinates . Bellow is the error that i’m getting
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 Tensor:
Item at index 0 has shape: torch.Size([8])
Item at index 1 has shape: torch.Size([4])

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