labelImg
labelImg copied to clipboard
Overwriting the classes.txt file caused an `IndexError: list index out of range` error
I encountered a flashback while restarting Labellimg to continue annotating the data.
I noticed that this was caused by the classes.txt file being overwritten by labelImg.
Repetition: Prepare two images, the first one labeled as Category A and the second one labeled as Category B, save and restart the labelImg, modify the first image, save and enter the second image, at this time the labelImg will be killed.
After the first annotation, look at the classes.txt file. There are two categories.After restart labelImg, modify and save, and check again, only category A is left.Labelimg could not find category B for the second image, so an error was reported.
- OS:Ubuntu
- PyQt version:1.8.4
As mentioned in official document, plz change directory to your image folder, and create a folder named "data", then create a predefined_classes.txt in the data folder. (If you have old labels, put them into data folder) After doing that, use this command "labelImg . ./data/predefined_classes.txt" Everything will be OK.
I install the repo as the docs, then not only I have to modify the data/predefined_classes.txt
but also create a classes.txt
in the target image folder, otherwise annoying errors occur 😑