labelformat icon indicating copy to clipboard operation
labelformat copied to clipboard

"filename" did not include file extension from LabelBox to COCO in object detection

Open Joilence opened this issue 2 years ago • 1 comments

  • "filename" in COCO JSON Images should include extensions.

    Seems not explicitly specified in COCO Data Format page, but did used in practice in COCO dataset examples like this.

    This issue leads to problems that images cannot be found when trying to train a model from the converted dataset.

  • "filename" parsed from LabelBoxObjectDetectionInput at _image_from_data_row() does not include a file extension, as there is no proper image filename can be parsed from LabelBox v2 labels.

I am not sure if there's an ideal solution, probably labelformat could handle downloading images as well, then it would use the correct image filenames/paths in conversion.

Joilence avatar Nov 30 '23 11:11 Joilence

Hey @Joilence, thanks again for an issue report!

If the information about the filename is not present in the LabelBox format there's not much we can do. Maybe you can give an example of your LabelBox input to see if there is a solution?

If you have a mapping from LabelBox ids to image filenames somewhere in your codebase, you can write a custom ObjectDetectionInput class that wraps LabelBoxObjectDetectionInput and just rewrites the filenames.

michal-lightly avatar Nov 30 '23 11:11 michal-lightly