A minimalist Python wrapper for OpenFace library
Project description
Mini-face
Installation with pip
Requirements:
python 3.12,numpy >= 1.21.
- Install the package with a following command:
python3 -m pip install mini-face
- Download model data files (subdirectories /model/ and /AU_predictors/) from this repository or official OpenFace release. You will also need files from here.
Python usage
Below is a minimalist example of using the module from Python code:
import cv2
import numpy as np
from mini_face import GazeFeatureExtractor
from mini_face import PredictionMode
if __name__ == "__main__":
image = cv2.imread("test_image.jpg")
extractor = GazeFeatureExtractor(
mode=PredictionMode.IMAGE,
focal_length=(500, 500),
optical_center=(860.0, 540.0),
models_directory="./model",
)
result = extractor.predict(image, np.array([0.0, 0.0, 1080.0, 1920.0]))
print(f"{result = }")
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 Distributions
Built Distributions
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file mini_face-0.1.1-cp313-cp313-manylinux_2_28_x86_64.whl.
File metadata
- Download URL: mini_face-0.1.1-cp313-cp313-manylinux_2_28_x86_64.whl
- Upload date:
- Size: 71.8 MB
- Tags: CPython 3.13, manylinux: glibc 2.28+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
fb2d8840353ccf3491468d07487937a47bf58b4c632a5cefc9d463f7c7777285
|
|
| MD5 |
c498c7feaa071eb8c327ed8b1b62bd9b
|
|
| BLAKE2b-256 |
caf146d33699decd838abc77319c5e46dff1fd5705502709cebaf04aaccaa413
|
File details
Details for the file mini_face-0.1.1-cp313-cp313-macosx_14_0_arm64.whl.
File metadata
- Download URL: mini_face-0.1.1-cp313-cp313-macosx_14_0_arm64.whl
- Upload date:
- Size: 3.8 MB
- Tags: CPython 3.13, macOS 14.0+ ARM64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
79ff57d5debfd3909c21bb2b807016bfd98e03f59d9fc4b57ae743e2510505bd
|
|
| MD5 |
33147a2159285115434893998a688eec
|
|
| BLAKE2b-256 |
eac69113dc5f34f22570d2ee38c0ca84240be8fe45033ac9bd259d42a71cf7f5
|
File details
Details for the file mini_face-0.1.1-cp312-cp312-manylinux_2_28_x86_64.whl.
File metadata
- Download URL: mini_face-0.1.1-cp312-cp312-manylinux_2_28_x86_64.whl
- Upload date:
- Size: 71.8 MB
- Tags: CPython 3.12, manylinux: glibc 2.28+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
abebd92de0ae77d3a225674d8ee4bb74ebf227d3c3924ad08f7f0cfc3fd0cf66
|
|
| MD5 |
e04bcd5dd82f5f3b2a7724c455cc0c63
|
|
| BLAKE2b-256 |
6ac2624a10a6a96ba7ac3acd3b3465a0be2a0e73c2e3dd0b06d12c71b4b81a23
|
File details
Details for the file mini_face-0.1.1-cp312-cp312-macosx_14_0_arm64.whl.
File metadata
- Download URL: mini_face-0.1.1-cp312-cp312-macosx_14_0_arm64.whl
- Upload date:
- Size: 3.8 MB
- Tags: CPython 3.12, macOS 14.0+ ARM64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e56b459b36e9a651c5be70d6ef2ce1672fd7540528534a74107c296a0a61a15e
|
|
| MD5 |
217341b83ea4c5e5ad64aec0a945aa60
|
|
| BLAKE2b-256 |
e09c41cfd0230dbcf635ae40f3535245e1587e7fbf3ab738c70bbbbe9c47b2c8
|