A face authentication system using traditional image processing techniques.
This project was developed as the final project for the "Introduction to Image Processing" course at National Dong Hwa University (NDHU). The goal was to implement a face authentication system using classical image processing techniques without relying on deep learning models.
It uses facial landmark detection, alignment, and feature normalization to compare facial features based on Euclidean distance.
- Face alignment based on eye landmarks
- Symmetric feature adjustment for consistent representation
- Euclidean distance-based face matching
- Threshold optimization to improve recognition performance
- Performance evaluation using accuracy, precision, recall, and F1-score
The dataset consists of two main directories:
Face_DB/ (Authorized faces)
Images/→ Frontal face images (e.g.,NAME_000.jpg)Landmark_data/→ Corresponding landmark CSV files
Test_DB/ (Test images)
Images/→ Face images at different anglesLandmark_data/→ Landmark CSVs for each test image
Each person has 6 test images, totaling 90 test samples.
- Faces were aligned using eye landmarks to ensure consistency.
- Each landmark was mirrored and adjusted to reduce asymmetry caused by angle variations.
- Jawline excluded to prevent distortions.
- Relative distances between landmarks used instead of absolute positions.
- Feature distances were normalized using the width of the left eye.
- Euclidean distance was computed between the aligned and normalized feature vectors.
- Thresholds were tested between 50 and 120 to optimize results.
- Best threshold: 73 (Selected based on F1-score).
| Metric | Value |
|---|---|
| Accuracy | 52.22% |
| Precision | 57.69% |
| Recall | 58.82% |
| F1-score | 58.25% |
| Scenario | Test Image | Predicted Person | Verdict |
|---|---|---|---|
| ✅ Correct Match | Chloe_001.jpg |
Chloe |
✔️ Accepted |
| ❌ False Positive | Ethan_002.jpg |
Sebastian |
❌ Imposter Accepted |
| ❌ Wrong Identity | Zoe_000.jpg |
Chloe |
❌ Misclassified |
| ✅ Correct Rejection | Lucas_004.jpg |
— | ✔️ Rejected |
| ❌ False Rejection | Wyatt_004.jpg |
— | ❌ Incorrectly Rejected |
git clone https://github.com/chitsip149/face-recognition.git
cd "411021365 Nguyen Minh Trang"pip install -r requirements.txtpython face_auth.pypython evaluate.py- Preprocessing (alignment & normalization) is critical in face recogition.
- Feature selection (excluding jawline) improves robustness to angles.
- Euclidean distance works for simple comparisons but has limitations.
- Empirical evaluation helps fine-tune parameters like the threshold.
- Use machine learning models (e.g., SVM, k-NN) for improved classification.
- Apply deep learning (CNNs, OpenCV DNN, or FaceNet) for robust face recognition.
- Optimizr featue selection using principal component analysis (PCA).
- Expand dataset to test on more diverse facial variations.
This project is licensed under the MIT License.