The YOLOv11 object detection model can be converted to int8.tflite using Ultralytics APIs. However, when converting the .pt model to .onnx and subsequently to .tflite using EIQ model conversion tools, it shows conversion errors indicating that the model is not a TorchScript (.pt → .onnx), and the conversion from .onnx to .tflite does not show quantization options. Help in this regard would be appreciated to convert the YOLOv11 model without using Ultralytics APIs but with the EIQ toolkit. Thanks!
@Zhiming_Liu Thanks for the reply!
For point no. 1, do you mean to say .pt to .onnx, as ultralytics provide that option. As ultralytics provide that option of converting .pt to .onnx, to best of my knowledge, .pb to .onnx is not provided in its API, and if it is so can you please share the link to the resource mentioning the same.
I appreciate your quick and prompt response. Thanks!
Hi @swapnildaphal
If the ultralytics disabled the onnx export, you can export .pb to tflite without any quantization, then use eIQ to export tflite with quantization.
Best Regards,
Zhiming
@Zhiming_Liu Ultralytics does provide the option of .pt to .onnx, shall I use it for the conversion.
Hi @swapnildaphal
Yes, you can use that option.
Best Regards,
Zhiming
Hi @swapnildaphal
Please use below steps:
1. Convert .pb to .onnx with Ultralytics Apis
2.Convert .onnx to .tflite with quantization in eIQ, need to setup the dataset folder in quantization option.
Best Regards,
Zhiming