xionghc / Facial-Expression-Recognition

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

how to load video files(.mp4 .avi) instead of camera #50

Open LeiiY opened 4 years ago

LeiiY commented 4 years ago

i changed demo.py

video_captor = cv2.VideoCapture('‪sample.mp4')

video_captor = cv2.VideoCapture(0)

but it did not work

qiaoshh commented 4 years ago

I have tested the videos, and worked well, if your video frames have only one channel, you must modify the load code, have you solved your problem?

LiuYeeJ commented 3 years ago

我已经测试过这些视频,并且效果很好,如果您的视频帧只有一个频道,则必须修改加载代码,是否已解决问题?

I don’t understand what you mean. Can you explain it in detail? Please forgive me if it disturbs you. I look forward to your reply. Thank you very much.

xionghc commented 3 years ago

我已经测试过这些视频,并且效果很好,如果您的视频帧只有一个频道,则必须修改加载代码,是否已解决问题?

I don’t understand what you mean. Can you explain it in detail? Please forgive me if it disturbs you. I look forward to your reply. Thank you very much.

What problem have you met?

LiuYeeJ commented 3 years ago

我已经测试过这些视频,并且效果很好,如果您的视频帧只有一个频道,则必须修改加载代码,是否已解决问题?

我不明白你的意思。你能详细解释一下吗?如果它打扰您了,请原谅我。我期待你的回复。非常感谢你。

你遇到什么问题了?

.hank you for your reply,The problem I am displaying may be caused by no camera, so I want to try to load the local video for identification。 The erro is 'NoneType' object has no attribute 'shape'. The question may be very simple and basic, or even a little stupid, but I can get a reply. Thank you very much. If I delay your time, I hope to get your understanding, thank you very much

xionghc commented 3 years ago

@LiuYeeJ It seems like that the video was failed to load. Make sure the path of the video file is correct.

LiuYeeJ commented 3 years ago

@LiuYeeJ似乎无法加载视频。确保视频文件的路径正确。

Okay, thank you very much. I just picked up the camera and completed the recurrence of the experiment. Thank you very much for your help