Reputation: 57
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
Thank you for your help🌺
Upvotes: 3
Views: 6490
Reputation: 103
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
Upvotes: 4
Reputation: 2615
You can use Label Studio, it is much better than labelImg
Install the packege:
pip install -U label-studio
Lunch it!
label-studio
Upvotes: 3