SkalskiP / make-sense

Free to use online tool for labelling photos. https://makesense.ai
GNU General Public License v3.0
3.11k stars 514 forks source link

Annotation import was unsuccessful. For YOLO labels to be loaded correctly, labels.txt file is required. #314

Open Xianyi-Wang opened 1 year ago

Xianyi-Wang commented 1 year ago

Describe the bug I used MakeSense and exported the annotations to YOLO format, but when I uploaded these image files again and imported these annotations, it fails with error message as follow:

image

I guess this is because my file name is a timestamp and contains multiple dots, like "1670577347.002843.txt", but I saw that the bug was fixed in issue https://github.com/SkalskiP/make-sense/issues/140 , I don't know why it still doesn't work. I'm a newbie, please pardon me if I make some mistakes.

To Reproduce Steps to reproduce the behavior:

  1. select Import Annotations
  2. select Multiple Files in YOLO Format
  3. Select annotation files in format "1670577347.002843.txt"
  4. Import fails with error "Annotation import was unsuccessful. For YOLO labels to be loaded correctly, labels.txt file is required."

Expected behavior I think it should success.

Screenshots

image

Desktop (please complete the following information):

github-actions[bot] commented 1 year ago

👋 Hello @Xianyi-Wang, thank you for your interest in make-sense - free to use online tool for labelling photos! 🏷️

🐞 Bug reports

If you noticed that make-sense is not working properly, please provide us with as much information as possible. To make your life easier, we have prepared a bug report template containing all the relevant details. We know, we ask for a lot... However, please believe that knowing all that extra information - like the type of browser you use or the version of node you have installed - really helps us to solve your problems faster and more efficiently. 😉

💬 Get in touch

If you've been trying to contact us but for some reason we haven't responded to your issue yet, don't hesitate to get back to us on Gitter or Twitter.

💻 Local setup

# clone repository
git clone https://github.com/SkalskiP/make-sense.git

# navigate to main dir
cd make-sense

# install dependencies
npm install

# serve with hot reload at localhost:3000
npm start

To ensure proper functionality of the application locally, an npm 8.x.x and node.js v16.x.x versions are required. More information about this problem is available in the #16 issue.

Xianyi-Wang commented 1 year ago

I have changed both the image and label filenames to ensure they don't contain multiple "." but it still doesn't work. And I have also tried to git clone and run make-sense locally, but importing still failed.

SkalskiP commented 1 year ago

Hi, @Xianyi-Wang 👋🏻! Did you provided labels.txt file?

Xianyi-Wang commented 1 year ago

Yes, I did provided annotation files in txt format, but importing failed.

tapas commented 1 year ago

I am also facing the same problem in importing annotations, I am unsure what format in labels.txt file is needed. Please resolve the issue

PowZone commented 1 year ago

Same here. I need to export in Yolo format but there isn't a labels.txt in the output zip.

Thx!

Nauman691 commented 1 year ago

i want to export the files in yolo format but there are no yolo format files in the downloaded folder

rickkk856 commented 1 year ago

Any progress on this since then? Also need got this error,

Halvani commented 1 year ago

Same here! Only the annotations are exported, but not the labels.txt itself. This is very annoying if you have created a large number of labels. From the annotation text files you will only able to extract the IDs of the labels, but not the strings they are assigned to...

rickkk856 commented 1 year ago

ame here! Only the annotations are exported, but not the labels.txt itself. This is very annoying if you have created a large number of labels. From the annotation text files you will only able to extract the IDs of the labels, but not the strings they are assigned to...

I've managed to solve the issue by creating the labels.txt file manually and putting it in the same folder of the files that i had previoulsy exported....

My suggestion is when starting a project make the labels.txt file like this for example

0 Class_01
1 Class_02
3 Class_03

And then create these labels in the same order at the web app, so when you export them the labels.txt file will not be exported but you'll have a backup made manually just to import them back and continue labelling in another day.

yuxin7 commented 1 year ago

Describe the bug I used MakeSense and exported the annotations to YOLO format, but when I uploaded these image files again and imported these annotations, it fails with error message as follow: image I guess this is because my file name is a timestamp and contains multiple dots, like "1670577347.002843.txt", but I saw that the bug was fixed in issue #140 , I don't know why it still doesn't work. I'm a newbie, please pardon me if I make some mistakes.

To Reproduce Steps to reproduce the behavior:

  1. select Import Annotations
  2. select Multiple Files in YOLO Format
  3. Select annotation files in format "1670577347.002843.txt"
  4. Import fails with error "Annotation import was unsuccessful. For YOLO labels to be loaded correctly, labels.txt file is required."

Expected behavior I think it should success.

Screenshots image

Desktop (please complete the following information):

  • OS: MacOS 13.2.1
  • Browser: chrome
  • Version: MakeSense web version

您好。您这个问题最后解决了吗???

Hassan-Tamer commented 1 year ago

It didn't work for me when I had the labels in a file with "classes.txt" as a name but when I renamed it "labels.txt" It worked successfully

yusuphwasiu commented 10 months ago

To resolve this, create a labels.txt file in the same folder with the annotations (i.e .txt) and put the labels in it as shown in the example below.

0 Dog
1 Cat
2 Fish
Damarcreative commented 10 months ago

In the collection of .txt annotation files, make sure there is a labels.txt file that contains a list of labels. Therefore, you cannot upload only annotation files; You must also upload the labels.txt file. Here's an example:

labels.txt
image1.txt
image2.txt
image3.txt
image4.txt

Make sure to include the labels.txt file along with the annotation file when uploading it to makesense.ai.

heroacool commented 3 days ago

In the collection of .txt annotation files, make sure there is a labels.txt file that contains a list of labels. Therefore, you cannot upload only annotation files; You must also upload the labels.txt file. Here's an example:

labels.txt
image1.txt
image2.txt
image3.txt
image4.txt

Make sure to include the labels.txt file along with the annotation file when uploading it to makesense.ai.

it works. thank you!!!