Hi guys,
This is the link to the ML guide, https://www.nxp.com/docs/en/user-guide/IMX-MACHINE-LEARNING-UG.pdf.
Chapter "8.1.2 SSD object detection demo" uses the model ssd_mobilenet_v1_quant.tflite. The problem I found with that model is that cannot be converted with vela, thereby I cannot use the i.MX93 NPU.
Compiling manually the model "ssd_mobilenet_v1_quant.tflite", it cannot be converted, returning the next error
Error: Invalid TFLite file. Got "unpack_from requires a buffer of at least 1836597056 bytes for unpacking 4 bytes at offset 1836597052 (actual buffer size is 298)" while parsing buffers length.
So, here there are two points.
- os.system('vela ' + model + " --output-dir " + vela_dir)
+ ret = os.system('vela ' + model + " --output-dir " + vela_dir)
+ if ret != 0:
+ print(f"Error: Failed to convert model {name} with vela")
+ import sys
+ sys.exit(1)
BR / Isaac
Solved! Go to Solution.
Hi @ihermida
a) do you plan to fix download_models.py to report error on failure when downloading or converting the model?
>>>Actually, we have found this error before, And will fix it on the next version BSP code
b) do you know of any well known mirror where to obtain the ssd_mobilenet_v1_quant.tflite model?
>>>You can use the attachment ssd_mobilenet_v1.tflite file.
Hi @ihermida
a) do you plan to fix download_models.py to report error on failure when downloading or converting the model?
>>>Actually, we have found this error before, And will fix it on the next version BSP code
b) do you know of any well known mirror where to obtain the ssd_mobilenet_v1_quant.tflite model?
>>>You can use the attachment ssd_mobilenet_v1.tflite file.
Hi @pengyong_zhang ,
The problem is that link is broken, I get an access denied from the link https://storage.googleapis.com/tfhub-lite-models/tensorflow/lite-model/ssd_mobilenet_v1/1/metadata/2...
The error is
<Error>
<Code>AccessDenied</Code>
<Message>Access denied.</Message>
<Details>Anonymous caller does not have storage.objects.get access to the Google Cloud Storage object. Permission 'storage.objects.get' denied on resource (or it may not exist).</Details>
</Error>
So, as commented initially, there are two problems:
I can download that model from other locations manually, but this failure is currently broking my yocto build (as I do check if the model was correctly downloaded).
a) do you plan to fix download_models.py to report error on failure when downloading or converting the model?
b) do you know of any well known mirror where to obtain the ssd_mobilenet_v1_quant.tflite model?
BR / Isaac
HI @ihermida
If you can not be converted to vela model, you can delete it and re-download by yourself, then re-covert again by vela command.
I can convert it to vela model without any error on my iMX93 EVK board.
B.R