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

[fix] Prevent Out-of-Memory Errors #180

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

Conversation

halqadasi
Copy link

The primary issue is the inefficiency of repeatedly loading a large model into memory for each new instance of the MMDetection class. This process occurred every time an image required labeling, which led to rapidly exhausting available memory resources.

Solution:
The solution introduced a class-level attribute within the MMDetection class to store and share a single model instance across all instances of the class, ensuring the model loads only once. This approach dramatically reduced memory consumption and prevented out-of-memory errors by eliminating redundant model loading and leveraging model instance reuse.

The primary issue is the inefficiency of repeatedly loading a large model into memory for each new instance of the `MMDetection` class. This process occurred every time an image required labeling, which led to rapidly exhausting available memory resources.

Solution:
The solution introduced a class-level attribute within the `MMDetection` class to store and share a single model instance across all instances of the class, ensuring the model loads only once. This approach dramatically reduced memory consumption and prevented out-of-memory errors by eliminating redundant model loading and leveraging model instance reuse.
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