Closed JNaranjo-Alcazar closed 2 years ago
@JNaranjo-Alcazar TFLite export should be done on CPU:
!python export.py --weights yolov5s.pt --include tflite
!python export.py --weights yolov5s.pt --include tflite --int8
TFlite models are intended for Android and EdgeTPU backends, they can not exploit CUDA devices and will be slower on CPU than simple PyTorch models.
Thanks for the quick reply @glenn-jocher. Just to make it clear, the fastest inference on GPU (Jetson GPU) is using the pb model? It does not make sense to run a tflite model inference on Jetson (using the GPU)?
@JNaranjo-Alcazar well I've never used Jetson myself, but I don't believe TFLite has CUDA capability, or perhaps I'm just not aware of it.
In general the simplest CUDA inference will be with PyTorch, and the fastest is likely TensorRT.
π Hello, this issue has been automatically marked as stale because it has not had recent activity. Please note it will be closed if no further activity occurs.
Access additional YOLOv5 π resources:
Access additional Ultralytics β‘ resources:
Feel free to inform us of any other issues you discover or feature requests that come to mind in the future. Pull Requests (PRs) are also always welcomed!
Thank you for your contributions to YOLOv5 π and Vision AI β!
Search before asking
YOLOv5 Component
Export
Bug
Environment
YOLOv5 \U0001f680 v6.0-23-ga18b0c3 torch 1.9.0 CUDA:0 (NVIDIA Tegra X2, 7850.375MB) OS: Ubuntu 18.04 on Jetson TX2 Python 3.6.9
Minimal Reproducible Example
python3 export.py --weights yolov5s.pt --include tflite --device 0
Additional
When converting models to tflite, the inference on the Jetson is slower. I thinks that is because I do not export with cuda device. When trying, I get the error pasted above
Are you willing to submit a PR?