Rust and mediapipe
Go to file
2024-01-02 15:34:15 +01:00
examples add multi pose estimation and multi person holistic tracking 2022-07-04 19:36:32 -07:00
src remove annotations from holistic tracking 2022-07-26 20:27:22 -07:00
.gitignore fix build and instructions for apple m1 2022-07-26 17:43:21 -07:00
build.rs use /usr/local/include/ for header file 2022-07-26 18:05:32 -07:00
Cargo.toml fix build and instructions for apple m1 2022-07-26 17:43:21 -07:00
LICENSE Initial commit 2022-02-13 21:36:11 +07:00
mediapipe fix holistic tracking with singular feature types 2022-06-20 22:15:01 -07:00
README.md Update README.md 2024-01-02 15:34:15 +01:00

mediapipe-rs

Simple rust bindings for mediapipe.

Forked from: https://github.com/julesyoungberg/mediapipe-rs

And heavily based on this example: https://github.com/asprecic/mediapipe-qt-integration-example 🤌

requirements

setup

To run the examples clone this project.

git clone https://gitea.cass-dlcm.dev/cassdlcm/mediapipe-rs.git

Mediapipe is a framework for building AI-powered computer vision applications. It provides high level libraries exposing some of its solutions for common problems. This package makes some of these solutions available in Rust. In order to use it we must build a custom mediapipe C++ library.

Clone the modified Mediapipe repo next to mediapipe-rs or a project that uses mediapipe-rs.

git clone https://gitea.cass-dlcm.dev/cassdlcm/mediapipe.git
cd mediapipe

building mediapipe

Build & install the mediagraph library.

mac os

bazel build mediapipe:libmediagraph.dylib
sudo cp bazel-bin/mediapipe/libmediagraph.dylib /usr/local/lib/libmediagraph.dylib
sudo cp mediapipe/mediagraph.h /usr/local/include/mediagraph.h

linux (untested)

bazel build mediapipe:mediagraph
sudo cp bazel-bin/mediapipe/libmediagraph.so /usr/local/lib/libmediagraph.so
sudo cp mediapipe/mediagraph.h /usr/local/include/mediagraph.h

linking

Navigate to the project directory and create a symbolic link to ../mediapipe/mediapipe.

cd ../mediapipe-rs # or the path to your project
ln -s ../mediapipe/mediapipe .

usage

Add the following to your dependencies list in Cargo.toml:

mediapipe = { git = "https://gitea.cass-dlcm.dev/cassdlcm/mediapipe-rs" }

Mediapipe relies on tflite files which must be available at ./mediapipe/modules/. The easiest way to satisfy this is by creating a symbolic link to mediapipe as explained in the linking section above.

examples

Examples are located in the ./examples directory. Run face_mesh.rs with

cargo run --release --example face_mesh