MediaPipe オブジェクト検出のデモ#

このガイドでは、OVMS を使用して MediaPipe グラフを実装する方法を説明します。

Mediapipe::ImageFrame を入力として受け入れるグラフの使用例:

リポジトリーの準備#

リポジトリーのクローンを作成し、メディアパイプの object_detection ディレクトリー移動します。

git clone https://github.com/openvinotoolkit/model_server.git cd model_server/demos/mediapipe/object_detection

モデルと環境の準備#

virtualenv .venv 
..venv/bin/activate 
pip install -r requirements.txt 

python mediapipe_object_detection.py --download_models

OpenVINO™ モデルサーバーの実行#

docker run -d -v $PWD/ovms:/demo -p 9000:9000 openvino/model_server:latest --config_path /demo/config.json --port 9000

クライアントの実行#

python mediapipe_object_detection.py --grpc_port 9000 --images ./input_images.txt 
Start processing: 
        Graph name: objectDetection 
airliner.jpeg 
Iteration 0; Processing time: 41.05 ms; speed 24.36 fps 
golden_retriever.jpeg 
Iteration 1; Processing time: 25.04 ms; speed 39.93 fps 
pelican.jpeg 
Iteration 2; Processing time: 29.88 ms; speed 33.46 fps 
zebra.jpeg 
Iteration 3; Processing time: 26.61 ms; speed 37.59 fps

受信した境界ボックス付きの画像は ./results ディレクトリーに配置されます。

リアルタイム・ストリーム解析#

リアルタイム・ストリームのアプリケーションを使用したデモについては、real_time_stream_analysis を参照してください。