TexasInstruments / edgeai-tidl-tools

Edgeai TIDL Tools and Examples - This repository contains Tools and example developed for Deep learning runtime (DLRT) offering provided by TI’s edge AI solutions.
Other
121 stars 27 forks source link

Error runing models on chip with TFLite #40

Closed montmejat closed 1 year ago

montmejat commented 1 year ago

Hello,

I compiled the models on my computer, copied them to my Beaglebone AI-64, and I'm now trying to run tflrt_delegate.py. However, I'm gettting this error:

$ python tflrt_delegate.py 
Running 3 Models - ['cl-tfl-mobilenet_v1_1.0_224', 'ss-tfl-deeplabv3_mnv2_ade20k_float', 'od-tfl-ssd_mobilenet_v2_300_float']

Running_Model :  cl-tfl-mobilenet_v1_1.0_224

 Number of subgraphs:0 , 0 nodes delegated out of 34 nodes 

/home/aurelien/Projects/GitHub/edgeai-tidl-tools/examples/osrt_python/tfl/tflrt_delegate.py:87: DeprecationWarning: LANCZOS is deprecated and will be removed in Pillow 10 (2023-07-01). Use Resampling.LANCZOS instead.
  imgs.append(Image.open(image_files[i]).convert('RGB').resize((new_width, new_height), PIL.Image.LANCZOS))
INFO: Created TensorFlow Lite XNNPACK delegate for CPU.
Traceback (most recent call last):
  File "/home/aurelien/Projects/GitHub/edgeai-tidl-tools/examples/osrt_python/tfl/tflrt_delegate.py", line 250, in <module>
    run_model(model, mIdx)
  File "/home/aurelien/Projects/GitHub/edgeai-tidl-tools/examples/osrt_python/tfl/tflrt_delegate.py", line 179, in run_model
    imgs, output, proc_time, sub_graph_time, ddr_write, ddr_read, new_height, new_width  = infer_image(interpreter, input_images, config)
  File "/home/aurelien/Projects/GitHub/edgeai-tidl-tools/examples/osrt_python/tfl/tflrt_delegate.py", line 109, in infer_image
    copy_time, proc_time, sub_graphs_proc_time, ddr_write, ddr_read  = get_benchmark_output(interpreter)
  File "/home/aurelien/Projects/GitHub/edgeai-tidl-tools/examples/osrt_python/tfl/tflrt_delegate.py", line 50, in get_benchmark_output
    benchmark_dict = interpreter.get_TI_benchmark_data()
AttributeError: 'Interpreter' object has no attribute 'get_TI_benchmark_data'

What could I have missed? Thanks

montmejat commented 1 year ago

Aah never mind, I had to set export DEVICE=am62. I have no idea what j7 and am62 mean... But it works!