Skip to content
프로젝트

WuJie1010/Facial-Expression-Recognition.Pytorch

GitHub에서 보기

WuJie1010/Facial-Expression-Recognition.Pytorch has 1,979 GitHub stars and 562 forks. GitHot measured 0 stars in 24 hours, +1 in 7 days, and 0 in 15 days. Last checked 2026-11-24 17:59 UTC. Last push 2021-06-14.

이 수치를 측정하는 방법

측정된 스타 증가

in 24h
0
in 7 days
+1
in 15 days
0
in 1 month
기록 수집 중

서로 겹치는 기간의 순증가량이며 일별 합계가 아닙니다. 측정값이 없으면 비워 둡니다. 스타는 관심도를 나타내며 품질을 보장하지 않습니다.

소개

얼굴 표정 인식을 위한 CNN 기반 PyTorch 구현(FER2013 및 CK+)으로, FER2013에서 73.112%(최고 수준), CK+ 데이터셋에서 94.64%를 달성

머신러닝

README.md

Original

Facial-Expression-Recognition.Pytorch

A CNN based pytorch implementation on facial expression recognition (FER2013 and CK+), achieving 73.112% (state-of-the-art) in FER2013 and 94.64% in CK+ dataset

Demos

Image text Image text

Dependencies

  • Python 2.7
  • Pytorch >=0.2.0
  • h5py (Preprocessing)
  • sklearn (plot confusion matrix)

Visualize for a test image by a pre-trained model

FER2013 Dataset

Preprocessing Fer2013

  • first download the dataset(fer2013.csv) then put it in the "data" folder, then
  • python preprocess_fer2013.py

Train and Eval model

  • python mainpro_FER.py --model VGG19 --bs 128 --lr 0.01

plot confusion matrix

  • python plot_fer2013_confusion_matrix.py --model VGG19 --split PrivateTest

fer2013 Accurary

  • Model: VGG19 ; PublicTest_acc: 71.496% ; PrivateTest_acc:73.112%
  • Model: Resnet18 ; PublicTest_acc: 71.190% ; PrivateTest_acc:72.973%

CK+ Dataset

  • The CK+ dataset is an extension of the CK dataset. It contains 327 labeled facial videos, We extracted the last three frames from each sequence in the CK+ dataset, which contains a total of 981 facial expressions. we use 10-fold Cross validation in the experiment.

Train and Eval model for a fold

  • python mainpro_CK+.py --model VGG19 --bs 128 --lr 0.01 --fold 1

Train and Eval model for all 10 fold

  • python k_fold_train.py

plot confusion matrix for all fold

  • python plot_CK+_confusion_matrix.py --model VGG19

CK+ Accurary

  • Model: VGG19 ; Test_acc: 94.646%
  • Model: Resnet18 ; Test_acc: 94.040%

관련 프로젝트 살펴보기

불러오는 중…