-
Notifications
You must be signed in to change notification settings - Fork 84
Fix loading dataset #35
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
Hello @TrefoIV Thank you for your contributions. I will surely take a closer look at your code. |
Hi, thank you for the answer, and sorry for my late one. |
@TrefoIV |
@TrefoIV
Maybe you can curate a dummy scenario to replicate this and debug. |
Fixed loading dataset because images were discarded incorrectly datasets.py#L87. In particular in the original code, it is modified the list referenced by the for loop, this brings to unwanted behavior.
The code now behaves a little different when loading dataset: it first loads all the annotation files and, for each file, loads the corresponding image file specified in the
filename
tag in the annotation file.Moreover, I've add a parameter to discard the negative examples (images without bonding-boxes/annotations) from the dataset. The default behavior is discard as in the original code. If negative example are keeped, for each negative example a bounding box of a single pixel is added.