Rust and mediapipe
Go to file
2022-06-06 22:25:04 -07:00
examples builds successfully 2022-06-06 22:06:23 -07:00
src return landmarks from detectors 2022-06-06 22:25:04 -07:00
.gitignore code fill 2022-03-01 19:04:01 +07:00
build.rs builds successfully 2022-06-06 22:06:23 -07:00
Cargo.toml regenerate bindings 2022-05-11 23:46:48 -07:00
LICENSE Initial commit 2022-02-13 21:36:11 +07:00
README.md builds successfully 2022-06-06 22:06:23 -07:00

ux-mediapipe

Rust and mediapipe.

Mediapipe is a framework for building AI-powered computer vision and augmented reality 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 C++ library that provides an interface to the mediapipe 'engine'.

Figuring all this out has been a challenge. I have made these forks and instructions to help me in the future.

requirements

  • bazel
  • clang

setup

Clone the modified Mediapipe repo:

git clone https://github.com/julesyoungberg/mediapipe.git
cd mediapipe

Build & install the mediagraph library.

mac os

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

linux (untested)

bazel build --define MEDIAPIPE_DISABLE_GPU=1 mediapipe:mediagraph
cp bazel-bin/mediapipe/libmediagraph.so /usr/local/lib/libmediagraph.so
cp mediapipe/mediagraph.h /usr/local/include/mediagraph.h

usage

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

ux-mediapipe = { git "https://github.com/julesyoungberg/ux-mediapipe" }

binding generation

The binding generation should be automated. Currently it is a combination of manual commands and manual file editing...not ideal.