Skip to content

Conversation

@pingfengluo
Copy link

add pyOpenFace tested on ubuntu 14.04.

@TadasBaltrusaitis
Copy link
Owner

Great work! I am currently traveling and will only be able to review the changes in a couple of weeks time. But I will do my best to integrate it as soon as possible, as having a Python interface for some of the modules is very useful.

Thanks,
Tadas

@dshahrokhian
Copy link
Contributor

Any news on this regard? Many developers could really use this.

Thanks,
Daniyal

@NumesSanguis
Copy link

NumesSanguis commented Aug 22, 2017

@pingfengluo I've cloned and build your repository with Python Interface using ./install.sh on Ubuntu 16.04. However, I don't know how to use it. If I run python/test.py I get the error:
line 1: import pyopenface, ImportError: No module named pyopenface.

Could you provide some instructions on how to use your Python interface?

@Glaemyr
Copy link

Glaemyr commented Feb 28, 2018

@NumesSanguis Had the same problem, running it in spyder instead I got the same error as in #282, @JavierVillegas' solution helped:

In Opencv 3.3 I had to uncomment the line
#define OPENCV_TRAITS_ENABLE_DEPRECATED
in traits.hpp

Now when I run test.py i get:
ImportError: /usr/lib/x86_64-linux-gnu/liblapack.so.3: undefined symbol: gotoblas
From openBLAS issue 1114 I gather that the DYNAMIC_ARCH=1 flag needs to be set. I'll give an update on how it goes.

UPDATE:
Setting the flag seemed to work. There is however a few errors in test.py. First of the scripts assumes the repo is cloned to a folder named OpenFace. Can be easily fixed by changing the 2 places where it is assumed to the correct name either by just changing the string or by making a new var.
Next of, it seems like the cpp module is referencing the relative path model/main_clnf_general.txt since everything is in the /python folder it fails to find it, continues and crashes due to an exception later on. Copying, symlinking or adding the path to PATH(or similar) should fix this. I did it the ugliest way by copying the models folder.
I will look into if I can change the .cpp to not use the relative path if it receives a path in its argument. Since I doubt I'll get this to be pretty as well as working I am not planing on forking it and making a pull request.

@manuelporta
Copy link

manuelporta commented May 9, 2019

Hi, I've downloaded this repository on windows and after installing Boost, CMake and solve all the errors I found I got stuck trying to build the library. I get the following error:

C:\OpenFace-Python\python\pyopenface.cpp(122): error C2562: 'init_module_pyopenface': void function' returning a value [C:\OpenFace-Python\python\build\pyopenface.vcxproj]
C:\OpenFace-Python\python\pyopenface.cpp(119): note: see declaration of 'init_module_pyopenface'

I have no idea how to fix this, I've looked for this kind of error but I didn't found anything, could you help me?
Thank you,

EDIT: I was using a more recent python version. Switched to python2.7 and the error vanished.

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

Successfully merging this pull request may close these issues.

6 participants