PINTO0309 / tflite2tensorflow

Generate saved_model, tfjs, tf-trt, EdgeTPU, CoreML, quantized tflite, ONNX, OpenVINO, Myriad Inference Engine blob and .pb from .tflite. 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. Supports inverse quantization of INT8 quantization model.
https://qiita.com/PINTO
MIT License
258 stars 38 forks source link

segm_full_v679.tflite and segm_full_v679_opt.tflite #12

Closed wangqi-cybrook closed 3 years ago

wangqi-cybrook commented 3 years ago

I run the following sample test.

python tflite2tensorflow.py --model_path segm_full_v679.tflite --flatc_path ../flatc --schema_path ../schema.fbs --output_pb

And I got the following error.

Traceback (most recent call last): File "tflite2tensorflow.py", line 4816, in main() File "tflite2tensorflow.py", line 4279, in main interpreter.allocate_tensors() File "/usr/local/lib/python3.6/dist-packages/tensorflow/lite/python/interpreter.py", line 408, in allocate_tensors return self._interpreter.AllocateTensors() RuntimeError: Encountered unresolved custom op: Convolution2DTransposeBias.Node number 240 (Convolution2DTransposeBias) failed to prepare

However, it works if the input model is changed to segm_full_v679_opt.tflite which is from PINTO_model_zoo/082_MediaPipe_Meet.

Could you add the conversion from segm_full_v679.tflite to segm_full_v679_opt.tflite into the script?

Thanks!

wangqi-cybrook commented 3 years ago

https://github.com/PINTO0309/PINTO_model_zoo/issues/59

In the above link, you ever mentioned "the Convolution2DTransposeBias layer is not implemented in TensorFlow Lite"

PINTO0309 commented 3 years ago

I have a special modification of TensorFlow. Please follow the tutorial. https://github.com/PINTO0309/tflite2tensorflow#3-setup