Skip to content

shrenik-jain/face-physiognomy

Repository files navigation

Face Physiognomy

An AI-Powered technology that analyzes facial expressions from static images as well as video feed in order to reveal information about the subject’s emotional state. It is a hybrid model which follows of two steps. The first step is detecting faces from the given image using the Haar Cascades object detector. The second step uses a Deep Convolutional Neural Network (DCNN) to extract features from the face for the purpose of classifying the emotion of the subject as happy, sad, angry, neutral or surprised.

Please give a star if you like the project.


Dataset

The dataset used to train the model: https://www.kaggle.com/datasets/msambare/fer2013


Quick Start

  • Create a virtual environment following the steps provided here
  • All the requirements can be installed by running pip3 install -r requirements.txt
  • Running the command python3 app.py would locally start the website

Docker Usage

To use the application via docker

  • docker pull shrenikjainn9/face-physiognomy:latest
  • docker run -p 5000:5000 shrenikjainn9/face-physiognomy:latest

Results

Upon running app.py, the results are as shown below. (Refer ./static/created_images/)




Repository Structure

├── app.py
├── Dockerfile
├── Jenkinsfile
│
├── model_config
│   ├── model.json
│   └── model_weights.h5
│
├── notebooks
│   ├── Model_Training.ipynb
│   └── model_training.py
│
├── Procfile
│
├── static
│   ├── assets
│   │   ├── css
│   │   ├── fonts
│   │   ├── images
│   │   └── js
│   │
│   └── created_images
│
├── templates
│   ├── image_upload.html
│   └── index.html
│
└── utils
    ├── camera.py
    └── model.py

Contributing

Contributions are welcome! If you find any issues or have suggestions for improvements, please open an issue or submit a pull request. For major changes, it's recommended to discuss them first by opening an issue.

To contribute to this project:

  1. Fork the repository
  2. Create a new branch for your feature or bug fix
  3. Make your changes and commit them with descriptive commit messages
  4. Push your changes to your forked repository
  5. Submit a pull request to the main repository

Please ensure that your code follows the project's coding style and that you have added relevant tests and documentation.


License

This project is licensed under the MIT License.


References

Contact

If you have any questions, suggestions, or feedback, feel free to reach out to me through email or visit my website.


Developed by Shrenik Jain