Skip to content

Latest commit

 

History

History

mediapipe_holistic

MediaPipe Holistic

Input

Input

(Image from https://mediapipe.page.link/pose_py_colab)

Output

Output

Usage

Automatically downloads the onnx and prototxt files on the first run. It is necessary to be connected to the Internet while downloading.

For the sample image,

$ python3  mediapipe_holistic.py

If you want to specify the input image, put the image path after the --input option.
You can use --savepath option to change the name of the output file to save.

$ python3 mediapipe_holistic.py --input IMAGE_PATH --savepath SAVE_IMAGE_PATH

By adding the --video option, you can input the video.
If you pass 0 as an argument to VIDEO_PATH, you can use the webcam input instead of the video file.

$ python3 mediapipe_holistic.py --video VIDEO_PATH

By adding the --model option, you can specify pose model type which is selected from "lite", "full", "heavy".
(default is full)

$ python3 mediapipe_holistic.py --model heavy

By adding the --detector option, you can add person detector model for multi person recognition.

$ python3 mediapipe_holistic.py --detector

By adding the --scale option, you can resize input image for better viewing of the output.

$ python3 mediapipe_holistic.py --scale 4

By adding the --frame_skip option, you can skip frames of input video for improve the performance.

$ python3 mediapipe_holistic.py --frame_skip 4

Reference

Framework

TensorFlow Lite

Model Format

ONNX opset=12, 11

Netron

pose_detection.onnx.prototxt
pose_landmark_lite.onnx.prototxt
pose_landmark_full.onnx.prototxt
pose_landmark_heavy.onnx.prototxt
face_detection_short_range.onnx.prototxt
face_landmark_with_attention.onnx.prototxt
hand_recrop.onnx.prototxt
hand_landmark_full.onnx.prototxt