Skip to content

Convert Supervisely annotation type to darknet-yolo style

License

Notifications You must be signed in to change notification settings

tugaysolmaz/json2darknetyolo

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 

Repository files navigation

json2darknetyolo

Convert Supervisely annotation type to darknet-yolo style. Creates:

  • <Annotation .txt> files under new created <annotations_darknet> folder
  • <coco_classes.names> file

Requirements:

  • Python 3
  • opencv or PIL (and numpy)
  • (havent tried on linux, but it should work)

Versions of opencv or PIL should not matter, they are only needed for image dimensions, since darknet labeling depends on it.

You also should have a folder structure if you have Supervisely annotated data:

__Dataset Folder\
....|__meta.json
....|__annotations\
........|__01.json
........|__02.json
........|__...
....|
....|__images\
........|__01.jpg
........|__02.png
........|__...

Tutorial

  • Clone repository
  • Just copy paste json2darknet.py right next to meta.json file if you have the folder structure mentioned above.

You can also use command line tool if you like:

python json2darknet -mp path/to/meta.json/folder -ip path/to/<images-annotations>/folder

Author

Tugay Solmaz - Deahran Feel free to make suggestions or contact me.

License

This project is licensed under the MIT License - see the LICENSE.md file for details

Keywords

darknet, yolo, json, json2darknet, json2yolo, json 2 yolo, json 2 darknet, json to darknet conversion, json to yolo conversion.

About

Convert Supervisely annotation type to darknet-yolo style

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages