🎓 B.Tech in Computer Science Engineering
🤖 AI & Machine Learning Intern
📍 Bhubaneswar, Odisha, India
📧 journeywithasis@gmail.com
💼 LinkedIn |
🐙 GitHub
This project implements a Face Recognition System using Principal Component Analysis (PCA) for feature extraction and Machine Learning classifiers such as:
- 🧠 Artificial Neural Network (ANN)
- 📈 Support Vector Machine (SVM)
- 📊 K-Nearest Neighbors (KNN)
The system is designed to be efficient, accurate, and explainable, making it ideal for academic use, portfolios, and real-world prototypes.
Traditional face recognition systems suffer from high dimensionality and computational cost. This project addresses these challenges by using Principal Component Analysis (PCA) to reduce feature dimensions and Artificial Neural Networks (ANN) for accurate classification.
- PCA reduces noise and redundancy in face images
- ANN learns non-linear decision boundaries
- Combination improves accuracy with low computation
- Attendance systems
- Access control & security
- Surveillance systems
- Smart classrooms
- Identity verification
-
Clone repository git clone https://raw.githubusercontent.com/asis027/face-recognition-pca-ann-project/main/.devcontainer/pca-ann-face-project-recognition-v2.9.zip cd face-recognition-pca-ann-project
-
Install dependencies pip install -r requirements.txt
-
Train the model python train.py
-
Evaluate the model python evaluate.py
-
Predict a face python predict.py --image test.jpg
dataset/ ├── person1/ │ ├── img1.jpg │ ├── img2.jpg ├── person2/ │ ├── img1.jpg │ ├── img2.jpg
- ANN performed best due to non-linear learning capability.
- SVM showed stable performance on smaller PCA components.
- KNN accuracy dropped as dimensionality increased.
| Model | Accuracy | Precision | Recall | F1-Score |
|---|---|---|---|---|
| PCA + ANN | 92.3% | 0.91 | 0.92 | 0.91 |
| PCA + SVM | 90.1% | 0.89 | 0.90 | 0.89 |
| PCA + KNN | 85.6% | 0.84 | 0.85 | 0.84 |
✔ PCA-based dimensionality reduction (Eigenfaces)
✔ Multiple classifiers: ANN, SVM, KNN
✔ Confidence-based unknown face detection
✔ Clean modular Python code
✔ Train / Test split with evaluation
✔ Confusion matrix & performance metrics
✔ Eigenfaces visualization
✔ Production-ready GitHub structure
| Category | Tools |
|---|---|
| Programming | Python |
| Image Processing | OpenCV |
| Machine Learning | Scikit-learn |
| Data Handling | NumPy |
| Visualization | Matplotlib |
| Version Control | Git & GitHub |
This project implements a Face Recognition System using classical Machine Learning techniques.
Instead of deep learning, it focuses on explainable and efficient algorithms, making it ideal for:
🎓 Academic projects
💼 Resume & portfolio
🧪 Machine Learning fundamentals
1️⃣ A face image is taken as input
2️⃣ Image is converted to grayscale and resized
3️⃣ PCA (Principal Component Analysis) extracts important facial features called Eigenfaces
4️⃣ The reduced feature vector is passed to a classifier
5️⃣ Classifier predicts the identity or marks it as Unknown
- Reduces image dimensionality
- Removes redundant information
- Improves speed and accuracy
- ANN (Artificial Neural Network): Learns complex patterns
- SVM (Support Vector Machine): Works well on small datasets
- KNN (K-Nearest Neighbors): Simple distance-based approach
✅ PCA-based Eigenface extraction
✅ Multiple classifiers (ANN / SVM / KNN)
✅ Unknown face detection using confidence threshold
✅ Clean modular Python code
✅ Train–test split for evaluation
✅ Confusion matrix & performance metrics
✅ Eigenfaces visualization
✅ Production-ready GitHub structure
The system architecture describes the complete workflow of the face recognition process, from image input to final prediction. Input Face Image
- Input Face Image: The system takes a facial image as input.
- Preprocessing: Image is converted to grayscale and resized for consistency.
- PCA (Eigenfaces): Important facial features are extracted while reducing dimensionality.
- Feature Vector: The reduced representation of the face image.
- Classifier: ANN, SVM, or KNN predicts the identity.
- Output: The person is recognized or marked as unknown using a confidence threshold.
