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

Improvement: check image exists first #1334

Merged
merged 1 commit into from
Sep 3, 2024

Conversation

kremnik
Copy link
Contributor

@kremnik kremnik commented Sep 2, 2024

What has been done

With this PR, image existence checking has been added in recognition.py. The reason for this change is to solve the situtation that occurs when attempting to find similar faces using the find function. Previously, the function first collected embeddings from the database before searching for faces in the target image. If the path to the target image was incorrect or the image did not exist, the exception would only be raised after the database scan, which could be time-consuming.

How to test

make lint && make test

@serengil
Copy link
Owner

serengil commented Sep 3, 2024

LGTM

@serengil serengil merged commit 9d15881 into serengil:master Sep 3, 2024
2 checks passed
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