Skip to content

Developed a convolutional neural network (CNN) utilizing FaceNet to detect and identify multiple faces in an image with high accuracy.

Notifications You must be signed in to change notification settings

Ebrizzzz/Face-Recognition-with-CNN

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Face Recognition using CNN and FaceNet

Python Deep Learning Accuracy

A deep learning-based CBIR system for face recognition using CNNs, VGG16, and FaceNet, optimized for celebrity face retrieval and classification.

Full, Detailed report and walkthrough is available in Report.pdf

📁 Dataset

Source: Celebrity Face Dataset (Kaggle)
Structure:

  • 31 celebrity folders (e.g., Henry Cavill, Natalie Portman)
  • 50–150 images per class (varied poses/lighting)
  • Cropped faces using MTCNN for focus

🛠️ Methodology

1. Custom CNN

  • Architecture:
    Conv2D → MaxPooling → BatchNorm → Dropout → Dense
  • Training:
    • 3 classes (Henry Cavill, Natalie Portman, Robert Downey Jr.)
    • 30 epochs, Adam optimizer
    • Accuracy: 81.48% (test set)

2. VGG16 Transfer Learning

  • Preprocessing: Data augmentation (rotation, flip, brightness)
  • Fine-tuning:
    • Frozen base layers + custom dense layers
    • Accuracy: 92.59% (test set)
  • Limitation: Overconfidence in misclassifications

3. FaceNet + SVM

  • Embeddings: 128D face features extracted via FaceNet
  • Classifier: SVM with linear kernel
  • Accuracy: 99.63% (test set)
  • Key Advantage: Robust to pose/lighting variations

📊 Key Results

Model Test Accuracy F1-Score Specialization
Custom CNN 81.48% 0.81 Basic face recognition
VGG16 92.59% 0.93 Transfer learning
FaceNet+SVM 99.63% 0.99 State-of-the-art performance

💻 How to Run

  1. Install dependencies:
pip install tensorflow keras-facenet scikit-learn mtcnn opencv-python matplotlib

About

Developed a convolutional neural network (CNN) utilizing FaceNet to detect and identify multiple faces in an image with high accuracy.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages