-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
Python wrapper for FeatureExtraction #767
base: master
Are you sure you want to change the base?
Conversation
…ition of dlib cmake)
This will take some time for me to take a proper look at, but looks very promising, and as you mentioned would serve as a great foundation for a proper python interface to OpenFace (which would be awesome). |
Just chiming in to say that a proper Python interface would be extremely handy, especially for those of us trying to use OpenFace for reproducible analysis pipelines (matching eye tracking data to live recordings of faces, in my case). Also, thanks to packages like cibuildwheel, if the Python interface is properly structured as a Python package (i.e. it has a setup.py file and whatnot) you can easily create pre-compiled wheels for macOS and Linux that contain all the required libraries to use OpenFace via Python. This would make installation and usage of the package on non-Windows systems a lot easier. |
Years later another one came to here from ER-NeRF, which also uses FeatureExtraction as part of its preprocessing. I approached this with a custom docker image based on the official one, extended with necessary libraries and environment to host a Flask api that receives the video and returns the ouput csv file needed to finetune ER-NeRF. This can also be extended to support other requests if needed. Anyways, the issue where I mentioned the docker image is here, and I'm happy to keep working on it (e.g. get a proper Dockerfile based off openface docker image, or simply put the api code here) if needed. |
您的邮件我已收到,有需要会尽快回复This is an automatic reply, confirming that your e-mail was received.Thank you
|
Here is the docker file which can be used with minimal effort if you want to write the wrapper over openface, using python. It extends the orginal docker image after pulling it and uses it in ubuntu 22.04. |
This branch (python) contains all required modification in bash files, dependencies and code to compile a python shared library containing the FeatureExtraction example with minimal controls.
The main issues i had with the code are the linkage with python3:
The main modification to OpenFace code has been done in Utilities::RecorderOpenFace to retrieve landmarks, head pose and gaze easily. That is certainly not the best way to do it but it was the fastest.
All CMakes of OpenFace have also been altered to compile libraries in SHARED and not in STATIC. For the dependencies, this has been done via cmakes, so nothing to change manually.
CMake and compilation has been tested on Linux Mint 18.4 only.
Even if not complete or well documented, i think this could be a good basis for a complete OpenFace python lib.
All the best, great work by the way.