GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - anion0278/mediapipe-jetson: Google's MediaPipe (v0.8.9) and Python Wheel installer for Jetson Nano (JetPack 4.6) compiled for CUDA 10.2

BranchesTags
Open more actions menu

Latest commit

 

History

8 Commits
8 Commits

Folders and files

NameName
Last commit message
Last commit date
.github
.github
 
 
dist
dist
 
 
docs
docs
 
 
mediapipe
mediapipe
 
 
third_party
third_party
 
 
.bazelrc
.bazelrc
 
 
.bazelversion
.bazelversion
 
 
.dockerignore
.dockerignore
 
 
.gitignore
.gitignore
 
 
BUILD.bazel
BUILD.bazel
 
 
CONTRIBUTING.md
CONTRIBUTING.md
 
 
Dockerfile
Dockerfile
 
 
LICENSE
LICENSE
 
 
MANIFEST.in
MANIFEST.in
 
 
README.md
README.md
 
 
WORKSPACE
WORKSPACE
 
 
build_android_examples.sh
build_android_examples.sh
 
 
build_desktop_examples.sh
build_desktop_examples.sh
 
 
build_ios_examples.sh
build_ios_examples.sh
 
 
googlecf8e524375b0fdf9.html
googlecf8e524375b0fdf9.html
 
 
index.html
index.html
 
 
requirements.txt
requirements.txt
 
 
setup.py
setup.py
 
 
setup_android_sdk_and_ndk.sh
setup_android_sdk_and_ndk.sh
 
 
setup_opencv.sh
setup_opencv.sh
 
 

Repository files navigation

MediaPipe
Google's MediaPipe: https://github.com/google/mediapipe

Fork of Google's MediaPipe (v0.8.9) for Jetson Nano (JetPack 4.6) CUDA (10.2)

  • Currently hand landmarks detection and selfie segmentation only!

This repo represents fixes and instructions needed to sucessfully build latest MediaPipe for Jetson Nano with CUDA support. It additionally provides python wheel (aarch64) for immediate installation.

Installation (for clean Jetpack 4.6 - 4.6.1) - Python Wheel

Binary (v0.8.9) is available in https://github.com/anion0278/mediapipe-jetson/tree/master/dist.

### Preparing pip
$ sudo apt update
$ sudo apt install python3-pip
$ pip3 install --upgrade pip
### Remove previous versions of Mediapipe (if it was installed):
$ pip3 uninstall mediapipe
### Install from wheel with (run commands from mediapipe dir):
$ pip3 install protobuf==3.19.4 opencv-python==4.5.3.56 dataclasses mediapipe-0.8.9_cuda102-cp36-linux_aarch64.whl
### Note: Building wheel for newer version of opencv-python may take quite some time (up to few hours)!

Compile from source (for new versions)

Instructions are inspired by PINTO0309's notes avaliable at Verification of mediapipe's GPU-enabled .pbtxt processing method. ...Work In Progres...

### Do not forget set g++8:
$ sudo update-alternatives --config g++

### CUDA paths
export PATH=/usr/local/cuda-10.2/bin${PATH:+:${PATH}}
export LD_LIBRARY_PATH=/usr/local/cuda/extras/CUPTI/lib64,/usr/local/cuda-10.2/lib64${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}
sudo ldconfig
export TF_CUDA_PATHS=/usr/local/cuda:/usr/lib/aarch64-linux-gnu:/usr/include


### Build: 
$ pip3 uninstall -y mediapipe && sudo python3 setup.py gen_protos && sudo python3 setup.py bdist_wheel && python3 -m pip install dist/mediapipe-0.8.9_cuda102-cp36-cp36m-linux_aarch64.whl

Running examples - notes

Please note, that official selfie segmentation example from https://google.github.io/mediapipe/solutions/selfie_segmentation.html requires changes in order to make it work:

### skip 3rd dimension in resulting mask
output_image = np.where(condition[:,:,0,:], fg_image, bg_image)
### and the same for video input example
output_image = np.where(condition[:,:,0,:], image, bg_image)

Acknowledgement

Inspired by jiuqiant's mediapipe_python_aarch64 and PINTO0309's mediapipe-bin. You are awesome guys!


Live ML anywhere

MediaPipe offers cross-platform, customizable ML solutions for live and streaming media.

accelerated.png cross_platform.png
End-to-End acceleration: Built-in fast ML inference and processing accelerated even on common hardware Build once, deploy anywhere: Unified solution works across Android, iOS, desktop/cloud, web and IoT
ready_to_use.png open_source.png
Ready-to-use solutions: Cutting-edge ML solutions demonstrating full power of the framework Free and open source: Framework and solutions both under Apache 2.0, fully extensible and customizable

ML solutions in MediaPipe

Face Detection Face Mesh Iris Hands Pose Holistic
face_detection face_mesh iris hand pose hair_segmentation
Hair Segmentation Object Detection Box Tracking Instant Motion Tracking Objectron KNIFT
hair_segmentation object_detection box_tracking instant_motion_tracking objectron knift
Android iOS C++ Python JS Coral
Face Detection ✅ ✅ ✅ ✅ ✅ ✅
Face Mesh ✅ ✅ ✅ ✅ ✅
Iris ✅ ✅ ✅
Hands ✅ ✅ ✅ ✅ ✅
Pose ✅ ✅ ✅ ✅ ✅
Holistic ✅ ✅ ✅ ✅ ✅
Selfie Segmentation ✅ ✅ ✅ ✅ ✅
Hair Segmentation ✅ ✅
Object Detection ✅ ✅ ✅ ✅
Box Tracking ✅ ✅ ✅
Instant Motion Tracking ✅
Objectron ✅ ✅ ✅ ✅
KNIFT ✅
AutoFlip ✅
MediaSequence ✅
YouTube 8M ✅

See also MediaPipe Models and Model Cards for ML models released in MediaPipe.

Getting started

To start using MediaPipe solutions with only a few lines code, see example code and demos in MediaPipe in Python and MediaPipe in JavaScript.

To use MediaPipe in C++, Android and iOS, which allow further customization of the solutions as well as building your own, learn how to install MediaPipe and start building example applications in C++, Android and iOS.

The source code is hosted in the MediaPipe Github repository, and you can run code search using Google Open Source Code Search.

About

Google's MediaPipe (v0.8.9) and Python Wheel installer for Jetson Nano (JetPack 4.6) compiled for CUDA 10.2

Topics

hand-trackinghuman-machine-interfacemediapipemediapipe-hands

Resources

Readme
Apache-2.0 license

Contributing

Contributing
Activity

Stars

17 stars

Watchers

2 watching

Forks

6 forks
Report repository

Used by

Contributors

Languages

You are visitor 01402792 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.