Facial-Expression-Recognition icon indicating copy to clipboard operation
Facial-Expression-Recognition copied to clipboard

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

Open LeiiY opened this issue 5 years ago • 6 comments

i changed demo.py #video_captor = cv2.VideoCapture('‪sample.mp4') video_captor = cv2.VideoCapture(0)

but it did not work

LeiiY avatar Jan 14 '20 09:01 LeiiY

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?

qiaoshh avatar Jul 27 '20 06:07 qiaoshh

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

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.

LiuYeeJ avatar May 10 '21 03:05 LiuYeeJ

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

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?

xionghc avatar May 10 '21 03:05 xionghc

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

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

你遇到什么问题了?

.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

LiuYeeJ avatar May 10 '21 03:05 LiuYeeJ

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

xionghc avatar May 10 '21 03:05 xionghc

@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

LiuYeeJ avatar May 10 '21 05:05 LiuYeeJ