Skip to content

Add a COCO to YOLO converter. #80

@Abdul-Mukit

Description

@Abdul-Mukit

Feature Description

A coco2yolo.py script that converts a COCO formatted detection or instance segmentation dataset into a yolo dataset.
Expected usage:
python coco2yolo.py --cocoroot <root path of coco dataset> --exportpath <root path of expected yolo dataset>
cocoroot will be the root path of coco dataset. This directory will contain "annotations" and "images" folders. The exportpath will be path where the converted data will placed. After conversion finishes the exportpath directory will contain two folders. labels and images. If the exportpath is same as cocoroot the folder images are not over-written.

I am working on a converter and will be making a PR soon. @henrytsui000 will appreciate your help in getting it evaluated and merged. Thanks.

Future Considerations

Currently, it seems that we are making a double effort in data_loader.py to support both types of datasets; COCO and YOLO. This is causing our effort to be diverted to fixing bugs like #67 #36.
Let us make this this converter script and reevaluate, if we should only support yolo formatted dataset. This should help us focus our efforts better.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions