Closed benguyer closed 6 years ago
I can confirm coming across the same issue on Windows 10, using python 3.6 and Qt4.
Linux mint 64bit, python3.5, same problem.
Seems like, if the mode is YOLO, the file is saved as filename.xml.txt.
I was able to fix this problem for my use case by commenting out line 759 in labelImg.py, "annotationFilePath += XML_EXT"
I'm not sure whether this will work for everyone though. There appears to be another bug that causes the opposite behavior -- files get saved without any extension #256.
@benguyer, I tried reverse-engineering the code and reached the conclusion that I don't want to mess with it.
What worked for me was to Change the default saved annotation folder by clicking the respective menu button on the left.
I do this every time I start a new labelImg session and haven't had the same issue since.
Hope it helps.
I wrote a little python script to remove the extra '.xml'. paste the code into a empty .py file say 'tool.py', and put this tool.py file in the same folder of your .xml.xml files, and run the script from a command line: python tool.py, problem solved! feel free to try :) @benguyer @sglvladi @lechatthecat @xblaster @rflynn
import os for file in os.listdir("."): if file.endswith(".xml.xml"): os.rename(file,file[:-4])
Mac osX High Siera here having same issue, the file first saved with double extension, then normal one if you saved again. The issue usually pop up if the dialog for file name input came out.
Hope this helps. ps:It's ok to not fixing it. The extension can be changed manually anyway.
This issue should be fixed now. Please download the latest release or code and let us know if you continue to experience it.
Thanks,
-Vlad
Change Pascal voc to yolo mode in labelImg window. (Pascal vo files will save in .xml, yolo annotation files in .txt
Hi, small usability issue here. When I save annotation files, they are given the file extension ".xml.xml", so saving "foo" would result in "foo.xml.xml". This results in the images not automatically loading their annotations. This is easily fixed by renaming the files.