Devasy23 / FaceRec

An advanced facial recognition system designed for real-time identification using deep learning models and optimized vector search. Features include face detection, embedding generation, and scalable deployment options.
Apache License 2.0
12 stars 1 forks source link

feat: Add Frontend Support for vector search function and improve face recognition #43

Closed Devasy23 closed 1 month ago

Devasy23 commented 3 months ago

This pull request adds a new vector_search function to the database.py file, which performs a pipeline aggregation vector search on the MongoDB Atlas database. It also improves the face recognition code by refactoring it to use the Facenet512 model for better accuracy. Additionally, error handling has been added for cases where no match is found in face recognition. The pull request also includes code for the recognize_face API.

gitguardian[bot] commented 3 months ago

⚠️ GitGuardian has uncovered 2 secrets following the scan of your pull request.

Please consider investigating the findings and remediating the incidents. Failure to do so may lead to compromising the associated services or software components.

🔎 Detected hardcoded secrets in your pull request
| GitGuardian id | GitGuardian status | Secret | Commit | Filename | | | -------------- | ------------------ | ------------------------------ | ---------------- | --------------- | -------------------- | | [11383748](https://dashboard.gitguardian.com/workspace/416468/incidents/11383748?occurrence=142649807) | Triggered | MongoDB Credentials | 096aba78bd7552932450c3075c0fe2b2d6eb95f7 | API/route.py | [View secret](https://github.com/Devasy23/FaceRec/commit/096aba78bd7552932450c3075c0fe2b2d6eb95f7#diff-55bf67bd53fc03771478941d1f4e2255d34a1cb59550b0b84d9cbacb94aa3635L28) | | [11383748](https://dashboard.gitguardian.com/workspace/416468/incidents/11383748?occurrence=139651652) | Triggered | MongoDB Credentials | 1362215361dcfe8a11c78ee112970fdbf95a374d | API/route.py | [View secret](https://github.com/Devasy23/FaceRec/commit/1362215361dcfe8a11c78ee112970fdbf95a374d#diff-55bf67bd53fc03771478941d1f4e2255d34a1cb59550b0b84d9cbacb94aa3635R28) |
🛠 Guidelines to remediate hardcoded secrets
1. Understand the implications of revoking this secret by investigating where it is used in your code. 2. Replace and store your secrets safely. [Learn here](https://blog.gitguardian.com/secrets-api-management?utm_source=product&utm_medium=GitHub_checks&utm_campaign=check_run_comment) the best practices. 3. Revoke and [rotate these secrets](https://docs.gitguardian.com/secrets-detection/secrets-detection-engine/detectors/specifics/mongo_uri#revoke-the-secret?utm_source=product&utm_medium=GitHub_checks&utm_campaign=check_run_comment). 4. If possible, [rewrite git history](https://blog.gitguardian.com/rewriting-git-history-cheatsheet?utm_source=product&utm_medium=GitHub_checks&utm_campaign=check_run_comment). Rewriting git history is not a trivial act. You might completely break other contributing developers' workflow and you risk accidentally deleting legitimate data. To avoid such incidents in the future consider - following these [best practices](https://blog.gitguardian.com/secrets-api-management/?utm_source=product&utm_medium=GitHub_checks&utm_campaign=check_run_comment) for managing and storing secrets including API keys and other credentials - install [secret detection on pre-commit](https://docs.gitguardian.com/ggshield-docs/integrations/git-hooks/pre-commit?utm_source=product&utm_medium=GitHub_checks&utm_campaign=check_run_comment) to catch secret before it leaves your machine and ease remediation.

🦉 GitGuardian detects secrets in your source code to help developers and security teams secure the modern development process. You are seeing this because you or someone else with access to this repository has authorized GitGuardian to scan your pull request.

sonarcloud[bot] commented 3 months ago

Quality Gate Failed Quality Gate failed

Failed conditions
7 Security Hotspots
0.0% Coverage on New Code (required ≥ 80%)
6.2% Duplication on New Code (required ≤ 3%)
C Reliability Rating on New Code (required ≥ A)

See analysis details on SonarCloud

Catch issues before they fail your Quality Gate with our IDE extension SonarLint