-
Notifications
You must be signed in to change notification settings - Fork 84
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Error running custom model on STM32MP257 #49
Comments
Hello, First of all, I'd like to make sure I understand the operations you've performed:
To be able to run the model on our MP257 target using the object detection Python application, you need to modify the post-processing file to match the output of your model. If the number of outputs is different, please modify the /usr/local/x-linux-ai/object-detection/ssd_mobilenet_pp.py file to get the correct number of outputs. Regards, |
Hi,
Above are the graph of the .h5 model and the quantized .tflite model. The quantized model has 3 outputs too, right? Please advise, what modification of post-processing need to be done. Thank you. |
Hello, I managed to reproduce your issue, currently the Int8 outputs and/or inputs are not supported. Thanks, |
Hi, Thank you. |
Hello,
Some progress since our issues #47.
We have finished training a custom dataset for ssd_mobilenet_v2_fpn according to the wiki guide.
And also finished quantizing the model, with the following parameter:
quantization:
quantizer: TFlite_converter
quantization_type: PTQ
quantization_input_type: float
quantization_output_type: int8
granularity: per_tensor #per_tensor
optimize: True #can be True if per_tensor
export_dir: quantized_models
But when we run the model on the STM32MP257 eval kit, got the following errors:
RuntimeError: [TFLITE] Failed reading output: Unsupported output tensor type.
Traceback (most recent call last):
File "/usr/local/x-linux-ai/object-detection/stai_mpu_object_detection.py", line 396, in new_sample
self.app.nn_result_locations, self.app.nn_result_classes, self.app.nn_result_scores = self.nn.get_results()
^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/x-linux-ai/object-detection/ssd_mobilenet_pp.py", line 113, in get_results
anchors = self.stai_mpu_model.get_output(index=2)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.11/site-packages/stai_mpu/stai_mpu/network.py", line 48, in get_output
output_tensor: NDArray = self._exec.get_output(index)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
What could be the problem?
Thank you.
The text was updated successfully, but these errors were encountered: