+0
Daily
5,733
stars
1,603
forks
224
watchers
41
prs
124
issues
0
releases
README
This repository is deprecated for at TF-2.0 rewrite visit: https://github.com/oarriaga/paz ------------------------------------------------ Face classification and detection. Real-time face detection and emotion/gender classification using fer2013/IMDB datasets with a keras CNN model and openCV. IMDB gender classification test accuracy: 96%. fer2013 emotion classification test accuracy: 66%. For more information please consult the publication Emotion/gender examples: !alt tag Guided back-prop !alt tag Real-time demo: B-IT-BOTS robotics team :) !alt tag Instructions Run real-time emotion demo: python3 video_emotion_color_demo.py Run real-time guided back-prop demo: python3 image_gradcam_demo.py Make inference on single images: python3 image_emotion_gender_demo.py e.g. python3 image_emotion_gender_demo.py ../images/test_image.jpg Running with Docker With a few steps one can get its own face classification and detection running. Follow the commands below: docker pull ekholabs/face-classifier docker run -d -p 8084:8084 --name=face-classifier ekholabs/face-classifier curl -v -F image=@[path_to_image] http://localhost:8084/classifyImage image.png To train previous/new models for emotion classification: Download the fer2013.tar.gz file from here Move the downloaded file to the datasets directory inside this repository. Untar the file: tar -xzf fer2013.tar Run the train_emotion_classification.py file python3 train_emotion_classifier.py To train previous/new models for gender classification: Download the imdb_crop.tar file from here (It's the 7GB button with the tittle Download faces only). Move the downloaded file to the datasets directory inside this repository. Untar the file: tar -xfv imdb_crop.tar Run the train_gender_classification.py file python3 train_gender_classifier.py
Top issues
#37Face next to frame edge problems.9 comments · 2017-10-24#115ImportError: cannot import name 'imread'4 comments · 2019-06-20#76image_gradcam_demo.py4 comments · 2018-06-18#137Does not return any inference or gender sometimes.2 comments · 2020-05-07#124Can't run application with docker2 comments · 2019-10-24#93ValueError: color_mode must be "grayscale", "rbg", or "rgba"2 comments · 2018-10-22#91UnboundLocalError: local variable 'name' referenced before assignment2 comments · 2018-10-03#62K.gradients got None in grad_cam.py line 1152 comments · 2018-04-10