Mediapipe for Python with extended solution support. The aim of this repository is to add solutions to mediapipe that are not included in the original mediapipe Python package. This repository just provides the build script and examples for mediapipe-extended. The build script uses the face-geometry-python branch to build the python wheel package.
Until a PyPi package is released, use pip to install the wheel directly.
pip install -r requirements.txt
pip install https://github.com/cansik/mediapipe-extended/releases/download/v0.9.1/mediapipe_extended-0.9.1-cp39-cp39-macosx_12_0_arm64.whl
Prebuilt wheels for the following python versions and operating systems are available.
3.8
, 3.9
, 3.10
, 3.11
)The Face Geometry solution allows the head transformation matrix to be recovered from the landmark detection. This enables face effects or undistorted landmark analysis.
Project filters onto the face by using the geometry information.
python examples/FaceGeometryExample.py
Measure distances between landmarks without the perspective distortion.
python examples/NeutralFaceLandmarkExample.py
To create a wheel package, set up your computer as described in Mediapipe: Getting Started and run the following command (Powershell Core is required). Please use a more recent version of powershell (e.g. PowerShell 7.3.2
) and install the following dependency managers for your system:
pwsh tools/build.ps1
Apache-2.0 license - Copyright (c) 2023 Florian Bruggisser