Fastai Coco Detections format Dataset Class

I am trying to build a a Fastai DataSet class that is able to handle the multiple per image classes and masks of the target in the COCO detections format. I can load and index that DataSet by called pytorch vision’s CocoDetections Dataset. I can then wrap that class in a fastai wrapper that inherits BaseDataset. The part I am having difficulty with is building the collater for the fastai DataLoader. Once I load the dataset into COCO detections format, the target is a list of labels, i.e. a collection of classes and their mask coordinates. Therefore something in the dataset class needs to be rewritten so that the data loader can load one label at a time as the target instead of the entire list. How would I correctly proceed from this point? Do I override get_y() and what should it return?
Thanks,
Jamie

HI Jamie,
I am just starting out on a similar attempt to bring COCO images and annotations into fast.ai. It seems to be plausible that we could just load the COCO set right into fast.ai without having to port Caffe2 modules to pytorch. Did you ever complete the journey? Happy to discuss.
David

Sorry, just seeing this now for the first time. I ended up using a Keras solution. But If you are still working on the project, I would be glad to help.