첫 오픈비노의face_감지 및 문제 발생

2935 단어 DockerOpenVINO
환경:
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

좋은 웹페이지 즐겨찾기