DevendraPratapYadav / gsoc18_RedHenLab

A modular pipeline to extract several facial features from videos such as face landmarks, eye gaze direction, head pose and Action Units
33 stars 16 forks source link

The Python virtual environment is correct but I get the following error when I run "bash ./execute_pipeline.sh ./0_input ./output" #3

Open ZhongyuMa opened 4 years ago

ZhongyuMa commented 4 years ago

egin Stage 1 : Shot Segmentation Processing: ./0_input/image00002.jpg Traceback (most recent call last): File "shot_segmentation.py", line 93, in do_shot_segmentation(f, filePath, input_folder, output_folder); File "shot_segmentation.py", line 56, in do_shot_segmentation output = pyannote_shot(filePath) File "shot_segmentation.py", line 38, in pyannote_shot for x in shots: File "/home/yu/anaconda3/envs/face/lib/python3.6/site-packages/pyannote/video/structure/shot.py", line 120, in iter t, y = zip(*self.iter_dfd()) ValueError: not enough values to unpack (expected 2, got 0)

ZhongyuMa commented 4 years ago

The following slave error occurred when I used video as input,

Processing: ./0_input/multi_face.avi Traceback (most recent call last): File "shot_segmentation.py", line 93, in do_shot_segmentation(f, filePath, input_folder, output_folder) File "shot_segmentation.py", line 56, in do_shot_segmentation output = pyannote_shot(filePath) File "shot_segmentation.py", line 38, in pyannote_shot for x in shots: File "/home/yu/anaconda3/envs/face/lib/python3.6/site-packages/pyannote/video/structure/shot.py", line 120, in iter t, y = zip(*self.iter_dfd()) File "/home/yu/anaconda3/envs/face/lib/python3.6/site-packages/pyannote/video/structure/shot.py", line 113, in iter_dfd yield t, self.dfd(previous, current, flow=None) File "/home/yu/anaconda3/envs/face/lib/python3.6/site-packages/pyannote/video/structure/shot.py", line 92, in dfd dy, dx = flow[y, x] TypeError: 'NoneType' object is not subscriptable Checking paths for all stages.

DevendraPratapYadav commented 4 years ago

This seems to be an error during shot segmentation in pyannote library's pyannote_shot function. Can you try it with a different video? Preferably a mp4 file. The error you see may have occured due to a bad/unreadable video frame.

ZhongyuMa commented 4 years ago

Thanks,I will try it later. Zhongyu Ma 邮箱:zhongyuma001@gmail.com 签名由 网易邮箱大师 定制 On 01/20/2020 05:20, Devendra Pratap Yadav wrote: This seems to be an error during shot segmentation in pyannote library's pyannote_shot function. Can you try it with a different video? Preferably a mp4 file. The error you see may have occured due to a bad/unreadable video frame. — You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or unsubscribe.

akshat1136 commented 4 years ago

I got the same error while trying the code and found the way around. In /home/yu/anaconda3/envs/face/lib/python3.6/site-packages/pyannote/video/structure/shot.py file, line 77to 84, you will see that flow will be assigned only if cv2.version.split('.')[0] is either 2 or 3. But in latest pyannote-video github repo it has been updated for OpenCV version greater than 3 as well (link: https://github.com/pyannote/pyannote-video/blob/develop/pyannote/video/structure/shot.py).

So to run it just change the elif condition from OPENCV == 3 to OPENCV >= 3

DevendraPratapYadav commented 4 years ago

@ZhongyuMa Did the above help resolve the issue for you?