This script converts the ONNX/OpenVINO IR model to Tensorflow's saved_model, tflite, h5, tfjs, tftrt(TensorRT), CoreML, EdgeTPU, ONNX and pb. PyTorch (NCHW) -> ONNX (NCHW) -> OpenVINO (NCHW) -> openvino2tensorflow -> Tensorflow/Keras (NHWC/NCHW) -> TFLite (NHWC/NCHW). And the conversion from .pb to saved_model and from saved_model to .pb and from .pb to .tflite and saved_model to .tflite and saved_model to onnx. Support for building environments with Docker. It is possible to directly access the host PC GUI and the camera to verify the operation. NVIDIA GPU (dGPU) support. Intel iHD GPU (iGPU) support.
Now I'm facing a different error that does not seem to be related from the transpose error?
ERROR: int() argument must be a string, a bytes-like object or a number, not 'KerasTensor'
ERROR: model_path : model.xml
ERROR: weights_path: model.bin
ERROR: layer_id : 290
ERROR: The trace log is below.
Traceback (most recent call last):
File "/usr/local/bin/openvino2tensorflow", line 5397, in convert
axis = int(tf_layers_dict[get_tf_edges_from(tf_edges, layer_id, 1)])
TypeError: int() argument must be a string, a bytes-like object or a number, not 'KerasTensor'
ERROR: Please refer to 6-7 in the README first. https://github.com/PINTO0309/openvino2tensorflow
I recommend the use of the latest tool here. No conversion errors occur and no accuracy errors are introduced. It also supports complex models such as Transformer. openvino2tensorflow is not actively maintained at this time.
https://github.com/PINTO0309/onnx2tf
Issue Type
Others
OS
Ubuntu
OS architecture
x86_64
Programming Language
Python
Framework
PyTorch
Download URL for ONNX / OpenVINO IR
model.zip
Convert Script
The model
model.onnx
in model.zip was created using Yolov5I'm running all the following scripts in this docker container
First, I simplify the model (from model.zip)
onnxsim model.onnx model_sim.onnx
mo --input_model model_sim.onnx
openvino2tensorflow --model_path model_sim.xml --model_output_path model -- output_saved_model --output_pb --non_verbose
At this point I got errors ERROR: axes don't match array but I could solve this using your instructions in https://github.com/PINTO0309/openvino2tensorflow/issues/125 using
Description
Now I'm facing a different error that does not seem to be related from the transpose error?
Is there something wrong with my model?
Relevant Log Output
Source code for simple inference testing code
-