# Wrong label when uploading a Yolov5/Formated folder

**URL:** <https://discuss.roboflow.com/t/wrong-label-when-uploading-a-yolov5-formated-folder/8894>\
**Category:** 🤝  Community Help\
**Created:** [March 5, 2025, 12:03am UTC](https://discuss.roboflow.com/t/wrong-label-when-uploading-a-yolov5-formated-folder/8894 "2025-03-05T00:03:41Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Florent\_Taralle](https://yyz1.discourse-cdn.com/flex029/user_avatar/discuss.roboflow.com/florent_taralle/32/6796_2.png) [@Florent\_Taralle](https://discuss.roboflow.com/u/Florent_Taralle)\
**Post date:** [March 5, 2025, 12:03am UTC](https://discuss.roboflow.com/t/wrong-label-when-uploading-a-yolov5-formated-folder/8894/1 "2025-03-05T00:03:41Z")

</div>

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

```auto
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:

> [@Can we upload pre-annotated data into Roboflow?](https://discuss.roboflow.com/t/can-we-upload-pre-annotated-data-into-roboflow/433/2):
>
> Yes, you can!

---

<div class="post-metadata">

**Author:** ![lopezbv](https://avatars.discourse-cdn.com/v4/letter/l/5daacb/32.png) [@lopezbv](https://discuss.roboflow.com/u/lopezbv)\
**Post date:** [March 5, 2025, 11:39am UTC](https://discuss.roboflow.com/t/wrong-label-when-uploading-a-yolov5-formated-folder/8894/2 "2025-03-05T11:39:42Z")

</div>

I asked this same question like 3 weeks ago an nobody answered: [Classes lost after uploading annotations - #2 by lopezbv](https://discuss.roboflow.com/t/classes-lost-after-uploading-annotations/8592/2)

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

---

<div class="post-metadata">

**Author:** ![Florent\_Taralle](https://yyz1.discourse-cdn.com/flex029/user_avatar/discuss.roboflow.com/florent_taralle/32/6796_2.png) [@Florent\_Taralle](https://discuss.roboflow.com/u/Florent_Taralle)\
**Post date:** [March 5, 2025, 1:07pm UTC](https://discuss.roboflow.com/t/wrong-label-when-uploading-a-yolov5-formated-folder/8894/3 "2025-03-05T13:07:50Z")

</div>

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

```auto
UPLOADED_FOLDER/
    _annotations.coco.json
    *.png

```

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

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex029/uploads/roboflow1/original/1X/bb6edbfa56d0cf2ee603f061e9e09103502cc8cc.png) [@system](https://discuss.roboflow.com/u/system)\
**Post date:** [March 26, 2025, 1:08pm UTC](https://discuss.roboflow.com/t/wrong-label-when-uploading-a-yolov5-formated-folder/8894/4 "2025-03-26T13:08:21Z")

</div>

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.
