# Uploading images with annotation .txt files

**URL:** <https://discuss.roboflow.com/t/uploading-images-with-annotation-txt-files/4879>\
**Category:** 🤝  Community Help\
**Created:** [March 18, 2024, 5:10am UTC](https://discuss.roboflow.com/t/uploading-images-with-annotation-txt-files/4879 "2024-03-18T05:10:55Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![ai1archivizer](https://yyz1.discourse-cdn.com/flex029/user_avatar/discuss.roboflow.com/ai1archivizer/32/8361_2.png) [@ai1archivizer](https://discuss.roboflow.com/u/ai1archivizer)\
**Post date:** [March 18, 2024, 5:10am UTC](https://discuss.roboflow.com/t/uploading-images-with-annotation-txt-files/4879/1 "2024-03-18T05:10:55Z")

</div>

Hello!  
I’m trying to upload image (chairs\_135823\_jpg.jpg) with annotation file (chairs\_135823\_jpg.txt) from folder. Before this, images had already been uploaded and marked up manually. And the class “chairs” already exists, it has index = 0

If the text file is like this:  
0 0.50078125 0.503125 0.5140625 0.8  
Then I get it:

 ![class_0](https://canada1.discourse-cdn.com/flex029/uploads/roboflow1/original/2X/6/6d39fa9ea22b7a5994fafcae79a5cd712679c977.png)  
The frame is correct, but the class name (“0”) is incorrect. And a new class “0” is added.

---

<div class="post-metadata">

**Author:** ![ai1archivizer](https://yyz1.discourse-cdn.com/flex029/user_avatar/discuss.roboflow.com/ai1archivizer/32/8361_2.png) [@ai1archivizer](https://discuss.roboflow.com/u/ai1archivizer)\
**Post date:** [March 18, 2024, 5:12am UTC](https://discuss.roboflow.com/t/uploading-images-with-annotation-txt-files/4879/2 "2024-03-18T05:12:03Z")

</div>

If the text file is like this:  
chairs 0.50078125 0.503125 0.5140625 0.8

 ![class_chairs](https://canada1.discourse-cdn.com/flex029/uploads/roboflow1/original/2X/a/a35d894115c92770bdb0a28fc31ee4b663019ecb.png)

The frame is not correct, but the class name (“chairs”) is correct

---

<div class="post-metadata">

**Author:** ![ai1archivizer](https://yyz1.discourse-cdn.com/flex029/user_avatar/discuss.roboflow.com/ai1archivizer/32/8361_2.png) [@ai1archivizer](https://discuss.roboflow.com/u/ai1archivizer)\
**Post date:** [March 18, 2024, 5:14am UTC](https://discuss.roboflow.com/t/uploading-images-with-annotation-txt-files/4879/3 "2024-03-18T05:14:41Z")

</div>

I need the already existing “chairs” class to be used and the frame to be correct.

---

<div class="post-metadata">

**Author:** ![ai1archivizer](https://yyz1.discourse-cdn.com/flex029/user_avatar/discuss.roboflow.com/ai1archivizer/32/8361_2.png) [@ai1archivizer](https://discuss.roboflow.com/u/ai1archivizer)\
**Post date:** [March 18, 2024, 6:46am UTC](https://discuss.roboflow.com/t/uploading-images-with-annotation-txt-files/4879/4 "2024-03-18T06:46:08Z")

</div>

support key to look up your account, it’s:

4FlQPupNlXgMddvQdxqaX9WbEk03

---

<div class="post-metadata">

**Author:** ![David\_Procházka](https://yyz1.discourse-cdn.com/flex029/user_avatar/discuss.roboflow.com/david_proch%C3%A1zka/32/4075_2.png) [@David\_Procházka](https://discuss.roboflow.com/u/David_Proch%C3%A1zka)\
**Post date:** [March 20, 2024, 3:09pm UTC](https://discuss.roboflow.com/t/uploading-images-with-annotation-txt-files/4879/5 "2024-03-20T15:09:03Z")

</div>

I suggest adding .yaml file in there, you just need:

nc: 26 #number of classes

names: [class0,class1,class2,…]

#leave numbers in the txt files

---

<div class="post-metadata">

**Author:** ![ai1archivizer](https://yyz1.discourse-cdn.com/flex029/user_avatar/discuss.roboflow.com/ai1archivizer/32/8361_2.png) [@ai1archivizer](https://discuss.roboflow.com/u/ai1archivizer)\
**Post date:** [March 21, 2024, 4:10am UTC](https://discuss.roboflow.com/t/uploading-images-with-annotation-txt-files/4879/6 "2024-03-21T04:10:08Z")

</div>

Yes it works.  
Thank you !

---

<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:** [April 11, 2024, 4:10am UTC](https://discuss.roboflow.com/t/uploading-images-with-annotation-txt-files/4879/7 "2024-04-11T04:10:35Z")

</div>

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