face_morpher icon indicating copy to clipboard operation
face_morpher copied to clipboard

pip install facemorpher on Ubuntu

Open mrgloom opened this issue 9 years ago • 5 comments

I use pip install facemorpher and simple script to test it:

import facemorpher

facemorpher.averager(['1.jpg', '2.jpg'], plot=True)

it give me :

Python 2.7.6 (default, Jun 22 2015, 17:58:13) 
[GCC 4.8.2] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import facemorpher
>>> facemorpher.averager(['face_morpher/1.jpg', 'face_morpher/2.jpg'], plot=True)
/usr/local/lib/python2.7/dist-packages/facemorpher/bin/stasm_util: 1: /usr/local/lib/python2.7/dist-packages/facemorpher/bin/stasm_util: �����#�
                                                                   ��!H__PAGEZERO�__TEXTp__text__TEXT: not found
/usr/local/lib/python2.7/dist-packages/facemorpher/bin/stasm_util: 6: /usr/local/lib/python2.7/dist-packages/facemorpher/bin/stasm_util: Syntax error: ")" unexpected
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/local/lib/python2.7/dist-packages/facemorpher/averager.py", line 61, in averager
    img, points = load_image_points(path, size)
  File "/usr/local/lib/python2.7/dist-packages/facemorpher/averager.py", line 47, in load_image_points
    points = locator.face_points(path)
  File "/usr/local/lib/python2.7/dist-packages/facemorpher/locator.py", line 34, in face_points
    s = subprocess.check_output(command, shell=True)
  File "/usr/lib/python2.7/subprocess.py", line 573, in check_output
    raise CalledProcessError(retcode, cmd, output=output)
subprocess.CalledProcessError: Command '"/usr/local/lib/python2.7/dist-packages/facemorpher/bin/stasm_util" -f "/usr/local/lib/python2.7/dist-packages/facemorpher/data" "face_morpher/1.jpg"' returned non-zero exit status 2

mrgloom avatar Dec 05 '15 10:12 mrgloom

my issue as well

chrisallick avatar Dec 08 '15 15:12 chrisallick

this is also my same issue, any solutions?

c-asakawa avatar Feb 05 '16 03:02 c-asakawa

Solution is git clone https://github.com/alyssaq/face_morpher and build stasm_util by yourself.

pip install facemorpher seems not work.

mrgloom avatar Feb 05 '16 10:02 mrgloom

Hi all,

As @mrgloom pointed out, the stasm_util binary only work on Mac. You can download the linux binary and replace it in the installed site-packages. Hope that works! I'm trying to use the PyStasm wrapper but it currently doesnt work on my machine.

alyssaq avatar Feb 07 '16 09:02 alyssaq

I've build stasm_util on Debian Jessie. You can find the file here. @alyssaq: maybe you can rename it and add it to the repo, so Linux users can easily replace the file with this version?

javl avatar May 03 '16 09:05 javl