A real-time AI application capable of identifying people and analyzing their age, gender, and emotion using deep learning models.
- Real-Time Recognition
- Instant face detection and identification from webcam feed
- Smooth rendering decoupled from heavy model inference
- Deep Attribute Analysis
- Age Estimation – Predicts approximate age
- Gender Detection – Classifies gender with high confidence
- Emotion Recognition – Detects current facial expression
- Custom Dataset Tools
- Built-in capture made to easily create training data
- Automated training pipeline for new faces
- Performance Optimized
- Multi-threaded architecture for lag-free video
- Fast Haar Cascade detection + DeepFace accuracy
-
Clone the repository:
git clone https://github.com/DavitEgoian/deepface-face-recognition-age-gender-emotion.git cd deepface-face-recognition-age-gender-emotion -
Install dependencies:
pip install deepface opencv-python numpy tf-keras
-
Run the application:
python face-recog.py
When the script runs, select an option from the menu:
-
Create Face Dataset
- Enter a name (e.g., "Alex").
- The camera will capture 200 images automatically.
- Images are saved in
Dataset/Alex/.
-
Train Face Dataset
- Processes all images in the
Dataset/folder. - Generates embeddings and saves them to
embeddings.npy. - Run this after adding any new person.
- Processes all images in the
-
Recognize Faces
- Opens the webcam window.
- Detects faces and overlays Name, Age, Gender, and Emotion.
- Press 'q' to quit.
This project is licensed under the MIT License.