目的
Intelによるサンプルを使って、
OpenVINOで、Model Optimizerを動かしてみた。
(alexnet(alexnet.caffemodel)編)
まだ、うまく動いていないので、有効な情報は少ないです。ご注意。
古くない情報なので、同じような作業をされる方には、わずかに、参考になるかも。
検証環境
パソコン:ideapad 320S
CPU: Intel Core i3-7100U CPU @ 2.40GHz
OS: Windows10 バージョン1803(OSビルド 17134.829)
利用したソフト:openvino_2019.1.148
作業1:元のモデルの取得
以下のコマンドで元のモデルを取得。これは、問題なし。
C:\Program Files (x86)\IntelSWTools\openvino_2019.1.148\deployment_tools\tools\model_downloader>python -m downloader --name alexnet -o c:\openvino_models_E
###############|| Downloading topologies ||###############
========= Downloading c:\openvino_models_E\classification\alexnet\caffe\alexnet.prototxt
========= Downloading c:\openvino_models_E\classification\alexnet\caffe\alexnet.caffemodel
... 100%, 238146 KB, 162 KB/s, 1465 seconds passed
###############|| Post processing ||###############
========= Replacing text in c:\openvino_models_E\classification\alexnet\caffe\alexnet.prototxt =========
作業2:Model Optimizer
以下のコマンドで実施。ERRORが出て変換できず。
「Possible reasons」で2つアドバイスしてくれているが、
前者(ファイルがない)は、そんなことないので、
後者?。
ただいま、自力ではどうしようもないです。
どこかに、質問を書き込むぐらいか???
C:\Program Files (x86)\IntelSWTools\openvino_2019.1.148\deployment_tools\model_optimizer>python mo.py --input_model alexnet.caffemodel
Model Optimizer arguments:
Common parameters:
- Path to the Input Model: C:\Program Files (x86)\IntelSWTools\openvino_2019.1.148\deployment_tools\model_optimizer\alexnet.caffemodel
- Path for generated IR: C:\Program Files (x86)\IntelSWTools\openvino_2019.1.148\deployment_tools\model_optimizer\.
- IR output name: alexnet
- Log level: ERROR
- Batch: Not specified, inherited from the model
- Input layers: Not specified, inherited from the model
- Output layers: Not specified, inherited from the model
- Input shapes: Not specified, inherited from the model
- Mean values: Not specified
- Scale values: Not specified
- Scale factor: Not specified
- Precision of IR: FP32
- Enable fusing: True
- Enable grouped convolutions fusing: True
- Move mean values to preprocess section: False
- Reverse input channels: False
Caffe specific parameters:
- Enable resnet optimization: True
- Path to the Input prototxt: C:\Program Files (x86)\IntelSWTools\openvino_2019.1.148\deployment_tools\model_optimizer\alexnet.prototxt
- Path to CustomLayersMapping.xml: extensions\front\caffe\CustomLayersMapping.xml
- Path to a mean file: Not specified
- Offsets for a mean file: Not specified
Model Optimizer version: 2019.1.1-83-g28dfbfd
Please expect that Model Optimizer conversion might be slow. You are currently using Python protobuf library implementation.
However you can use the C++ protobuf implementation that is supplied with the OpenVINO toolkitor build protobuf library from sources.
Navigate to "install_prerequisites" folder and run: python -m easy_install protobuf-3.5.1-py($your_python_version)-win-amd64.egg
set PROTOCOL_BUFFERS_PYTHON_IMPLEMENTATION=cpp
For more information please refer to Model Optimizer FAQ (<INSTALL_DIR>/deployment_tools/documentation/docs/MO_FAQ.html), question #80.
[ FRAMEWORK ERROR ] Exception message:
Possible reasons:
1. C:\Program Files (x86)\IntelSWTools\openvino_2019.1.148\deployment_tools\model_optimizer\alexnet.caffemodel does not exist
2. C:\Program Files (x86)\IntelSWTools\openvino_2019.1.148\deployment_tools\model_optimizer\alexnet.caffemodel does not have a valid structure
[ FRAMEWORK ERROR ] Model Optimizer is not able to parse C:\Program Files (x86)\IntelSWTools\openvino_2019.1.148\deployment_tools\model_optimizer\alexnet.caffemodel
まとめ
表題のとおり、動いてません。
こんなところでつまずく予定ではなかったのですが。。。
雨降って、、、、ですかね。将来良いことが。。。
今後
コメントなどあればお願いします。
単純に、少し違う作業をして、OpenVINOに体を馴染ませてから、再度、挑戦予定。