百科.dev
全部条目AI 编程趋势榜开源项目技术资讯提交条目
登录
< 返回工具列表
F

face_classification

> 编程语言
开源

使用 fer2013/imdb 数据集、keras CNN 模型和 openCV 进行实时人脸检测和情绪/性别分类。

5.7K stars0 点赞0 次浏览
访问官网GitHub

工具介绍

使用 fer2013/imdb 数据集、keras CNN 模型和 openCV 进行实时人脸检测和情绪/性别分类。

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:

Guided back-prop

Real-time demo:

B-IT-BOTS robotics team :)

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

GitHub Issues· 0 开放

在 GitHub 查看全部

暂无开放 Issues,或尚未同步最近议题。

核心特点

  • •IMDB gender classification test accuracy: 96%.
  • •fer2013 emotion classification test accuracy: 66%.
  • •``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``
  • •Download the fer2013.tar.gz file from here
  • •Move the downloaded file to the datasets directory inside this repository.
  • •Untar the file:
  • •Run the train_emotion_classification.py file
  • •Download the imdb_crop.tar file from here (It's the 7GB button with the tittle Download faces only).

> 标签

Python

暂无评论,来聊聊你的看法吧

> 工具信息

发布日期2026年8月1日
最后更新2026年9月17日
分类编程语言
定价开源

> 相关工具

T
TypeScript
JavaScript 的超集,为前端与全栈提供静态类型
P
Python
通用编程语言,广泛用于 Web、数据与 AI
G
Go
Google 推出的简洁高效系统语言