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

Python script runtime error: frame_resize = cv2.resize(frame, None, fx=1 / DOWNSAMPLE_RATIO, fy=1 / DOWNSAMPLE_RATIO) #20

Open niyaoyao opened 6 years ago

niyaoyao commented 6 years ago

When I run "generate_train_data.py", it would failed with error:

OpenCV Error: Assertion failed (ssize.area() > 0) in resize, file /Users/jenkins/miniconda/1/x64/conda-bld/conda_1486587097465/work/opencv-3.1.0/modules/imgproc/src/imgwarp.cpp, line 3229
Traceback (most recent call last):
  File "generate_train_data.py", line 98, in <module>
    main()
  File "generate_train_data.py", line 27, in main
    frame_resize = cv2.resize(frame, None, fx=1 / DOWNSAMPLE_RATIO, fy=1 / DOWNSAMPLE_RATIO)
cv2.error: /Users/jenkins/miniconda/1/x64/conda-bld/conda_1486587097465/work/opencv-3.1.0/modules/imgproc/src/imgwarp.cpp:3229: error: (-215) ssize.area() > 0 in function resize
niyaoyao commented 6 years ago

It seems that the error only occurred when I use my video file recorded by myself, the https://dl.dropboxusercontent.com/s/2g04onlkmkq9c69/angela_merkel_speech.mp4 would not cause it.

ejjjjkang commented 5 years ago

Is there anyone who solve this issue? I had this problem when I import the video I made.

kylemath commented 4 years ago

same problem here, trying to use live webcam