1
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 3 years have passed since last update.

初めてopenvinoのface_detectionに触て、及び出会った問題

Posted at

環境:
centOS7
Docker19.03.12
python3.8.5

##OpenVINO™ Model Server---face_detection
https://github.com/openvinotoolkit/model_server

#最新モデルサーバイメージをダウンロード
docker pull openvino/ubuntu18_model_server:latest

#モデルをダウンロード
curl --create-dirs.
https://download.01.org/opencv/2020/openvinotoolkit/2020.2/open_model_zoo/models_bin/3/face-detection-retail-0004/FP32/face-detection-retail-0004.xml 
https://download.01.org/opencv/2020/openvinotoolkit/2020.2/open_model_zoo/models_bin/3/face-detection-retail-0004/FP32/face-detection-retail-0004.bin 
-o model/face-detection-retail-0004.xml -o model/face-detection-retail-0004.bin

# 9000ポートでgRPC用のコンテナを起動
docker run -d -v $(pwd)/model:/models/face-detection/1 -e LOG_LEVEL=DEBUG -p 9000:9000 
openvino/ubuntu18_model_server /ie-serving-py/start_server.sh ie_serving model --model_path /models/face-detection --model_name face-detection --port 9000  --shape auto

#クライアントスクリプトのダウンロード
curl https://raw.githubusercontent.com/openvinotoolkit/model_server/master/example_client/client_utils.py -o client_utils.py 
https://raw.githubusercontent.com/openvinotoolkit/model_server/master/example_client/face_detection.py -o face_detection.py  
https://raw.githubusercontent.com/openvinotoolkit/model_server/master/example_client/client_requirements.txt -o client_requirements.txt

#分析するイメージをダウンロード
curl --create-dirs 
https://raw.githubusercontent.com/openvinotoolkit/model_server/master/example_client/images/people/people1.jpeg
-o images/people1.jpeg

#クライアント依存関係のインストール
pip install -r client_requirements.txt

#結果のフォルダを作成
mkdir results

#推論を実行し、結果を新しく作成したフォルダに保存
python face_detection.py --batch_size 1 --width 600 --height 400 --input_images_dir images --output_dir results

問題点は:

ModuleNotFoundError: No module named 'cv2’
解決:

pip install opencv-python

ModuleNotFoundError: No module named 'grpc'
解決:

python -m pip install grpcio

ModuleNotFoundError: No module named 'tensorflow'
解決:

pip install --upgrade --ignore-installed tensorflow

ModuleNotFoundError: No module named 'tensorflow_serving'
解決:

pip install  tensorflow-serving-api
1
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?