Skip to content

FileNotFoundError: [Errno 2] No such file or directory: #125

@xboboji

Description

@xboboji

Hi, when I tried to convert my custom coco dataset to yolo format, I got the below error:

Image

My script is shown below:

from ultralytics.data.converter import convert_coco
convert_coco(labels_dir={my annotation path}', save_dir='{output path}/labels', use_segments=False, use_keypoints=False, cls91to80=False)

I checked the error and fixed it by adding one line:

os.makedirs((fn / f).parent, exist_ok=True)

I wonder if it is a minor bug in this tool or something only happened specifically for my case?

Thanks!

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingquestionFurther information is requested

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions