Update README.md
Browse files
README.md
CHANGED
|
@@ -7,6 +7,76 @@ sdk: gradio
|
|
| 7 |
sdk_version: 5.49.1
|
| 8 |
app_file: app.py
|
| 9 |
pinned: false
|
|
|
|
|
|
|
|
|
|
|
|
|
| 10 |
---
|
| 11 |
|
| 12 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 7 |
sdk_version: 5.49.1
|
| 8 |
app_file: app.py
|
| 9 |
pinned: false
|
| 10 |
+
python_version: 3.10
|
| 11 |
+
short_description: Facial recognition with InsightFace using Gradio
|
| 12 |
+
tags: ["computer-vision", "facial-recognition", "insightface", "gradio"]
|
| 13 |
+
fullWidth: true
|
| 14 |
---
|
| 15 |
|
| 16 |
+
# FaceRecognity 🐢
|
| 17 |
+
|
| 18 |
+
FaceRecognity is a **facial recognition web app** built with **InsightFace** and **Gradio**, designed to run smoothly on Hugging Face Spaces.
|
| 19 |
+
It allows you to:
|
| 20 |
+
|
| 21 |
+
- **Extract face embeddings** from any uploaded image.
|
| 22 |
+
- **Compare a target face** against multiple candidate images.
|
| 23 |
+
- Get **match confidence scores** for similarity.
|
| 24 |
+
|
| 25 |
+
---
|
| 26 |
+
|
| 27 |
+
## Features
|
| 28 |
+
|
| 29 |
+
1. **Extract Embeddings**
|
| 30 |
+
- Upload an image and get a numerical face embedding vector.
|
| 31 |
+
- Useful for storing face representations or running offline comparisons.
|
| 32 |
+
|
| 33 |
+
2. **Match Faces**
|
| 34 |
+
- Upload a target face image and multiple candidate images.
|
| 35 |
+
- Quickly identify which candidates match the target face.
|
| 36 |
+
- Returns similarity scores (0–100%).
|
| 37 |
+
|
| 38 |
+
---
|
| 39 |
+
|
| 40 |
+
## How to Use
|
| 41 |
+
|
| 42 |
+
1. **Extract Embedding**
|
| 43 |
+
- Go to the "Extract Embedding" tab.
|
| 44 |
+
- Upload an image with a clear face.
|
| 45 |
+
- Click **Extract** to get the embedding.
|
| 46 |
+
|
| 47 |
+
2. **Match Faces**
|
| 48 |
+
- Go to the "Match Faces" tab.
|
| 49 |
+
- Upload a target image and up to 5 candidate images.
|
| 50 |
+
- Click **Match** to see which candidates match the target.
|
| 51 |
+
|
| 52 |
+
---
|
| 53 |
+
|
| 54 |
+
## Requirements
|
| 55 |
+
|
| 56 |
+
This Space uses the following Python packages:
|
| 57 |
+
|
| 58 |
+
- `gradio`
|
| 59 |
+
- `numpy`
|
| 60 |
+
- `opencv-python-headless`
|
| 61 |
+
- `insightface`
|
| 62 |
+
- `torch`
|
| 63 |
+
- `onnxruntime`
|
| 64 |
+
- `tensorflow-cpu`
|
| 65 |
+
|
| 66 |
+
> The `requirements.txt` is already included in the repository for automatic installation.
|
| 67 |
+
|
| 68 |
+
---
|
| 69 |
+
|
| 70 |
+
## Notes
|
| 71 |
+
|
| 72 |
+
- Works best with **single-face images** for extraction and matching.
|
| 73 |
+
- Candidate images without a detected face are ignored.
|
| 74 |
+
- Runs entirely in-memory—no images are stored on the server.
|
| 75 |
+
|
| 76 |
+
---
|
| 77 |
+
|
| 78 |
+
## References
|
| 79 |
+
|
| 80 |
+
- [InsightFace GitHub](https://github.com/deepinsight/insightface)
|
| 81 |
+
- [Gradio Docs](https://gradio.app)
|
| 82 |
+
- [Hugging Face Spaces Configuration Reference](https://huggingface.co/docs/hub/spaces-config-reference)
|