Skip to content

vvduc1803/Gender-Age-Emotion-Recognition

Repository files navigation

MasterHead

Recognition: Gender👫 - Age👶🧓 Emotion😁😲😨😠😢


Pytorch: Gender Age and Emotion Recognition

A model merge of 3 small model based on Efficient Net B4, Efficient Net B0 and SR CNN architecture using pytorch. Here, i use 2 custom dataset: gender and age dataset and emotion dataset .

Workflow

I. Build model for Gender and Age recognition task by a Multi-task model: Result

II. Build model for Emotion recognition task: Result

III. Merge them and use Mediapipe, Opencv library for recognition

Dependencies

  • Mediapipe
  • Opencv
  • Numpy
  • Python3
  • Pytorch
pip install mediapipe    # mediapipe library
pip install opencv       # opencv library
pip instal numpy         # numpy library
pip instal pytorch       # pytorch library
pip install torchsummary # summary
pip install torchvision  # pytorch for vision

NB: Update the libraries to their latest versions before training.

How to run


⬇️⬇️Download and extract all my train dataset on Kaggle: Gender and Age Dataset

⬇️⬇️Download pretrained model: Model

Run the following scripts for training and/or testing

python train.py # For training the model 

dockerdockerDocker Image

Run the following scripts for visual result of model:

1. Download Docker

Open CMD

2. Download my image

docker pull vvduc1803/gender_age_emotion:latest                                  # Pull image

3. Copy and paste

docker run -it -d --name gender_age_emotion vvduc1803/gender_age_emotion  # Run container

4. Copy and paste

docker run gender_age_emotion                                             # Run visual result

Sample outputs

Recognition results

Screenshot Screenshot Screenshot Screenshot


Todo

  1. Experiments with different learning-rate and optimizers.
  2. Converting and optimizing pytorch models for mobile deployment.

Authors

Van Duc

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published