face_classification

Real-time face detection and emotion/gender classification using fer2013/imdb datasets with a keras CNN model and openCV.

  • 所有者: oarriaga/face_classification
  • 平台:
  • 许可证: MIT License
  • 分类:
  • 主题:
  • 喜欢:
    0
      比较:

Github星跟踪图

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 <image_path>

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

主要指标

概览
名称与所有者oarriaga/face_classification
主编程语言Python
编程语言Python (语言数: 2)
平台
许可证MIT License
所有者活动
创建于2017-02-09 14:44:32
推送于2024-03-08 20:04:21
最后一次提交2020-10-29 08:11:23
发布数1
最新版本名称v1.0 (发布于 )
第一版名称v1.0 (发布于 )
用户参与
星数5.7k
关注者数228
派生数1.6k
提交数147
已启用问题?
问题数124
打开的问题数43
拉请求数6
打开的拉请求数12
关闭的拉请求数23
项目设置
已启用Wiki?
已存档?
是复刻?
已锁定?
是镜像?
是私有?