xionghc / Facial-Expression-Recognition

Facial-Expression-Recognition in TensorFlow. Detecting faces in video and recognize the expression(emotion).
GNU General Public License v3.0
637 stars 190 forks source link

Making it real-time #26

Open Hemantr05 opened 5 years ago

Hemantr05 commented 5 years ago

How can I make this real-time, that is, if i want the expressions to be detected without pressing the Space Key? Also, how do I enlarge the graph(shown on the left side of the screen)?

Thanks in advance

LeonardNiu commented 5 years ago

I try it, just modify demo.py file, the demo function.

if cv2.waitKey(1) & 0xFF == ord(' '):
change into if cv2.waitKey(20):

You can change the parameter of waitKey(), difference value will have different recognition refreshment.

Hemantr05 commented 5 years ago

Thank you.

@LeonardNiu How do we change the readings on the bar graph shown on the LHS corner of the screen?

LeonardNiu commented 5 years ago

same, in the demo.py, function demo: cv2.putText(frame, emotion, (10, index * 20 + 20), cv2.FONT_HERSHEY_PLAIN, 0.5, (0, 255, 0), 1) variable emotion refers to the readings such as anger, happy. Just change it. BTW, can you leave the email? I happen to notice that you create a repertory about GAN, I'm also interested in it, as well as DL.

liuhuihuii commented 5 years ago

txs @LeonardNiu make it real_time.

Hemantr05 commented 5 years ago

same, in the demo.py, function demo: cv2.putText(frame, emotion, (10, index * 20 + 20), cv2.FONT_HERSHEY_PLAIN, 0.5, (0, 255, 0), 1) variable emotion refers to the readings such as anger, happy. Just change it. BTW, can you leave the email? I happen to notice that you create a repertory about GAN, I'm also interested in it, as well as DL.

What's your email? Will drop in a mail

LeonardNiu commented 5 years ago

same, in the demo.py, function demo: cv2.putText(frame, emotion, (10, index * 20 + 20), cv2.FONT_HERSHEY_PLAIN, 0.5, (0, 255, 0), 1) variable emotion refers to the readings such as anger, happy. Just change it. BTW, can you leave the email? I happen to notice that you create a repertory about GAN, I'm also interested in it, as well as DL.

What's your email? Will drop in a mail

I got your Email in your github homepage. Is basketballlife600@gmail.com your Email? I've already sent one, but not got reply : (