glenn-jocher commited on
Commit
562191f
β€’
1 Parent(s): 47fac9f

Update export.py docstring (#5689)

Browse files
Files changed (1) hide show
  1. export.py +15 -3
export.py CHANGED
@@ -1,14 +1,26 @@
1
  # YOLOv5 πŸš€ by Ultralytics, GPL-3.0 license
2
  """
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
 
 
 
 
 
 
 
 
 
 
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.onnx (must export with --dynamic)
 
 
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