Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issues in real_time_video.py #1

Closed
nadiamahzan opened this issue Apr 16, 2019 · 2 comments
Closed

Issues in real_time_video.py #1

nadiamahzan opened this issue Apr 16, 2019 · 2 comments

Comments

@nadiamahzan
Copy link

Hi, i have run the train_emotion_classifier.py data but with shorter data of fer_2013 where i only took 10 datasets for each emotions and each usage. it trains normally but when i try to run the real_time_video.py, it kept on giving this error:

Traceback (most recent call last):
File "real_time_video.py", line 49, in
for (i, (emotion, prob)) in enumerate(zip(EMOTIONS, preds)):
NameError: name 'preds' is not defined
[ WARN:1] terminating async callback

Can u help me with this issue? Your help is very much appreciated, thanks.

@abhijeet3922
Copy link
Owner

I remember I faced this error quite a time while i was experimenting. You would need to debug the "preds" variable. Looking at the code, I feel “preds” variable is getting intialized in side “if len(faces) > 0:” code block.
It may be the case that faces are not getting detected in your system and hence the “preds” variable is not initialized which leads to that error.
Let me know if you are able to debug it.

@abhijeet3922
Copy link
Owner

Here is the solution.

otaha178/Emotion-recognition#1 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants