Cartucho / OpenLabeling

Label images and video for Computer Vision applications
Apache License 2.0
926 stars 266 forks source link

Outputs not being written #40

Closed AbhijitSridhar closed 5 years ago

AbhijitSridhar commented 5 years ago

My output files are still blank even after performing labelling. When I restart the program, on the gui I can still see my old labels, however the corresponding text files are empty

vuthede commented 5 years ago

It is so weird. My corresponding text files are not empty like yours. I think It may be a minor bug of the code, which sometimes cause problem in case someone use different version of opencv or environment (Linux, Window.). I use opencv 4.0 and Linux.

AbhijitSridhar commented 5 years ago

I use opencv3 and Linux. My problem is that some of the text files are being written, while the majority are left blank. I labelled around 500 images yesterday only to find out later that only around 10-20 have the proper data in the text file. All the others are empty

vuthede commented 5 years ago

I am curious now, have you checked the text file of the frame right after when you labelled it to ensure it is written?

Cartucho commented 5 years ago

@AbhijitSridhar Hello if the labels are being drawn but are not showing up in the .txt files it means that they were successfully written in the PASCAL VOC format but not in the YOLO one.

I'm sorry to hear that, however, the files are recoverable just send me the PASCAL VOC folder and I will convert them to YOLO format. to.cartucho@gmail.com

I will make sure I will find the bug.

Cartucho commented 5 years ago

@vuthede I am also curious. In my computer seems to work fine, but probably there is a bug.

vuthede commented 5 years ago

yeah @Cartucho , In my computer, it seems work fine too, I think there may some cases that the code did not cover.

Cartucho commented 5 years ago

@AbhijitSridhar could you please tell us in specific which version of python and OpenCV you are using?

Also, were you labeling a video or images?

AbhijitSridhar commented 5 years ago

Okay so I'm using python 3.6 and opencv 3.3. So I reduced my number of classes from 5 to 2 and now it works with no problem. Another thing I noticed is when I was trying to label for 5 classes, the only files being written were 0,1,10,100,1000,1001.txt Not sure if this is an indicator of the problem or something else

Cartucho commented 5 years ago

0,1,10,100,1000,1001.txt ohhhhh this explains a lot! I think the problem is with the name of your images.

The images are sorted so 0, 1, 10, 100 is how python will sort your files by the standard. I changed the sorting to what's called natural_sort a more human-like sorting. Please give it a try.

If this is the case you indeed labeled the images, you were just opening the wrong files.

Cartucho commented 5 years ago

@AbhijitSridhar could you please confirm that it is working now?

AbhijitSridhar commented 5 years ago

It works perfectly for two classes. When I first tried, I had 5-6 classes and faced this issue. I didn't change the file naming convention when trying for two classes

Cartucho commented 5 years ago

Hello @AbhijitSridhar can I close this issue? I think I solved it