Closed liyancas closed 2 years ago
$ onnxsim Resnet34_3inputs_448x448_20200609.onnx Resnet34_3inputs_448x448_20200609.onnx
Simplifying...
Finish! Here is the difference:
┏━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━┓
┃ ┃ Original Model ┃ Simplified Model ┃
┡━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━┩
│ Add │ 18 │ 18 │
│ BatchNormalization │ 56 │ 3 │
│ Concat │ 2 │ 2 │
│ Conv │ 56 │ 56 │
│ ConvTranspose │ 1 │ 1 │
│ MaxPool │ 3 │ 3 │
│ Relu │ 53 │ 53 │
│ Tanh │ 2 │ 2 │
│ Model Size │ 108.7MiB │ 108.5MiB │
└────────────────────┴────────────────┴──────────────────┘
$ mo \
--framework onnx \
--input_model Resnet34_3inputs_448x448_20200609.onnx \
--data_type FP32 \
--output_dir Resnet34_3inputs_448x448_20200609/openvino/FP32 \
--model_name Resnet34_3inputs_448x448_20200609
Model Optimizer arguments:
Common parameters:
- Path to the Input Model: /home/user/workdir/Resnet34_3inputs_448x448_20200609.onnx
- Path for generated IR: /home/user/workdir/Resnet34_3inputs_448x448_20200609/openvino/FP32
- IR output name: Resnet34_3inputs_448x448_20200609
- 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
- Source layout: Not specified
- Target layout: Not specified
- Layout: Not specified
- Mean values: Not specified
- Scale values: Not specified
- Scale factor: Not specified
- Precision of IR: FP32
- Enable fusing: True
- User transformations: Not specified
- Reverse input channels: False
- Enable IR generation for fixed input shape: False
- Use the transformations config file: None
Advanced parameters:
- Force the usage of legacy Frontend of Model Optimizer for model conversion into IR: False
- Force the usage of new Frontend of Model Optimizer for model conversion into IR: False
/usr/local/lib/python3.8/dist-packages/pkg_resources/__init__.py:123: PkgResourcesDeprecationWarning: 0.23ubuntu1 is an invalid version and will not be supported in a future release
warnings.warn(
OpenVINO runtime found in: /usr/local/lib/python3.8/dist-packages/openvino
OpenVINO runtime version: custom_HEAD_cdb9bec7210f8c24fde3e416c7ada820faaaa23e
Model Optimizer version: custom_HEAD_cdb9bec7210f8c24fde3e416c7ada820faaaa23e
[ WARNING ]
Detected not satisfied dependencies:
numpy: installed: 1.22.4, required: < 1.20
Please install required versions of components or run pip installation
pip install openvino-dev
[ SUCCESS ] Generated IR version 11 model.
[ SUCCESS ] XML file: /home/user/workdir/Resnet34_3inputs_448x448_20200609/openvino/FP32/Resnet34_3inputs_448x448_20200609.xml
[ SUCCESS ] BIN file: /home/user/workdir/Resnet34_3inputs_448x448_20200609/openvino/FP32/Resnet34_3inputs_448x448_20200609.bin
[ SUCCESS ] Total execution time: 0.56 seconds.
[ SUCCESS ] Memory consumed: 305 MB.
It's been a while, check for a new version of Intel(R) Distribution of OpenVINO(TM) toolkit here https://software.intel.com/content/www/us/en/develop/tools/openvino-toolkit/download.html?cid=other&source=prod&campid=ww_2022_bu_IOTG_OpenVINO-2022-1&content=upg_all&medium=organic or on the GitHub*
[ INFO ] The model was converted to IR v11, the latest model format that corresponds to the source DL framework input/output format. While IR v11 is backwards compatible with OpenVINO Inference Engine API v1.0, please use API v2.0 (as of 2022.1) to take advantage of the latest improvements in IR v11.
Find more information about API v2.0 and IR v11 at https://docs.openvino.ai
When I deleted the input shape parameter of mo, it succeed. Do you know what's the reason?
Instructions on how to use OpenVINO are not supported by this repository. Read the OpenVINO tutorial or submit an issue in the OpenVINO repository.
mo \
--framework onnx \
--input_model Resnet34_3inputs_448x448_20200609.onnx \
--input input.1,input.4,input.7 \
--input_shape [1,3,448,448],[1,3,448,448],[1,3,448,448] \
--data_type FP32 \
--output_dir Resnet34_3inputs_448x448_20200609/openvino/FP32 \
--model_name Resnet34_3inputs_448x448_20200609
Model Optimizer arguments:
Common parameters:
- Path to the Input Model: /home/user/workdir/Resnet34_3inputs_448x448_20200609.onnx
- Path for generated IR: /home/user/workdir/Resnet34_3inputs_448x448_20200609/openvino/FP32
- IR output name: Resnet34_3inputs_448x448_20200609
- Log level: ERROR
- Batch: Not specified, inherited from the model
- Input layers: input.1,input.4,input.7
- Output layers: Not specified, inherited from the model
- Input shapes: [1,3,448,448],[1,3,448,448],[1,3,448,448]
- Source layout: Not specified
- Target layout: Not specified
- Layout: Not specified
- Mean values: Not specified
- Scale values: Not specified
- Scale factor: Not specified
- Precision of IR: FP32
- Enable fusing: True
- User transformations: Not specified
- Reverse input channels: False
- Enable IR generation for fixed input shape: False
- Use the transformations config file: None
Advanced parameters:
- Force the usage of legacy Frontend of Model Optimizer for model conversion into IR: False
- Force the usage of new Frontend of Model Optimizer for model conversion into IR: False
/usr/local/lib/python3.8/dist-packages/pkg_resources/__init__.py:123: PkgResourcesDeprecationWarning: 0.23ubuntu1 is an invalid version and will not be supported in a future release
warnings.warn(
OpenVINO runtime found in: /usr/local/lib/python3.8/dist-packages/openvino
OpenVINO runtime version: custom_HEAD_cdb9bec7210f8c24fde3e416c7ada820faaaa23e
Model Optimizer version: custom_HEAD_cdb9bec7210f8c24fde3e416c7ada820faaaa23e
[ WARNING ]
Detected not satisfied dependencies:
numpy: installed: 1.22.4, required: < 1.20
Please install required versions of components or run pip installation
pip install openvino-dev
[ SUCCESS ] Generated IR version 11 model.
[ SUCCESS ] XML file: /home/user/workdir/Resnet34_3inputs_448x448_20200609/openvino/FP32/Resnet34_3inputs_448x448_20200609.xml
[ SUCCESS ] BIN file: /home/user/workdir/Resnet34_3inputs_448x448_20200609/openvino/FP32/Resnet34_3inputs_448x448_20200609.bin
[ SUCCESS ] Total execution time: 0.64 seconds.
[ SUCCESS ] Memory consumed: 306 MB.
It's been a while, check for a new version of Intel(R) Distribution of OpenVINO(TM) toolkit here https://software.intel.com/content/www/us/en/develop/tools/openvino-toolkit/download.html?cid=other&source=prod&campid=ww_2022_bu_IOTG_OpenVINO-2022-1&content=upg_all&medium=organic or on the GitHub*
[ INFO ] The model was converted to IR v11, the latest model format that corresponds to the source DL framework input/output format. While IR v11 is backwards compatible with OpenVINO Inference Engine API v1.0, please use API v2.0 (as of 2022.1) to take advantage of the latest improvements in IR v11.
Find more information about API v2.0 and IR v11 at https://docs.openvino.ai
Issue Type
Bug
OS
Ubuntu
OS architecture
x86_64
Programming Language
Python
Framework
OpenVINO
Download URL for ONNX / OpenVINO IR
https://digital-standard.com/threedpose/models/Resnet34_3inputs_448x448_20200609.onnx
Convert Script
simplified_onnx_model, success = onnxsim.simplify(onnx_model_path)
assert success, 'Failed to simplify the ONNX model. You may have to skip this step' print(f'Generating {simplified_onnx_model_path} ...') onnx.save(simplified_onnx_model, simplified_onnx_model_path)
mo --input_model /work/model_convert/test/onnx/Resnet34_3inputs_448x448_20200609.simple.onnx --input_shape [1,3,448,448] --output_dir /work/model_convert/test/openvino --data_type FP32
Description
Relevant Log Output
Source code for simple inference testing code
No response