Pre-download onnx2tf calib file to preempt S3 issues (#6669)

Signed-off-by: Glenn Jocher <glenn.jocher@ultralytics.com>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Abirami Vina <abirami.vina@gmail.com>
This commit is contained in:
Glenn Jocher 2023-11-29 21:17:22 +01:00 committed by GitHub
parent 0a1d0033a0
commit f89bfd7e01
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 81 additions and 16 deletions

View file

@ -663,6 +663,11 @@ class Exporter:
import shutil
shutil.rmtree(f) # delete output folder
# Pre-download calibration file to fix https://github.com/PINTO0309/onnx2tf/issues/545
onnx2tf_file = Path('calibration_image_sample_data_20x128x128x3_float32.npy')
if not onnx2tf_file.exists():
attempt_download_asset(f'{onnx2tf_file}.zip', unzip=True, delete=True)
# Export to ONNX
self.args.simplify = True
f_onnx, _ = self.export_onnx()