Skip to content

Conversion of Dataset from Darknet Format into Supervisely Format via Python.

Notifications You must be signed in to change notification settings

JinhangZhu/darknet-to-supervisely

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 

Repository files navigation

darknet-to-supervisely

Conversion of Dataset from Darknet Format into Supervisely Format via Python


Table of Contents

Introduction

This repository shows a quick method to convert the dataset in the Darknet format into the JSON-based format required by Supervisely annotation tool in python language. Check it out!

Usage

Clone the repository to your local path:

git clone https://github.com/JinhangZhu/darknet-to-supervisely.git

Copy the convert.py file into your local folder where the darknet dataset is located. Open the terminal on Linux or command window in Windows and run command like:

python convert.py -o ./ego-hand -p ./new-project -d new-set -l left_hand -l right_hand

help:

  • -o, --origin: The name of original data downloaded from Supervisely. type=str
  • -p, --project: The name of the output dataset folder. type=str
  • -d, --dataset: The name of the meta file of the data. type=str
  • -l, --label: Whether to randomly split image set. action='append'

For example, I have a folder called: "ego-hand" in the current path, I want to create a dataset folder called "epichands" under the directory of project "epichhands", with labels: left_hand, right_hand. I run:

python convert.py -o ./ego-hand -p ./epichands -d epichands -l left_hand -l right_hand
Namespace(dataset='epichands', label=['left_hand', 'right_hand'], origin='./ego-hand', project='./epichands')
Images:   3%|██▌                                                                             | 415/12846 [00:13<06:29, 31.90it/s]

Results:

└───datasets                                                                   		
		├───ego-hand
		├───epichhands
				├───meta.json
				├───ann
					├───xxx.jpg.json
				├───img
					├───xxx.jpg

Contributors

Maintainers

Jinhang Zhu

References

License

About

Conversion of Dataset from Darknet Format into Supervisely Format via Python.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages