This project aims to classify human emotions from facial images using Histogram of Oriented Gradients (HOG) for feature extraction and Support Vector Machine (SVM) for classification. The dataset consists of grayscale facial images categorized into seven emotion classes:
😃 Happy | 😠 Angry | 😢 Sad | 😲 Surprise | 😐 Neutral | 😨 Fear | 🤢 Disgust
- Preprocessing: Converts images to grayscale and normalizes them.
- Feature Extraction: Uses HOG descriptors to capture facial structure.
- Classification: Implements an SVM classifier for emotion recognition.
- Dataset Handling: Uses Keras ImageDataGenerator for loading images.
- Python
- OpenCV
- scikit-image (for HOG features)
- scikit-learn (for SVM classifier)
- TensorFlow/Keras (for dataset handling)
- NumPy & Pandas
- Clone the repository:
git clone https://github.com/MohaYass92/Emotion-Recognition.git cd Emotion-Recognition - Install dependencies:
pip install -r requirements.txt
- Train the model:
python main.py
The model is trained on 28,709 images and tested on 7,178 images. Training performance depends on feature extraction time and SVM parameters.
✅ Improve feature extraction speed
✅ Optimize SVM parameters
🔲 Implement CNN for better accuracy
🔲 Deploy as a web app