Wrong label when uploading a Yolov5/Formated folder

Hi there,

I have a detection project on roboflow with pre-defined labels and already some images annotated.
I trained a yolov5 using those first data. Then i collected new images and applied my yolov5 on them to generate yolov5-formated label files.

I try to upload those pre-annotated images to my project as a new batch.
I do succeed in uploading the images and the bboxes.
BUT the labels that are uploaded are numbers “1, 2, 3, 4” instead of the pre-defined classes.
In the folder i upload i placed the same data.yaml file that i get when i dowload the dataset from roboflow.

The folder i upload is composed as follow

UPLOADED_FOLDER/
    data.yaml
    train/
        images/
            *.png
        labels/
            *.txt

Any way i can keep the proper classes when i upload ?
Thanks a lot.

Note:
I check this post but there is no information in it:

I asked this same question like 3 weeks ago an nobody answered: Classes lost after uploading annotations - #2 by lopezbv

Everything I try doesn’t work, and half of the documentation doesn’t work, as if its AI generated and they haven’t bothered updating it

I finaly made it work but using COCO format, NOT Yolov5.
So i had to use a python script to transform Yolov5 format to COCO single json file.
The final uploaded folder is composed as follow

UPLOADED_FOLDER/
    _annotations.coco.json
    *.png

Note that the name of the coco file seems to mater.

1 Like