datitran / face2face-demo

pix2pix demo that learns from facial landmarks and translates this into a face
https://medium.com/@datitran/face2face-a-pix2pix-demo-that-mimics-the-facial-expression-of-the-german-chancellor-b6771d65bf66
MIT License
1.44k stars 423 forks source link

VIDEOIO ERROR:V4L:cannot open camera by index 0 #37

Open vuexiaob opened 4 years ago

vuexiaob commented 4 years ago

VIDEOIO ERROR:V4L:cannot open camera by index 0 Traceback (most recent call last): File "run_webcam.py",line 130,in main() File "run_webcam.py", line 57, in main frame_resize = cv2.resize(frame, None, fx=1 / DOWNSAMPLE_RATIO, fy=1 /DOWNSAMPLE_RATIO) cv2.error: OpenCV(3.4.2) /io/opencv/modules/imgproc/src/resize.cpp:4044: error: (-215:Assertion failed) !ssize.empty() in function ‘resize’

在笔记本上报错如上

OrkhanHI commented 3 years ago

It is your webcam issue, you can try with index 1 (-src 1) as well.

python run_webcam.py -src 0 --landmark-model shape_predictor_68_face_landmarks.dat --tf-model frozen_model.pb