Skip to content
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

Pascalvoc perfomance optimization #92

Merged

Conversation

Kuluum
Copy link
Contributor

@Kuluum Kuluum commented Feb 16, 2022

Problem:

Low performance of get_pascalvoc_metrics on big (100k+ bboxes) dataset (estimation: 6 hours on my machine)

Reason:

for idx_det, det in enumerate(dects): # 100k+ iterations
    ...
    gt = [gt for gt in classes_bbs[c]['gt'] if gt.get_image_name() == img_det] # Filtering 100k+ list
    ...

A large list of gt bboxes is filtered again and again on each detection iteration.

Fix:

Create cache gt bboxes list per image name per class in advance.

Estimation 6 hours -> 6 minutes.

pytest passed.

@Kuluum Kuluum changed the title Cache gt filtering Pascalvoc perfomance optimization Feb 17, 2022
@github-actions
Copy link

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@Kuluum
Copy link
Contributor Author

Kuluum commented Feb 28, 2022

@rafaelpadilla ping

@rafaelpadilla rafaelpadilla merged commit 26a04e3 into rafaelpadilla:main Mar 5, 2022
@rafaelpadilla
Copy link
Owner

@Kuluum

I will revert the changes made in this PR due to issue #96

Could you, please, open a new PR fixing that?

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

Successfully merging this pull request may close these issues.

2 participants