xaerincl / labels_to_cvat

Use this if you have a set of annotations and images and want to import them into CVAT (could be for editing the bounding boxes or to export the dataset to another format).

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

labels_to_cvat

Export a YOLO labeled dataset to CVAT. Will add different formats in the future.

How to use

Run:

$ python labels_to_cvat.py -f <path to folder with the images and .txt> -c <class1name,class2name...> 

add -no_zip at the end if you dont need/want the .zip files with the images

This will create 2 .zip files inside the image folder. One with the images and one with the labels and other necessary files to import the dataset into CVAT.

Demo

we have a folder named 'images' with 2 images and their corresponding label (yolo format .txt) like:

tutorial_1

there are 2 types of objects labeled: dog,person

Run: (remember to change the /user/ part or the full path if neccesary)

$ python labels_to_cvat.py -f /home/user/Desktop/images -c dog,person

if you have the images folder and the labels_to_cvat.py in the same folder its easier to run:

$ python labels_to_cvat.py -f images -c dog,person

This will create the images_upload.zip and the annotations_upload.zip inside the images. The first contains all the images and the second zipfile contains the annotations plus the obj.names, obj.data and train.txt files necessary to upload to CVAT in order to edit the labels or export them into another format.

tutorial_2

The files will be rearranged and will look like:

tutorial_3

Autores ✒️

  • Oscar Mauriaca - Desarrollo - xaerincl

About

Use this if you have a set of annotations and images and want to import them into CVAT (could be for editing the bounding boxes or to export the dataset to another format).


Languages

Language:Python 100.0%