glenn-jocher
commited on
Commit
β’
562191f
1
Parent(s):
47fac9f
Update export.py docstring (#5689)
Browse files
export.py
CHANGED
@@ -1,14 +1,26 @@
|
|
1 |
# YOLOv5 π by Ultralytics, GPL-3.0 license
|
2 |
"""
|
3 |
-
Export a YOLOv5 PyTorch model to
|
4 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
5 |
|
6 |
Usage:
|
7 |
$ python path/to/export.py --weights yolov5s.pt --include torchscript onnx coreml saved_model pb tflite tfjs
|
8 |
|
9 |
Inference:
|
10 |
$ python path/to/detect.py --weights yolov5s.pt
|
11 |
-
yolov5s.
|
|
|
|
|
12 |
yolov5s_saved_model
|
13 |
yolov5s.pb
|
14 |
yolov5s.tflite
|
|
|
1 |
# YOLOv5 π by Ultralytics, GPL-3.0 license
|
2 |
"""
|
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'
|
15 |
|
16 |
Usage:
|
17 |
$ python path/to/export.py --weights yolov5s.pt --include torchscript onnx coreml saved_model pb tflite tfjs
|
18 |
|
19 |
Inference:
|
20 |
$ python path/to/detect.py --weights yolov5s.pt
|
21 |
+
yolov5s.torchscript.pt
|
22 |
+
yolov5s.onnx
|
23 |
+
yolov5s.mlmodel (under development)
|
24 |
yolov5s_saved_model
|
25 |
yolov5s.pb
|
26 |
yolov5s.tflite
|