Skip to main content

A minimalist Python wrapper for OpenFace library

Project description

Mini-face

Installation with pip

Requirements: python 3.12, numpy >= 1.21.

  1. Install the package with a following command:
   python3 -m pip install mini-face
  1. 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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

mini_face-0.1.1-cp313-cp313-manylinux_2_28_x86_64.whl (71.8 MB view details)

Uploaded CPython 3.13manylinux: glibc 2.28+ x86-64

mini_face-0.1.1-cp313-cp313-macosx_14_0_arm64.whl (3.8 MB view details)

Uploaded CPython 3.13macOS 14.0+ ARM64

mini_face-0.1.1-cp312-cp312-manylinux_2_28_x86_64.whl (71.8 MB view details)

Uploaded CPython 3.12manylinux: glibc 2.28+ x86-64

mini_face-0.1.1-cp312-cp312-macosx_14_0_arm64.whl (3.8 MB view details)

Uploaded CPython 3.12macOS 14.0+ ARM64

File details

Details for the file mini_face-0.1.1-cp313-cp313-manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for mini_face-0.1.1-cp313-cp313-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 fb2d8840353ccf3491468d07487937a47bf58b4c632a5cefc9d463f7c7777285
MD5 c498c7feaa071eb8c327ed8b1b62bd9b
BLAKE2b-256 caf146d33699decd838abc77319c5e46dff1fd5705502709cebaf04aaccaa413

See more details on using hashes here.

File details

Details for the file mini_face-0.1.1-cp313-cp313-macosx_14_0_arm64.whl.

File metadata

File hashes

Hashes for mini_face-0.1.1-cp313-cp313-macosx_14_0_arm64.whl
Algorithm Hash digest
SHA256 79ff57d5debfd3909c21bb2b807016bfd98e03f59d9fc4b57ae743e2510505bd
MD5 33147a2159285115434893998a688eec
BLAKE2b-256 eac69113dc5f34f22570d2ee38c0ca84240be8fe45033ac9bd259d42a71cf7f5

See more details on using hashes here.

File details

Details for the file mini_face-0.1.1-cp312-cp312-manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for mini_face-0.1.1-cp312-cp312-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 abebd92de0ae77d3a225674d8ee4bb74ebf227d3c3924ad08f7f0cfc3fd0cf66
MD5 e04bcd5dd82f5f3b2a7724c455cc0c63
BLAKE2b-256 6ac2624a10a6a96ba7ac3acd3b3465a0be2a0e73c2e3dd0b06d12c71b4b81a23

See more details on using hashes here.

File details

Details for the file mini_face-0.1.1-cp312-cp312-macosx_14_0_arm64.whl.

File metadata

File hashes

Hashes for mini_face-0.1.1-cp312-cp312-macosx_14_0_arm64.whl
Algorithm Hash digest
SHA256 e56b459b36e9a651c5be70d6ef2ce1672fd7540528534a74107c296a0a61a15e
MD5 217341b83ea4c5e5ad64aec0a945aa60
BLAKE2b-256 e09c41cfd0230dbcf635ae40f3535245e1587e7fbf3ab738c70bbbbe9c47b2c8

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page