datitran/face2face-demo

Generating files did not work

MrGoogol opened this issue · 4 comments

In the environment.yml I had to change tbb version to "menpo::tbb=4.4" and on Ubuntu16.04 with miniconda the env seemed to be created. I then activated face2face-demo and tried running Generate Training Data script but it returned:

(face2face-demo) myname@mypc:~/face2face-demo$ python generate_train_data.py --file angela_merkel_speech.mp4 --num 400 --landmark-model shape_predictor_68_face_landmarks.dat
[INFO] elapsed time (total): 0.00
[INFO] approx. FPS: 0.00

The folders were created with no files?!

***Update: reformatted computer and the same issue: could it be Ubuntu requires additional libraries when building env?

Terminal Output:
m@my:~/github/face2face-demo$ conda env create -f environment.yml
Fetching package metadata .............
Solving package specifications: .
bzip2-1.0.6-3. 100% |################################| Time: 0:00:00 104.79 kB/s
jpeg-9b-0.tar. 100% |################################| Time: 0:00:01 650.52 kB/s
mkl-2017.0.3-0 100% |################################| Time: 0:00:19 6.94 MB/s
openssl-1.0.2l 100% |################################| Time: 0:00:00 7.76 MB/s
readline-6.2-2 100% |################################| Time: 0:00:00 7.55 MB/s
sqlite-3.13.0- 100% |################################| Time: 0:00:00 7.63 MB/s
tbb-4.4_201601 100% |################################| Time: 0:00:00 2.06 MB/s
tk-8.5.18-0.ta 100% |################################| Time: 0:00:00 7.47 MB/s
xz-5.2.2-1.tar 100% |################################| Time: 0:00:00 6.42 MB/s
zlib-1.2.8-3.t 100% |################################| Time: 0:00:00 9.92 MB/s
libpng-1.6.27- 100% |################################| Time: 0:00:00 8.50 MB/s
python-3.5.3-1 100% |################################| Time: 0:00:02 7.78 MB/s
boost-1.59.0-p 100% |################################| Time: 0:00:03 3.40 MB/s
numpy-1.13.0-p 100% |################################| Time: 0:00:00 7.58 MB/s
setuptools-27. 100% |################################| Time: 0:00:00 7.56 MB/s
wheel-0.29.0-p 100% |################################| Time: 0:00:00 11.11 MB/s
dlib-19.4-py35 100% |################################| Time: 0:00:00 5.08 MB/s
opencv3-3.0.0- 100% |################################| Time: 0:00:03 7.77 MB/s
pip-9.0.1-py35 100% |################################| Time: 0:00:00 7.81 MB/s
Collecting backports.weakref==1.0rc1
Downloading backports.weakref-1.0rc1-py3-none-any.whl
Collecting bleach==1.5.0
Downloading bleach-1.5.0-py2.py3-none-any.whl
Collecting html5lib==0.9999999
Downloading html5lib-0.9999999.tar.gz (889kB)
100% |████████████████████████████████| 890kB 596kB/s
Collecting imutils==0.4.3
Downloading imutils-0.4.3.tar.gz
Collecting markdown==2.6.8
Downloading Markdown-2.6.8.tar.gz (307kB)
100% |████████████████████████████████| 317kB 641kB/s
Collecting protobuf==3.3.0
Downloading protobuf-3.3.0-cp35-cp35m-manylinux1_x86_64.whl (5.7MB)
100% |████████████████████████████████| 5.7MB 242kB/s
Collecting six==1.10.0
Downloading six-1.10.0-py2.py3-none-any.whl
Collecting tensorflow==1.2.1
Downloading tensorflow-1.2.1-cp35-cp35m-manylinux1_x86_64.whl (34.5MB)
100% |████████████████████████████████| 34.5MB 48kB/s
Collecting werkzeug==0.12.2
Downloading Werkzeug-0.12.2-py2.py3-none-any.whl (312kB)
100% |████████████████████████████████| 317kB 2.5MB/s
Requirement already satisfied: setuptools in /home/m/miniconda3/envs/face2face-demo/lib/python3.5/site-packages/setuptools-27.2.0-py3.5.egg (from protobuf==3.3.0)
Requirement already satisfied: wheel>=0.26 in /home/m/miniconda3/envs/face2face-demo/lib/python3.5/site-packages (from tensorflow==1.2.1)
Requirement already satisfied: numpy>=1.11.0 in /home/m/miniconda3/envs/face2face-demo/lib/python3.5/site-packages (from tensorflow==1.2.1)
Building wheels for collected packages: html5lib, imutils, markdown
Running setup.py bdist_wheel for html5lib ... done
Stored in directory: /home/m/.cache/pip/wheels/6f/85/6c/56b8e1292c6214c4eb73b9dda50f53e8e977bf65989373c962
Running setup.py bdist_wheel for imutils ... done
Stored in directory: /home/m/.cache/pip/wheels/4b/5c/b9/5fb892e82d1f10678bd1a3f2555b6a9777e238b7a852e6df27
Running setup.py bdist_wheel for markdown ... done
Stored in directory: /home/m/.cache/pip/wheels/85/a7/08/33ee5cd488d0365d8bed79d1d4e5c28dd3fbfc7f6d0ad4bb09
Successfully built html5lib imutils markdown
Installing collected packages: backports.weakref, six, html5lib, bleach, imutils, markdown, protobuf, werkzeug, tensorflow
Successfully installed backports.weakref-1.0rc1 bleach-1.5.0 html5lib-0.9999999 imutils-0.4.3 markdown-2.6.8 protobuf-3.3.0 six-1.10.0 tensorflow-1.2.1 werkzeug-0.12.2

To activate this environment, use:

> source activate face2face-demo

To deactivate this environment, use:

> source deactivate face2face-demo

m@my:/github/face2face-demo$ ^C
m@my:
/github/face2face-demo$ source activate face2face-demo

(face2face-demo) m@my:/github/face2face-demo$
(face2face-demo) m@my:
/github/face2face-demo$ python generate_train_data.py --file angela_merkel_speech.mp4 --num 400 --landmark-model shape_predictor_68_face_landmarks.dat
Traceback (most recent call last):
File "generate_train_data.py", line 96, in
predictor = dlib.shape_predictor(args.face_landmark_shape_file)
RuntimeError: Unable to open shape_predictor_68_face_landmarks.dat
(face2face-demo) m@my:/github/face2face-demo$ python generate_train_data.py --file angela_merkel_speech.mp4 --num 400 --landmark-model shape_predictor_68_face_landmarks.dat
[INFO] elapsed time (total): 0.00
[INFO] approx. FPS: 0.00
(face2face-demo) m@my:
/github/face2face-demo$ python generate_train_data.py --file angela_merkel_speech.mp4 --num 400 --landmark-model shape_predictor_68_face_landmarks.dat
[INFO] elapsed time (total): 0.00
[INFO] approx. FPS: 0.00
(face2face-demo) m@my:~/github/face2face-demo$


same issue from my side. let me know how solve this issue

@MihaelFeldman No Ubuntu doesn't require additional libraries when building env. Some of the libraries are OSX only so that you just need to use another channel that also offers a Linux binary. Concerning the problem, it seems that he can't find the shape_predictor_68_face_landmarks.dat, RuntimeError: Unable to open shape_predictor_68_face_landmarks.dat and FPS is also zero so there is nothing happening.

The same problem in Ubuntu 16.04

python generate_train_data.py --file data/angela_merkel_speech.mp4 --num 400 --landmark-model data/shape_predictor_68_face_landmarks.dat 
[INFO] elapsed time (total): 0.00
[INFO] approx. FPS: 0.00

Nothing else output

Thanks!


It seems that opencv cannot open angela_merkel_speech.mp4

import cv2
cap = cv2.VideoCapture("angela_merkel_speech.mp4")
cap.isOpened()
False

how to fix that?

JZito commented

Hi guys, had the same problem. simple solution is to update your opencv to 3.3 . In my case I install via conda with this:
conda install -c conda-forge opencv