laclouis5 / globox

A package to read and convert object detection datasets (COCO, YOLO, PascalVOC, LabelMe, CVAT, OpenImage, ...) and evaluate them with COCO and PascalVOC metrics.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Unable to solve the missed image problem

rentainhe opened this issue · comments

I use coco128 as an example, and coco128 has some labels that did not match to any images, and which will raise the bug:

from globox import AnnotationSet

yolo = AnnotationSet.from_yolo(
    folder="./coco128/coco128/labels/train2017",
    image_folder="./coco128/coco128/images/train2017"
)


>>>
AssertionError: File ./coco128/coco128/images/train2017/000000000659.jpg does not exists, unable to read the image size.

Do you have any idea to solve it ? I'm not sure if it's a bug or we need to add some new features for this situation

Can you check if the image 000000000659.jpg exists in the ./coco128/coco128/images/train2017/ folder? If this is not the case, you should add it before running this function since each annotation file must have a corresponding image for the YOLO format. Alternatively, you can remove the annotations with missing images.

Thanks for your reply, I will try to remove the missed label and image and try this API again