face_morpher
face_morpher copied to clipboard
dyld: Library not loaded: /usr/local/opt/opencv3/lib/libopencv_stitching.3.2.dylib
Hi guys,
I'm getting the below error every time I attempt to morph, any ideas?
dyld: Library not loaded: /usr/local/opt/opencv3/lib/libopencv_stitching.3.2.dylib Referenced from: /Users/[USERNAME]/sites/face_morpher/facemorpher/bin/stasm_util_osx_cv3 Reason: image not found
Thanks, Andy
I'm running the following code,
python facemorpher/morpher.py --src=images/corbyn.jpg --dest=images/becks.jpg --plot
Needs to be bumped from 3.2 to 3.3.
In particular, this will need to be changed: https://github.com/alyssaq/face_morpher/commit/be3aeb1282ca344e80759d032ed772bea7da612f#diff-b8f53f41d03ba03a765393e63c9dc3ee
I think candidates for a replacement for the stasm binary are located here: https://github.com/opencv/opencv/releases
No, that's not right. But something needs to be changed; alternatively one will need to brew install an older version of opencv.
So, is there a solution for this issue?
Im still on opencv 3.2. Could you try building the stasm binary? Details on how to build it and where to place the binary are listed here: https://github.com/alyssaq/face_morpher#details
I was able to reproduce this issue on opencv3.4. I have updated the binary to support opencv3.4 on MacOS X.
I get the same error with 3.4.
dyld: Library not loaded: /usr/local/opt/opencv/lib/libopencv_stitching.3.4.dylib Referenced from: /Users/petkra/.pyenv/versions/3.5.2/lib/python3.5/site-packages/facemorpher/bin/stasm_util_osx_cv3.4 Reason: image not found Command '['/Users/<username>/.pyenv/versions/3.5.2/lib/python3.5/site-packages/facemorpher/bin/stasm_util_osx_cv3.4', '-f', '/Users/<username>/.pyenv/versions/3.5.2/lib/python3.5/site-packages/facemorpher/data', './faces/face_0.jpg']' returned non-zero exit status -6
Me too unfortunately...
Any idea for a fix?
What OS, openCV and python versions are you using? What is the command that is failing? Is this from the pip installed facemorpher or git cloned from master branch? Happy to investigate and fix but will need more information to reproduce.
Im on mac, 3.4.1, 3.6.3. python3 facemorperher/average.py ......... running from master branch with pip installed facemorpher I checked my directory and that file isn't there
I met the same error,have solved it or not?
Instead of using the stasm face detector, I used dlib for it. Heres a PR of how https://github.com/alyssaq/face_morpher/pull/39
I am having a similar issue. I get the following error when I try to run the facemorpher command:
dyld: Library not loaded: /usr/local/opt/opencv/lib/libopencv_text.3.4.dylib Referenced from: /anaconda3/lib/python3.6/site-packages/facemorpher/bin/stasm_util_osx_cv3.4 Reason: image not found
I am on a macOS High Sierra 10.13.4 Python version 3.6.5 OpenCV version 3.4.1 pip-installed facemorpher (exact command: facemorpher --src=BM01_AC.jpg --dest=BM01_FC.jpg --num=12 --plot --alpha)
Any insight into this issue would be greatly appreciated!
@gmbrennan If the exact error is file does not exist. Double check the supplied paths
, then you'll need to supply the full image path to --src and --dest.
If the stasm binary doesnt exist in <site-packages>/facemorpher/bin/stasm_util_osx_cv3.4
, you can download it from this repo (although it should be there unless I missed something in setup.py). Or, try re-building it for you OS as per the instructions in the readme.
If stasm is erroring, please try dlib as suggested by @lunzhang. There is a working branch called dlib
and you'll have to download shape_predictor_68_face_landmarks.dat
from http://dlib.net/files and place it in /facemorpher/data/
.
I tried it out in a fresh linux docker container and was able to reproduce the error. The problem was pip installing opencv-python
, which installs openCV into site-packages as a single shared object file.
In order to use facemorpher with stasm, openCV has to be installed via homebrew, from source or some installer that retains the opencv libraries.
Ive documented this in the readme. stasm is now pip installable and used in facemorpher-5.0.0.
I am trying to get this to work on a Mac. (Mojave). i am using the 'origin/dlib' branch. I too get the ...
Referenced from: /usr/local/lib/python3.7/site-packages/_stasm.cpython-37m-darwin.so Reason: image not found
error.
Is the way to solve this to use the opencv@3 version?
I am trying to understand all the comments above, but is this the bottom line? If I somehow get opencv3 hooked up ... will this work? Or did I miss something else?
Thanks for all your hard work.
I now have opencv3 installed. but no luck. I have tried to add all the exports paths listed. I am using opencv 3.4.10. is that ok?