cansik / mediapipe-extended

Mediapipe for python with extended solution support.
Apache License 2.0
15 stars 1 forks source link

Mediapipe-Extended Mediapipe Build

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.

Installation

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.

Face Geometry

The Face Geometry solution allows the head transformation matrix to be recovered from the landmark detection. This enables face effects or undistorted landmark analysis.

Augmented Reality

Project filters onto the face by using the geometry information.

Face Geometry Example

python examples/FaceGeometryExample.py

Measure Distance

Measure distances between landmarks without the perspective distortion.

Face Geometry Example

python examples/NeutralFaceLandmarkExample.py

Build

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

About

Apache-2.0 license - Copyright (c) 2023 Florian Bruggisser