'in labelimg, reopening the app resets classes.txt
I have a folder containing 1000 photos. And I tagged 100 photos with labelimg. In three classes: "car", "motorcycle" and "truck". But every time I open the labelimg, the previous tags are deleted from "classes.txt" and there is only the new tag that I created. And when I open the previous tagged photos in the labelimg, it gives list index out of range error and then labelimg will closed.
the error:
label = self.classes[int(class_index)]
IndexError: list index out of range
How can I have previous classes each time?
Thank you for your help🌺
Solution 1:[1]
You can use Label Studio, it is much better than labelImg
Install the packege:
pip install -U label-studio
Lunch it!
label-studio
Solution 2:[2]
You have to give the paths for the images folder and classes.txt
If you have build from source: python labelImg.py [IMAGE_PATH] [PRE-DEFINED CLASS FILE]
If you have pip installed labelImg:
labelImg [IMAGE_PATH] [PRE-DEFINED CLASS FILE]
where: [IMAGE_PATH] is the path to your images folder [PRE-DEFINED CLASS FILE] is the path to the folder that has your predefined classes.txt and the annotation txt files
Example: labelImg C:\Users\LENOVO\Downloads\images C:\Users\LENOVO\Downloads\Labels\classes.txt
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | Sajjad Aemmi |
| Solution 2 | nadinCodeHat |
