Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[image not found] python3.7.2 and openCV 4.0.1 support #49

Open
ShuchangXu opened this issue Jan 9, 2019 · 4 comments
Open

[image not found] python3.7.2 and openCV 4.0.1 support #49

ShuchangXu opened this issue Jan 9, 2019 · 4 comments

Comments

@ShuchangXu
Copy link

I tried the latest tutorial about installing openCV4 :
https://gist.github.com/alyssaq/f60393545173379e0f3f#file-4-opencv3-with-python3-md

And tried to morph from a source to destination image.

However, I got following error.
Does this have anything to do with my python3.7.2 and openCV4.0.1 version?
Thanks!

Traceback (most recent call last):
  File "facemorpher/morpher.py", line 34, in <module>
    from facemorpher import locator
  File "/Users/me/face_morpher/facemorpher/__init__.py", line 4, in <module>
    from .morpher import morpher, list_imgpaths
  File "/Users/me/face_morpher/facemorpher/morpher.py", line 34, in <module>
    from facemorpher import locator
  File "/Users/me/face_morpher/facemorpher/locator.py", line 7, in <module>
    import stasm
  File "/Users/me/.virtualenvs/py3/lib/python3.7/site-packages/stasm/__init__.py", line 3, in <module>
    from _stasm import __doc__
ImportError: dlopen(/Users/me/.virtualenvs/py3/lib/python3.7/site-packages/_stasm.cpython-37m-darwin.so, 2): Library not loaded: /usr/local/opt/opencv/lib/libopencv_core.3.4.dylib
  Referenced from: /Users/me/.virtualenvs/py3/lib/python3.7/site-packages/_stasm.cpython-37m-darwin.so
  Reason: image not found
@alyssaq
Copy link
Owner

alyssaq commented Jan 10, 2019

Hi. Ive tried compiling stasm with openCV 4.0.1 but it simply doesnt work. At the moment, face morpher only works with openCV 3

@ShuchangXu
Copy link
Author

Thanks! I will try to install openCV3
brew install https://raw.githubusercontent.com/Homebrew/homebrew-core/aaf45348653fc45674b7d798404f2cc9700e6f9c/Formula/opencv.rb

@alyssaq
Copy link
Owner

alyssaq commented Jun 30, 2019

Please try the new version using only dlib.

@kappaxbeta
Copy link

kappaxbeta commented Aug 4, 2019

I also needed to remove from locator.py the function "face_points_stasm" to avoid the import. Also I needed to set in morpher change the import "from facemorpher import $module" to just import $module

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants