Metadata-Version: 2.1
Name: nexface
Version: 0.0.9
Summary: A face recognition and embedding extraction library
Home-page: https://github.com/fatihdagdeviren/NexFace
Author: Fatih Dagdeviren
Author-email: fatihdagdeviren21@gmail.com
Classifier: Programming Language :: Python :: 3
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Requires-Python: >=3.6
Description-Content-Type: text/markdown
Requires-Dist: numpy
Requires-Dist: opencv-python==4.12.0.88
Requires-Dist: opencv-contrib-python==4.12.0.88
Requires-Dist: scikit-learn==1.7.0
Requires-Dist: onnx==1.18.0
Requires-Dist: hdbscan==0.8.40
Requires-Dist: typing-extensions
Requires-Dist: tensorflow==2.19.0


# NexFace

**NexFace** is a modular face recognition library built on top of modern deep learning models. It supports face detection, embedding extraction, clustering, and identification using ONNX, FaceNet, and Scikit-learn-compatible algorithms.

---

## 🚀 Features

- ✅ **Face Detection** (YuNet with OpenCV & ONNX)
- ✅ **Face Embedding Extraction** (FaceNet `.h5`)
- ✅ **Clustering** (DBSCAN & HDBSCAN)
- ✅ **Recognition via Prototypes**
- ✅ Clean and extensible object-oriented design

---

## 🧠 How It Works

1. **Face Detection**:  
   Uses YuNet ONNX model via `cv2.FaceDetectorYN`.

2. **Embedding Extraction**:  
   FaceNet model (Keras `.h5`) extracts 128-D facial embeddings.

3. **Clustering & Prototypes**:  
   Cluster face embeddings via DBSCAN or HDBSCAN.  
   Compute cluster centers (prototypes) for recognition.

4. **Recognition**:  
   New face embeddings are compared against cluster prototypes using cosine or Euclidean similarity.

---
> You can also install using `pip install -r requirements.txt`.

---

## 📌 To Do

- [ ] Add ArcFace / InsightFace support
- [ ] Improve alignment and augmentation
- [ ] Evaluation metrics (precision, recall, etc.)

---

## 🧑‍💻 Author

**Fatih Dağdeviren**  
[fatihdagdeviren21@gmail.com](mailto:fatihdagdeviren21@gmail.com)

GitHub: [github.com/fatihdagdeviren](https://github.com/fatihdagdeviren)
