How can i use DALI with object detection task

I am creating a dataloader for object detection task using DALI’s pipeline and DALIGenericIterator. the issue i am facing is, it tries to find the images in classification task form (/class/images-labels), but for object detection task my directory structure is /dir/images and dir/labels.

Also, I have a dataset of lacs of images, so it’s not feasible to create file_list.txt for the dataset. Also , while reading the annotations.json using fn.readers.coco, it can not relate annotations to the images. and ends up throwing error