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

Memory problems when batch classifying large directories #490

Open
1 task done
davidwhealey opened this issue Apr 30, 2024 · 2 comments
Open
1 task done

Memory problems when batch classifying large directories #490

davidwhealey opened this issue Apr 30, 2024 · 2 comments
Assignees
Labels
bug Something isn't working enhancement New feature or request

Comments

@davidwhealey
Copy link

davidwhealey commented Apr 30, 2024

Search before asking

  • I have searched the Pytorch-Wildlife issues and found no similar bug report.

Description

I have a directory of about 17,000 camera trap images, probably an average of a handful of detections per image. When I try to run the batch megadetector on that directory from within a notebook, at around halfway through the batch, the machine runs out of memory (32GB).

If the high memory usage is unavoidable, a nice option would be to be able to run the detector on lists of images rather than directories, that way large directories could be broken up more easily.

Thanks for everything!

Use case

Large directories of images to be detected

@davidwhealey davidwhealey added the enhancement New feature or request label Apr 30, 2024
@zhmiao
Copy link
Collaborator

zhmiao commented May 2, 2024

Hello @davidwhealey, thank you so much for reporting this. We also realized this issue on our end and already have a solution to it. We are working on integrating it to the codebase and will give you an update as soon as the new inference function is released!

@zhmiao zhmiao added the bug Something isn't working label May 2, 2024
zhmiao added a commit that referenced this issue May 8, 2024
Fixing batch detection memory issue #490
@zhmiao
Copy link
Collaborator

zhmiao commented May 8, 2024

Hello @davidwhealey , we just pushed a new version with the fix to the batch detection memory issue. Could you try update the package and see if it fixes your issue?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants