What dataset format is required for gluoncv Yolov3 training?

Hi,
I’m struggling to adapt the official gluoncv YoloV3 to a real-life dataset
My data is annotated with SageMaker groundtruth, and I created a custom Dataset class that returns tuples of {images, annotations} and works fine to train the gluoncv SSD model

When I use this Dataset in the YoloV3 training script, I have this error:
AssertionError: The number of attributes in each data sample should contains 7 elements, given 2.

in practice, I use this code for the data pipeline (copied from the gluoncv website):

from gluoncv.data.transforms.presets.yolo import YOLO3DefaultTrainTransform

width, height = 416, 416  # resize image to 416x416 after all data augmentation
train_transform = YOLO3DefaultTrainTransform(width, height)

from gluoncv.data.batchify import Tuple, Stack, Pad
batchify_fn = Tuple(*([Stack() for _ in range(6)] + [Pad(axis=0, pad_val=-1) for _ in range(1)]))

train_data = gluon.data.DataLoader(
    dataset=train_dataset.transform(train_transform),
    batch_size=16,
    shuffle=True,
    batchify_fn=batchify_fn,
    last_batch='rollover',
    num_workers=1)

and both a batches = [B for B in train_data] and the training loop return the above-mentioned error

Is there a required Dataset format for gluoncv Yolov3 training? Where is this documented?

Problem solved: in the official demo the YOLO3DefaultTrainTransform needs to know the network to create training targets:

net = model_zoo.get_model('yolo3_darknet53_voc', pretrained=True)
train_transform = YOLO3DefaultTrainTransform(width, height, net)