alyssaq / face_morpher

:angel: Morph faces with Python, Numpy, Scipy
882 stars 233 forks source link

libopencv_xphoto.3.0.dylib error #17

Closed benmoss closed 7 years ago

benmoss commented 7 years ago

I suspect that it is trying to load a specific version of libopencv_xphoto.3.0.dylib and that the version distributed with the latest OpenCV is different. I have on my filesystem:

/usr/local/opt/opencv3/lib/libopencv_xphoto.3.2.0.dylib
/usr/local/opt/opencv3/lib/libopencv_xphoto.3.2.dylib -> libopencv_xphoto.3.2.0.dylib
/usr/local/opt/opencv3/lib/libopencv_xphoto.dylib -> libopencv_xphoto.3.2.dylib

the error i get:

dyld: Library not loaded: /usr/local/opt/opencv3/lib/libopencv_xphoto.3.0.dylib
  Referenced from: /Users/mossity/code/face_morpher/facemorpher/bin/stasm_util_osx_cv3
  Reason: image not found
Traceback (most recent call last):
  File "facemorpher/morpher.py", line 145, in <module>
    args['--alpha'], args['--plot'])
  File "facemorpher/morpher.py", line 130, in morpher
    src_img, src_points = next(images_points_gen)
  File "facemorpher/morpher.py", line 66, in load_valid_image_points
    img, points = load_image_points(path, size)
  File "facemorpher/morpher.py", line 56, in load_image_points
    points = locator.face_points(path)
  File "/Users/mossity/code/face_morpher/facemorpher/locator.py", line 55, in face_points
    s = subprocess.check_output(command, universal_newlines=True)
  File "/usr/local/Cellar/python/2.7.12_1/Frameworks/Python.framework/Versions/2.7/lib/python2.7/subprocess.py", line 574, in check_output
    raise CalledProcessError(retcode, cmd, output=output)
subprocess.CalledProcessError: Command '['/Users/mossity/code/face_morpher/facemorpher/bin/stasm_util_osx_cv3', '-f', '/Users/mossity/code/face_morpher/facemorpher/data', '/Users/mossity/Downloads/source.jpg']' returned non-zero exit status -6

not sure how to update the stasm utils to work with the latest.

benmoss commented 7 years ago

just found https://github.com/alyssaq/stasm_build, will give it a try :)

benmoss commented 7 years ago

it fixed it. do you want me to PR that new binary?

alyssaq commented 7 years ago

Yes please!

ydatech commented 7 years ago

I got the same error in my macOs.. please help

benmoss commented 7 years ago

@ydatech you can use https://github.com/alyssaq/stasm_build to rebuild the stasm binaries in face_morpher/facemorpher/bin