PINTO0309 / openvino2tensorflow

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.
MIT License
334 stars 40 forks source link

"091_gaze-estimation-adas-0002" failed #139

Closed HzHzHzHzHz closed 1 year ago

HzHzHzHzHz commented 1 year ago

Issue Type

Bug

OS

Windows

OS architecture

x86_64

Programming Language

Python

Framework

OpenVINO, TensorFlow

Download URL for ONNX / OpenVINO IR

https://github.com/openvinotoolkit/open_model_zoo/tree/2021.2/models/intel/gaze-estimation-adas-0002 gaze-estimation-adas-0002.bin、gaze-estimation-adas-0002.xml

Convert Script

openvino2tensorflow \ --model_path openvino/gaze-estimation-adas-0002/gaze-estimation-adas-0002.xml \ --output_saved_model True \ --output_weight_quant_tflite True \ --string_formulas_for_normalization 'data / 255.0'

Description

Openvino's model conversion to onnx failed erro

Relevant Log Output

====================================================================================
layer_type: Const
layer_id: 106
tf_layers_dict_shape: (1,)
tf_layers_dict_value: [0]
====================================================================================
layer_type: Unsqueeze
layer_id: 107
input_layer0_shape: layer_id=105: Const(ndarray).shape (1,)
input_layer0_value: layer_id=105: [1]
input_layer1_shape: layer_id=106: Const(ndarray).shape (1,)
input_layer1_value: layer_id=106: [0]
tf_layers_dict_shape: (1, 1)
tf_layers_dict: [[1]]
indices: [0]
====================================================================================
layer_type: Const
layer_id: 108
tf_layers_dict_shape: (1,)
tf_layers_dict_value: [-1]
====================================================================================
ERROR: ConcatOp : Ranks of all input tensors should match: shape[0] = [1,1] vs. shape[1] = [1] [Op:ConcatV2] name: concat
ERROR: model_path  : E:\Htestp\PINTO_model_zoo-main\091_gaze-estimation-adas-0002\H\FP32\gaze-estimation-adas-0002.xml
ERROR: weights_path: E:\Htestp\PINTO_model_zoo-main\091_gaze-estimation-adas-0002\H\FP32\gaze-estimation-adas-0002.bin
ERROR: layer_id    : 109
ERROR: input_layer0 layer_id=107: tf.Tensor([[1]], shape=(1, 1), dtype=int64)
ERROR: input_layer1 layer_id=108: Const(ndarray).shape  (1,)
array([-1])
ERROR: The trace log is below.

Source code for simple inference testing code

No response

PINTO0309 commented 1 year ago

https://github.com/PINTO0309/PINTO_model_zoo/tree/main/091_gaze-estimation-adas-0002

HzHzHzHzHz commented 1 year ago

https://github.com/PINTO0309/PINTO_model_zoo/tree/main/091_gaze-estimation-adas-0002

The above error was made by referring to the method in this link