All Projects → truongnmt → multi-task-learning

truongnmt / multi-task-learning

Licence: MIT license
Multi-task learning smile detection, age and gender classification on GENKI4k, IMDB-Wiki dataset.

Programming Languages

Jupyter Notebook
11667 projects
python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to multi-task-learning

AgeEstimateAdience
Age and Gender Estimation Using Convolutional Neural Network
Stars: ✭ 42 (-72.73%)
Mutual labels:  age, age-estimation
pytorch-DEX
Pytorch implementation of DEX: Deep EXpectation of apparent age from a single image
Stars: ✭ 61 (-60.39%)
Mutual labels:  gender, age
namsor-python-sdk2
NamSor API v2 Python SDK - classify personal names accurately by gender, country of origin, or ethnicity.
Stars: ✭ 23 (-85.06%)
Mutual labels:  gender, gender-classification
javacv-cnn-example
A example to demonstrate the usage of JavaCV and CNN for gender and age recognition
Stars: ✭ 24 (-84.42%)
Mutual labels:  gender, age
FaceIDLight
A lightweight face-recognition toolbox and pipeline based on tensorflow-lite
Stars: ✭ 17 (-88.96%)
Mutual labels:  face, mtcnn
age-and-gender
Predict Age and Gender of people from images | Determination of gender and age
Stars: ✭ 68 (-55.84%)
Mutual labels:  gender-classification, age-estimation
Face Track Detect Extract
💎 Detect , track and extract the optimal face in multi-target faces (exclude side face and select the optimal face).
Stars: ✭ 434 (+181.82%)
Mutual labels:  face, mtcnn
PSCognitiveService
Powershell module to access Microsoft Azure Machine learning RESTful API's or Microsoft cognitive services
Stars: ✭ 46 (-70.13%)
Mutual labels:  face, gender
Raspberrypi Facedetection Mtcnn Caffe With Motion
MTCNN with Motion Detection, on Raspberry Pi with Love
Stars: ✭ 204 (+32.47%)
Mutual labels:  face, mtcnn
Mtcnn
MTCNN face detection implementation for TensorFlow, as a PIP package.
Stars: ✭ 1,689 (+996.75%)
Mutual labels:  face, mtcnn
Mtcnn
face detection and alignment with mtcnn
Stars: ✭ 66 (-57.14%)
Mutual labels:  face, mtcnn
Face-Recognition-FaceNet
A python script label faces in group photos using Facenet. 🎉
Stars: ✭ 21 (-86.36%)
Mutual labels:  face, mtcnn
emotion-and-gender-classification
2 networks to recognition gender and emotion; face detection using Opencv or Mtcnn
Stars: ✭ 21 (-86.36%)
Mutual labels:  age, gender-classification
android mtcnn insightface face recognize
detect face with mtcnn and embedder with insightface
Stars: ✭ 64 (-58.44%)
Mutual labels:  face, mtcnn
ARFaceFilter
Javascript/WebGL lightweight face tracking library designed for augmented reality webcam filters. Features : multiple faces detection, rotation, mouth opening. Various integration examples are provided (Three.js, Babylon.js, FaceSwap, Canvas2D, CSS3D...).
Stars: ✭ 72 (-53.25%)
Mutual labels:  face
idpt
Internet-Delivered Psychological Therapy (IDPT) System.
Stars: ✭ 24 (-84.42%)
Mutual labels:  face
AlphaTree-graphic-deep-neural-network
AI Roadmap:机器学习(Machine Learning)、深度学习(Deep Learning)、对抗神经网络(GAN),图神经网络(GNN),NLP,大数据相关的发展路书(roadmap), 并附海量源码(python,pytorch)带大家消化基本知识点,突破面试,完成从新手到合格工程师的跨越,其中深度学习相关论文附有tensorflow caffe官方源码,应用部分含推荐算法和知识图谱
Stars: ✭ 2,221 (+1342.21%)
Mutual labels:  image-classification
TNCR Dataset
Deep learning, Convolutional neural networks, Image processing, Document processing, Table detection, Page object detection, Table classification. https://www.sciencedirect.com/science/article/pii/S0925231221018142
Stars: ✭ 37 (-75.97%)
Mutual labels:  image-classification
TFLite-Android-Helper
TensorFlow Lite Helper for Android to help getting started with TesnorFlow.
Stars: ✭ 25 (-83.77%)
Mutual labels:  image-classification
ros2-tensorflow
ROS2 nodes for computer vision tasks in Tensorflow
Stars: ✭ 41 (-73.38%)
Mutual labels:  image-classification

Smile detection, gender and age estimation using Multi-task Learning

On the original paper DEX: Deep EXpectation the authors were able to display remarkable results in classifying the age of an individual based on a given image alone.

Let see how accuracy (bad I guess), with limited resources, we can get with self-construct architecture. And not only age, we also classifying gender and smile by using multi-task training technique.

Dependencies

  • Python 3.x
  • OpenCV 2
  • tensorflow
  • numpy
  • pandas
  • matplotlib
  • scipy
  • seaborn
  • MTCNN for face detection

Usage

Download datasets

First download GENKI4K and IMDB-WIKI (cropped face version) dataset.

Preprocess data

First run imdb-preprocess.ipynb. This step preprocess IMDB-WIKI dataset, filter out images with more than one face, gender is NaN and invalid age. All saved in a pickle file.

Next run prepare-data.ipynb. This will split two datasets in to training parts and test parts. The IMDB-WIKI dataset we will split into two separate datasets, gender and age datasets. So we have 3 datasets: age gender age. Each file will run into MTCNN network to detect and crop face, resize to 48x48 and convert to gray, then all datasets are saved into pickle files.

Training

Run CNN2Head_train.ipynb, using exponential decay to reduce learning rate over time. Change your datasets folder links, training parameters in const.py. Tensorboard's log will be saved in summary folder, training result in each batch is written in log.csv.

WEIGHT_INIT = 0.01
NUM_TASKS = 3
IMG_SIZE = 48
INIT_LR = 0.01
USE_BN = True
BN_DECAY = 0.99
EPSILON = 0.001
WEIGHT_DECAY = 0.01
DECAY_STEP = 1000
DECAY_LR_RATE = 0.95
BATCH_SIZE = 128

USE_GPU = True
SAVE_FOLDER = './save/current/'
NUM_EPOCHS = 2000
DROP_OUT_PROB = 0.5

Evaluation

Run evaluate.ipynb to evaluate learned model on test datasets.

Testing

For single file, see test.ipynb file for more example. demo single file

For demo on webcam, run demo.py file.

TODO

  • Augmentation for balanced label, reduce overfitting
  • Improve accuracy

References and Acknowledgments

This code is part of my GR project at HUST University. Following papers and codes are referred:

  1. Dinh Viet Sang, Le Tran Bao Cuong, and Do Phan Thuan. 2017., Facial Smile Detection Using Convolutional Neural Networks. In The 9th International Conference on Knowledge and Systems Engineering (KSE 2017). 138–143.
  2. Dinh Viet Sang, Le Tran Bao Cuong, Pham Thai Ha, Multi-task learning for smile detection, emotion recognition and gender classification, December 2017
  3. IMDB-WIKI: trying a small model for age classification
  4. MultiTask-MergeDataset - Le Tran Bao Cuong
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].