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

[BUG]: How can I avoid loading the model every time #1258

Closed
2 tasks done
OKC13 opened this issue Jun 12, 2024 · 1 comment
Closed
2 tasks done

[BUG]: How can I avoid loading the model every time #1258

OKC13 opened this issue Jun 12, 2024 · 1 comment
Labels
bug Something isn't working invalid This doesn't seem right

Comments

@OKC13
Copy link

OKC13 commented Jun 12, 2024

Before You Report a Bug, Please Confirm You Have Done The Following...

  • I have updated to the latest version of the packages.
  • I have searched for both existing issues and closed issues and found none that matched my issue.

DeepFace's version

newest

Python version

3.8.5

Operating System

centos

Dependencies

How can I avoid loading the model every time? I believe the way you wrote it, the model is loaded each time a prediction is made, which consumes a lot of time. Is there a way to initialize the model into memory first, and then use something like model.predict()?

Reproducible example

embedding = DeepFace.represent(img_path=img_path, model_name=model_name,
                                               detector_backend=backends[4])

Relevant Log Output

No response

Expected Result

No response

What happened instead?

No response

Additional Info

No response

@OKC13 OKC13 added the bug Something isn't working label Jun 12, 2024
@serengil serengil added the invalid This doesn't seem right label Jun 12, 2024
@serengil
Copy link
Owner

This thread was initiated for bug purposes, but it is unrelated to any bug reporting. Please direct your questions to Stack Overflow, as indicated in the issue templates.

@serengil serengil closed this as not planned Won't fix, can't repro, duplicate, stale Jun 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working invalid This doesn't seem right
Projects
None yet
Development

No branches or pull requests

2 participants