|
17 | 17 | TensorFlow.js | `tfjs` | yolov5s_web_model/
|
18 | 18 |
|
19 | 19 | Usage:
|
20 |
| - $ python path/to/export.py --weights yolov5s.pt --include torchscript onnx coreml openvino saved_model tflite tfjs |
| 20 | + $ python path/to/export.py --weights yolov5s.pt --include torchscript onnx openvino engine coreml tflite ... |
21 | 21 |
|
22 | 22 | Inference:
|
23 | 23 | $ python path/to/detect.py --weights yolov5s.pt # PyTorch
|
@@ -179,7 +179,7 @@ def export_engine(model, im, file, train, half, simplify, workspace=4, verbose=F
|
179 | 179 | export_onnx(model, im, file, 12, train, False, simplify) # opset 12
|
180 | 180 | model.model[-1].anchor_grid = grid
|
181 | 181 | else: # TensorRT >= 8
|
182 |
| - check_version(trt.__version__, '7.0.0', hard=True) # require tensorrt>=8.0.0 |
| 182 | + check_version(trt.__version__, '8.0.0', hard=True) # require tensorrt>=8.0.0 |
183 | 183 | export_onnx(model, im, file, 13, train, False, simplify) # opset 13
|
184 | 184 | onnx = file.with_suffix('.onnx')
|
185 | 185 | assert onnx.exists(), f'failed to export ONNX file: {onnx}'
|
@@ -308,7 +308,7 @@ def export_tflite(keras_model, im, file, int8, data, ncalib, prefix=colorstr('Te
|
308 | 308 | def export_edgetpu(keras_model, im, file, prefix=colorstr('Edge TPU:')):
|
309 | 309 | # YOLOv5 Edge TPU export https://coral.ai/docs/edgetpu/models-intro/
|
310 | 310 | try:
|
311 |
| - cmd = 'edgetpu_compiler --version' |
| 311 | + cmd = 'edgetpu_compiler --version' # install https://coral.ai/docs/edgetpu/compiler/ |
312 | 312 | out = subprocess.run(cmd, shell=True, capture_output=True, check=True)
|
313 | 313 | ver = out.stdout.decode().split()[-1]
|
314 | 314 | LOGGER.info(f'\n{prefix} starting export with Edge TPU compiler {ver}...')
|
|
0 commit comments