ultralytics / ultralytics

Ultralytics YOLO11 🚀
https://docs.ultralytics.com
GNU Affero General Public License v3.0
31.95k stars 6.12k forks source link

Reuse .cache file when export pt to TensorRT int8 #16005

Open thangphung215 opened 1 month ago

thangphung215 commented 1 month ago

Search before asking

Description

When export to TensorRT int8, data='data.yaml' show the path of dataset to calibrate. However, we cannot copy dataset to many place when export. To minimize the data copy, I think .cache file should be reuse to solve this, like polygraph,...

Use case

This feature is used any time model need to be exported with the same dataset without copying data to everywhere

Additional

No response

Are you willing to submit a PR?

Skillnoob commented 1 month ago

Typically you don't want to use the same dataset that has been used for training when exporting to tensorrt with int8 enabled. This is because during export it will calibrate on the dataset give, which will take very long if your dataset is very large.