A minimalist Python wrapper for OpenFace library
Project description
Mini-face
Installation with pip
Requirements:
python 3.12
. Install the package with a following command:
python3 -m pip install mini-face
Installation from source
Requirements:
cmake
,vcpkg
,python 3.12
.
Recommended to use a virtual environment.
- Install the
scikit-build
module:
pip install scikit-build
- Download and install the repository:
git clone https://github.com/child-lab-uj/gaze-tracking
cd gaze-tracking
pip install .
Short description of the project structure:
- /src/ - source code - OpenFace source, wrappers and Python bindings
- /model/ - Model data from the official OpenFace release
- /AU_predictors/ - Model data from the official OpenFace release
Python usage
Below is a minimalist example of using the module from Python code:
import cv2
import mini_face.api
if __name__ == "__main__":
image = cv2.imread("test_image.jpg")
roi = (214.467, 96.9926, 110.877, 117.08)
extractor = mini_face.api.GazeExtractor()
extractor.estimate_camera_calibration(image)
print(extractor.detect_gaze(image, 0, roi))
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
mini_face-0.0.11.tar.gz
(14.5 MB
view hashes)
Built Distribution
Close
Hashes for mini_face-0.0.11-cp312-cp312-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 75d4867f77b01fc6f553bea1585215ec6d22b6a4cf061e6fe3f47593968d7307 |
|
MD5 | 826f47c44a43e4b4c73bd12f2feaae3e |
|
BLAKE2b-256 | 6c37f0c9a1f068e1493105f870afd37fe547bc14a9ee9b220f82a2caf4f44260 |