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

OpenVINO to Tensorflow #76

Closed Praveen-24-mvp closed 2 years ago

Praveen-24-mvp commented 2 years ago

Hi I tied to convert the OpenVINO .xml .bin to TensorFlow but an error occurred.

ERROR: 'BIN' ERROR: model_path : /home/local/ZOHOCORP/praveen-10508/intel/openvino_2021.4.582/deployment_tools/open_model_zoo/tools/downloader/intel/resnet50-binary-0001/FP32-INT1/resnet50-binary-0001.xml ERROR: weights_path: /home/local/ZOHOCORP/praveen-10508/intel/openvino_2021.4.582/deployment_tools/open_model_zoo/tools/downloader/intel/resnet50-binary-0001/FP32-INT1/resnet50-binary-0001.bin ERROR: layer_id : 16 ERROR: The trace log is below. Traceback (most recent call last): File "openvino2tensorflow.py", line 555, in convert formatstring = '<' + format_config[prec][0] * (len(blobBin)//format_config[prec][1]) KeyError: 'BIN'

this is the received error

Command Used --- python3 openvino2tensorflow.py --model_path /home/intel/openvino_2021.4.582/deployment_tools/open_model_zoo/tools/downloader/intel/resnet50-binary-0001/FP32-INT1/resnet50-binary-0001.xml --output_saved_model

PINTO0309 commented 2 years ago

There are no plans to support INT1 conversion.

Praveen-24-mvp commented 2 years ago

There are no plans to support INT1 conversion.

Sorry My Bad , I didn't notice that , But I gave another model , but it return's like PriorBoxClustered layer in not yet implemented , Can You able to explain it , what this it defines

PINTO0309 commented 2 years ago

It is a duplicate issue. It is currently a low priority for implementation because it can be replaced by other models. https://github.com/PINTO0309/openvino2tensorflow/issues/31

Praveen-24-mvp commented 2 years ago

It is a duplicate issue. It is currently a low priority for implementation because it can be replaced by other models. #31

Okay, Well, I tried the instance-segmentation model in openvino, but received an error like this

ERROR: The trace log is below. Traceback (most recent call last): File "openvino2tensorflow.py", line 4585, in convert dtype=tf_layers_dict[get_tf_edges_from(tf_edges, layer_id, 0)].dtype File "/home/local/mainEnv/lib/python3.7/site-packages/tensorflow/python/util/traceback_utils.py", line 153, in error_handler raise e.with_traceback(filtered_tb) from None File "/home/local/mainEnv/lib/python3.7/site-packages/tensorflow/python/framework/ops.py", line 7107, in raise_from_not_ok_status raise core._status_to_exception(e) from None # pylint: disable=protected-access tensorflow.python.framework.errors_impl.InvalidArgumentError: dims must represent a vector, got shape [256,1] [Op:Fill]

I didn't get what this error is, Can anyone able to explain and help me with this.

HeXCZ1028 commented 2 years ago

I also mee this message"tensorflow.python.framework.errors_impl.InvalidArgumentError: dims must represent a vector, got shape [160,1] [Op:Fill]"