alyssaq / face_morpher

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

subprocess.CalledProcessError: Command '"/tmp/morph/face_morpher/facemorpher/bin/stasm_util" -f "/tmp/morph/face_morpher/facemorpher/data" "/tmp/Ole/1.jpg"' returned non-zero exit status 2 #1

Closed hokascha closed 8 years ago

hokascha commented 9 years ago
$ /tmp/morph/face_morpher$ python facemorpher/morpher.py --src=/tmp/Ole/1.jpg --dest=/tmp/Ole/2.jpg

/tmp/morph/face_morpher/facemorpher/bin/stasm_util: 1: /tmp/morph/face_morpher/facemorpher/bin/stasm_util: �����#�
                                                                                                                     ��!H__PAGEZERO�__TEXTp__text__TEXT: not found
/tmp/morph/face_morpher/facemorpher/bin/stasm_util: 6: /tmp/morph/face_morpher/facemorpher/bin/stasm_util: Syntax error: ")" unexpected
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 = images_points_gen.next()
  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 "/tmp/morph/face_morpher/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 '"/tmp/morph/face_morpher/facemorpher/bin/stasm_util" -f "/tmp/morph/face_morpher/facemorpher/data" "/tmp/Ole/1.jpg"' returned non-zero exit status 2

looks like the binary is broken:

$ /tmp/morph/face_morpher/facemorpher/bin/stasm_util
bash: /tmp/morph/face_morpher/facemorpher/bin/stasm_util: cannot execute binary file: Fehler im Format der Programmdatei (file format error)

This is on Ubuntu Linux 14.04.

kapasipk commented 9 years ago

Facing the same problem. Please help. This is also on Ubuntu Linux 14.04.

alyssaq commented 9 years ago

The reason is because the executable bin/stasm_util was compiled on my Mac. I have a set of build scripts at https://github.com/alyssaq/stasm_build to build the binary. Could you try building stasm_util on Linux?

glauco commented 9 years ago

@hokascha @kapasipk @alyssaq

I was facing the same issue.

After building it on Ubuntu 14.04, and replacing the one provided by facemorpher, I was able to execute it fine.

alyssaq commented 9 years ago

@glauco

Thats great! Would you mind emailing me the binary and Ill make it available for the other linux users in this repo?

glauco commented 9 years ago

@alyssaq Sure! Check your inbox!

alyssaq commented 9 years ago

Thanks! You can now download stasm_util for Ubuntu on the wiki page