- Introduction
- Features
- Installation
- Usage
- Dataset
- Model Architecture
- Results
- Contributing
- Acknowledgements
Facial Emotion Recognition is a project aimed at identifying human emotions from facial expressions in images or video sequences using deep learning techniques. The emotions recognized include happiness, sadness, surprise, anger, fear, disgust and neutral.
- Pre-trained models for quick setup
- Easy to train on custom datasets
- REST API for easy integration and testing
- Supports images
- Detailed results visualization
-
Clone the repository:
git clone https://github.com/melllinia/FacialExpressionRecognition.git cd FacialExpressionRecognition/source -
Create a virtual environment and activate it:
python -m venv venv source venv/bin/activate # On Windows use `venv\Scripts\activate`
-
Install the required packages:
pip3 install -r requirements.txt
To start the REST API server, run:
uvicorn server.controllers::appThe APIs will be available at http://127.0.0.1:8000/. The Swagger UI will be available at http://127.0.0.1:8000/docs.
Emotion Recognition from Image with Probabilities Response
- Endpoint:
/model/detect-emotion/ - Method: POST
- Response: The list of probabilities of emotions with corresponding face coordinates
Emotion Recognition from Image with Image Response
- Endpoint:
/model/detect-emotion/image - Method: POST
- Response: Annotated image
The model can be trained on various facial emotion datasets such as FER2013, CK+, etc. Make sure to download and place the dataset in the appropriate directory and update the path in the configuration file.
The model uses a convolutional neural network (CNN) based architecture for feature extraction and emotion classification. The architecture can be customized by modifying the model/net.py file.
Our pre-trained model achieves the following accuracy on the FER2013 dataset:
- Accuracy: 55%
Contributions are welcome! Please follow these steps to contribute:
- Fork the repository.
- Create a new branch:
git checkout -b feature-branch-name. - Make your changes and commit them:
git commit -m 'Add some feature'. - Push to the branch:
git push origin feature-branch-name. - Open a pull request.
Please make sure your code follows the project's coding standards and includes proper documentation.
For any queries, please contact [email protected] or [email protected].
Keep innovating! 💡🚀