Skip to content

Latest commit

 

History

History
92 lines (76 loc) · 3.72 KB

README.md

File metadata and controls

92 lines (76 loc) · 3.72 KB

OVMS python examples

  • Building docker container with dependencies
git clone https://github.com/openvinotoolkit/mediapipe.git
cd mediapipe
make docker_build
  • Start the container
docker run -it mediapipe_ovms:latest bash

Object Detection

  • Run example ovms python script for object detection - whole input video as one execution
cp mediapipe/examples/python/ovms_object_detection.py build/lib.linux-x86_64-cpython-38/
python build/lib.linux-x86_64-cpython-38/ovms_object_detection.py

This execution will produce object_output.mp4 vide with object detection results found in the input video file:

/mediapipe/mediapipe/examples/desktop/object_detection/test_video.mp4

You can manipulate the input and output video file paths with command line arguments:

python build/lib.linux-x86_64-cpython-38/ovms_object_detection.py --input_video_path /my/path --output_video_path /my/output/path

Holistic Tracking

  • Run example ovms python script for holistic tracking - frame by frame execution
cp mediapipe/examples/python/ovms_holistic_tracking.py build/lib.linux-x86_64-cpython-38/
python build/lib.linux-x86_64-cpython-38/ovms_holistic_tracking.py

This execution will produce holistic_output.mp4 vide with object detection results found in the input video file:

/mediapipe/video.mp4

You can manipulate the input and output video file paths used to execute the graph with command line arguments:

python build/lib.linux-x86_64-cpython-38/ovms_holistic_tracking.py --input_video_path /my/path --output_video_path /my/output/path

Holistic Tracking Multithread

  • Run example ovms python script for holistic tracking - frame by frame execution
cp mediapipe/examples/python/ovms_holistic_tracking_multithread.py build/lib.linux-x86_64-cpython-38/
python build/lib.linux-x86_64-cpython-38/ovms_holistic_tracking_multithread.py

This execution will produce holistic_output.mp4 vide with object detection results found in the input video file:

/mediapipe/video.mp4

You can manipulate the input and output video file paths as well as the number of threads used to execute the graph with command line arguments:

python build/lib.linux-x86_64-cpython-38/ovms_holistic_tracking_multithread.py --input_video_path /my/path --output_video_path /my/output/path --num_threads 2

Face Detection

  • Run example ovms python script for face detection - frame by frame execution
cp mediapipe/examples/python/ovms_face_detection.py build/lib.linux-x86_64-cpython-38/
python build/lib.linux-x86_64-cpython-38/ovms_face_detection.py

This execution will produce face_output.mp4 vide with object detection results found in the input video file:

/mediapipe/video.mp4

You can manipulate the input and output video file paths used to execute the graph with command line arguments:

python build/lib.linux-x86_64-cpython-38/ovms_face_detection.py --input_video_path /my/path --output_video_path /my/output/path