mediapipe-rs/README.md

52 lines
1.5 KiB
Markdown
Raw Normal View History

2022-03-01 13:04:01 +01:00
# ux-mediapipe
2022-05-12 08:46:54 +02:00
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'.
2022-05-12 08:54:16 +02:00
Figuring all this out has been a challenge. I have made these forks and instructions to help me in the future.
2022-05-12 08:46:54 +02:00
## requirements
- bazel
- clang
## setup
Clone the modified Mediapipe repo:
```shell
git clone https://github.com/julesyoungberg/mediapipe.git
cd mediapipe
```
Build & install the mediagraph library.
### mac os
```shell
bazel build --define MEDIAPIPE_DISABLE_GPU=1 mediapipe:libmediagraph.dylib
sudo cp bazel-bin/mediapipe/libmediagraph.dylib /usr/local/lib/libmediagraph.dylib
2022-06-07 07:06:03 +02:00
cp mediapipe/mediagraph.h /usr/local/include/mediagraph.h
2022-05-12 08:46:54 +02:00
```
### linux (untested)
```shell
bazel build --define MEDIAPIPE_DISABLE_GPU=1 mediapipe:mediagraph
cp bazel-bin/mediapipe/libmediagraph.so /usr/local/lib/libmediagraph.so
2022-06-07 07:06:03 +02:00
cp mediapipe/mediagraph.h /usr/local/include/mediagraph.h
2022-05-12 08:46:54 +02:00
```
2022-05-12 08:54:16 +02:00
## usage
Add the following to your dependencies list in `Cargo.toml`:
```toml
2022-05-21 19:22:21 +02:00
ux-mediapipe = { git "https://github.com/julesyoungberg/ux-mediapipe" }
2022-05-12 08:54:16 +02:00
```
2022-05-12 08:46:54 +02:00
## binding generation
The binding generation should be automated. Currently it is a combination of manual commands and manual file editing...not ideal.