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

No json file #33

Closed watermellon2018 closed 1 year ago

watermellon2018 commented 1 year ago

Issue Type

Bug

OS

Ubuntu

OS architecture

x86_64

Programming Language

Python

Framework

TensorFlow, TensorFlowLite

Download URL for tflite file

I get model from mediapipe PoseEstimate

Convert Script

tflite2tensorflow --model_path pose_landmark_heavy.tflite --flatc_path ../flatc --schema_path ../schema.fbs --output_pb

Description

When i want to convert model from mediapipe (PoseEstimate) tensorflow lite i get error that no exist json file. I have only tensorflow lite model. I run at local machine, not docker

Relevant Log Output

output json command = ../flatc -t --strict-json --defaults-json -o . ../schema.fbs -- pose_landmark_heavy.tflite
sh: 1: ../flatc: not found
Traceback (most recent call last):
  File "tflite2tf/tflite2tf/bin/tflite2tensorflow", line 6614, in <module>
    main()
  File "tflite2tf/tflite2tf/bin/tflite2tensorflow", line 5861, in main
    ops, json_tensor_details, op_types, full_json = parse_json(jsonfile_path)
  File "tflite2tf/tflite2tf/bin/tflite2tensorflow", line 247, in parse_json
    j = json.load(open(jsonfile_path))
FileNotFoundError: [Errno 2] No such file or directory: './pose_landmark_heavy.json'

Source code for simple inference testing code

No response

PINTO0309 commented 1 year ago

Use Docker.

Either flatc or schema.fbs has not been properly installed according to the README instructions, or the two files simply do not exist in the specified path.