Skip to content
This repository has been archived by the owner on Feb 29, 2024. It is now read-only.

Add IndexWrapper for yolo_io #864

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Conversation

shirok1
Copy link

@shirok1 shirok1 commented Apr 7, 2022

No description provided.

@tzutalin
Copy link
Contributor

Could you provide more description about this PR? what is the issue?

@shirok1
Copy link
Author

shirok1 commented Apr 15, 2022

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 .

@tzutalin
Copy link
Contributor

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

@shirok1
Copy link
Author

shirok1 commented Apr 30, 2022

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...

@tzutalin
Copy link
Contributor

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 ?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants