Resource icon

Emotion Recognition&Avatar 0.1

andrewsoncha

New Member
andrewsoncha submitted a new resource:

Emotion Recognition&Avatar - A Python script that recognizes facial expressions and displays a corresponding avatar image.

A Python script that recognizes facial expressions and displays an avatar image accordingly.

Demonstration video

Uses tensorflow, keras, and opencv to recognize facial expressions from camera.
Uses pygrabber to get a list of webcams available.

Currently, the script only recognizes 7 emotions: Anger, Disgust, Fearful, Happiness, Neutral, Sadness, Surprise.

Installation guide:
After downloading, run
pip install -r...

Read more about this resource...
 

harrie

New Member
This is really really cool! I use Honk for my avatar personally, so static images like this wouldn't work, but it does have hotkey functionality to change emotions. I wonder, is it possible to have it fire a hotkey on expression change instead of changing the directory? And maybe add a cooldown before a new expression can be detected so it doesn't switch back and forth? :0
 

Broke Man

New Member
Hey, I tested the program and it is very cool and functional too (just that I didn't know at first that you had to launch the script directly in OBS with Tools>script but now it's good).
I just had to make a modification in the code because keras does not work in Python 3.11, so you have to change in the file "emotionDetector.py" on line 9 the line "from keras.preprocessing.image import ImageDataGenerator" by "from tensorflow.keras.preprocessing.image import ImageDataGenerator" and you should be good.
Finally, the project look like abandoned but still I would like to ask if it would be possible to put an option to be able to "calibrate" the detector to our face? I say this because when I tested the program with my head, the image returned on OBS was most of the time the fearful one while I was neutral, and it detected my other facial expressions quite badly (for example it was almost impossible to activate the expression of joy and disgust). If anyone knows how to fix these problems that would be great!
 

andrewsoncha

New Member
Hi! Thank you for using my little project! My project was kind of abandoned due to personal reasons(I am in a place where I am not allowed to use a webcam at all) but I just changed the package import line in the emotionDetector code.
As for the sensitivity/inaccuracy of the emotion detection, I will only be able to try to fix/test it after this December.
However, I am open to having other people with a webcam help me test the code or even having other people contribute to the repo.

Thank you very much!
 
Top