Skip to content

A Python tool for converting LABELME format into COCO format

Notifications You must be signed in to change notification settings

xukefang/labelme2coco

This branch is 1 commit behind shangjie-li/labelme2coco:master.

Folders and files

NameName
Last commit message
Last commit date

Latest commit

f3d4eb8 · Jan 14, 2023

History

10 Commits
Apr 14, 2022
Apr 14, 2022
May 2, 2022
Apr 13, 2022
Apr 14, 2022
May 10, 2022
Apr 13, 2022
Apr 29, 2022
Apr 13, 2022
Apr 13, 2022
Nov 26, 2022
Jan 14, 2023
Apr 13, 2022
Apr 13, 2022
Apr 29, 2022
Jan 14, 2023
Apr 13, 2022

Repository files navigation

labelme2coco

A Python tool for converting LABELME format into COCO format

Requirements

  • Clone this repository
    git clone [email protected]:shangjie-li/labelme2coco.git
    
  • Install dependencies
    pip install shapely
    

Usages

  • Convert LABELME formate into COCO format
    python labelme2coco.py --images_root=images --labels_root=labels --output_file=instances.json
    
    # If you want rename some classes in labels, just declare them in the class_map.txt and run
    python labelme2coco.py --images_root=images --labels_root=labels --output_file=instances.json --class_map_file=class_map.txt
    
    # If you want filter out some classes in labels, just declare what you want in the final_classes.txt and run
    python labelme2coco.py --images_root=images --labels_root=labels --output_file=instances.json --classes_file=final_classes.txt
    
  • Convert COCO format into YOLO format
    python coco2yolo.py --json_file=instances_train2017.json
    
    # If you want use COCO 91to80 label map, run
    python coco2yolo.py --json_file=instances_train2017.json --use_label_map
    

About

A Python tool for converting LABELME format into COCO format

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 100.0%