Skip to content

Commit 562191f

Browse files
authored
Update export.py docstring (ultralytics#5689)
1 parent 47fac9f commit 562191f

File tree

1 file changed

+15
-3
lines changed

1 file changed

+15
-3
lines changed

export.py

+15-3
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,26 @@
11
# YOLOv5 🚀 by Ultralytics, GPL-3.0 license
22
"""
3-
Export a YOLOv5 PyTorch model to TorchScript, ONNX, CoreML, TensorFlow (saved_model, pb, TFLite, TF.js,) formats
4-
TensorFlow exports authored by https://github.com/zldrobit
3+
Export a YOLOv5 PyTorch model to other formats. TensorFlow exports authored by https://github.com/zldrobit
4+
5+
Format | Example | Export `include=(...)` argument
6+
--- | --- | ---
7+
PyTorch | yolov5s.pt | -
8+
TorchScript | yolov5s.torchscript.pt | 'torchscript'
9+
ONNX | yolov5s.onnx | 'onnx'
10+
CoreML | yolov5s.mlmodel | 'coreml'
11+
TensorFlow SavedModel | yolov5s_saved_model/ | 'saved_model'
12+
TensorFlow GraphDef | yolov5s.pb | 'pb'
13+
TensorFlow Lite | yolov5s.tflite | 'tflite'
14+
TensorFlow.js | yolov5s_web_model/ | 'tfjs'
515
616
Usage:
717
$ python path/to/export.py --weights yolov5s.pt --include torchscript onnx coreml saved_model pb tflite tfjs
818
919
Inference:
1020
$ python path/to/detect.py --weights yolov5s.pt
11-
yolov5s.onnx (must export with --dynamic)
21+
yolov5s.torchscript.pt
22+
yolov5s.onnx
23+
yolov5s.mlmodel (under development)
1224
yolov5s_saved_model
1325
yolov5s.pb
1426
yolov5s.tflite

0 commit comments

Comments
 (0)