Transform images project in Supervisely (link to format) to YOLO v5 format and prepares downloadable tar
archive.
Supervisely project have to contain only classes with shape Rectangle
. It means that all labeled objects have to be bounding boxes. If your project has classes with other shapes and you would like to convert the shapes of these classes and all corresponding objects (e.g. bitmaps or polygons to rectangles), we recommend you to use Convert Class Shape
app.
In addition, YOLO v5 format implies the presence of train/val datasets. Thus, to split images on training and validation datasets you should assign corresponding tags (train
or val
) to images. If image doesn't have such tags, it will be treated as train
. We recommend to use app Assign train/val tags to images
.
Step 1: Add app to your team from Ecosystem if it is not there.
Step 2: Open context menu of project -> Download as
-> Convert Supervisely to YOLO v5 format
App creates task in workspace tasks
list. Once app is finished, you will see download link to resulting tar archive.
Resulting archive is saved in :
Current Team
-> Files
-> /yolov5_format/<task_id>/<project_id>_<project_name>.tar
.
For example our file path is the following:
/yolov5_format/1430/1047_lemons_annotated.tar
.
If some images were not tagged with train
or val
tags, special warning is printed. You will see all warnings in task logs.
Here is the example of data_config.yaml
that you will find in archive:
names: [kiwi, lemon] # class names
colors: [[255,1,1], [1,255,1]] # class colors
nc: 2 # number of classes
train: ../lemons/images/train # path to train imgs
val: ../lemons/images/val # path to val imgs