Skip to content

Facial-Expression-Recognition in TensorFlow. Detecting faces in video and recognize the expression(emotion).

License

Notifications You must be signed in to change notification settings

westYY123/Facial-Expression-Recognition

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

amazing

Opensource deep learning framework TensorFlow is used in Facial Expression Recognition(FER). The trained models achieved 65% accuracy in fer2013. If you like this, please give me a star.

Dependencies

FER requires:

Only tested in Ubuntu and macOS Sierra. Other platforms are not sure work well. When problems meet, open an issue, I'll do my best to solve that.

Usage

demo

To run the demo, just type:

python3 main.py

Then the program will creat a window to display the scene capture by webcamera. You need press SPACE key to capture face in current frame and recognize the facial expression.

If you just want to run this demo instead of training the model from scaratch, the following content can be skipped.

train models

If you want to train a model from scaratch by yourself, download the fer2013 datasets in kaggle(91.97MB). Then extract the data to data/fer2013 folder.

It's is import that modifying the MODE(in main.py) from demo to train before you start training. Then type:

python3 main.py

Issues & Suggestions

If any issues and suggestions to me, you can create an issue.

Some tips for who want to use this in 2020 There are many differences between tensorflow2.0 and tensorflow1.x, the latter one is uesd by this project, so this means, if you don't modify codes to tensorflow2.0 style, it's better to look at some tips as follows: 1: please download python which version is previous version of 3.8, as i tested, only 3.8 can not use opencv module. 2: tensorflow2.0 will occured some attributes wrong since this project used tensorflow 1.x, i tried tensorflow1.14. 3: please add 1 line after all of the import :import os os.environ["KMP_DUPLICATE_LIB_OK"] = "TRUE". because of some reason i don't know, this can avoid some operation system errors. 4: for some complex reason, you can change import tensorflow as tf to import tensorflow.compat.v1 as tf

About

Facial-Expression-Recognition in TensorFlow. Detecting faces in video and recognize the expression(emotion).

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 100.0%