labelImg
labelImg copied to clipboard
Add IndexWrapper for yolo_io
Could you provide more description about this PR? what is the issue?
labelImg occasionally remove classes in class.txt (the whole line deleted), then labelImg will crash because failed to find corresponding class name from class.txt .
I see. I don't think the below solution is to fix the root cause. Instead of catching the index error, do you dive deeper or have other alternatives?
try:
result = self.content[index]
except IndexError:
return str(index)
Thanks
Well, I think it's inefficient to use try-catch in an __gettitem__
method, which will be called in a loop. Anyway, I believe it is more important to fix the bug of deleting classes...
Hi @shirok1 ,
Thanks. Do you have an idea why/when labelImg occasionally remove classes in class.txt (the whole line deleted)
? or how to reproduce it?
Does it delete from memory or file? The solution probably work, but I would like to know more if there is another alternative to fix in the root ?