Update export.py docstring (#5689)
parent
47fac9ff73
commit
562191f575
18
export.py
18
export.py
|
@ -1,14 +1,26 @@
|
||||||
# YOLOv5 🚀 by Ultralytics, GPL-3.0 license
|
# YOLOv5 🚀 by Ultralytics, GPL-3.0 license
|
||||||
"""
|
"""
|
||||||
Export a YOLOv5 PyTorch model to TorchScript, ONNX, CoreML, TensorFlow (saved_model, pb, TFLite, TF.js,) formats
|
Export a YOLOv5 PyTorch model to other formats. TensorFlow exports authored by https://github.com/zldrobit
|
||||||
TensorFlow exports authored by https://github.com/zldrobit
|
|
||||||
|
Format | Example | Export `include=(...)` argument
|
||||||
|
--- | --- | ---
|
||||||
|
PyTorch | yolov5s.pt | -
|
||||||
|
TorchScript | yolov5s.torchscript.pt | 'torchscript'
|
||||||
|
ONNX | yolov5s.onnx | 'onnx'
|
||||||
|
CoreML | yolov5s.mlmodel | 'coreml'
|
||||||
|
TensorFlow SavedModel | yolov5s_saved_model/ | 'saved_model'
|
||||||
|
TensorFlow GraphDef | yolov5s.pb | 'pb'
|
||||||
|
TensorFlow Lite | yolov5s.tflite | 'tflite'
|
||||||
|
TensorFlow.js | yolov5s_web_model/ | 'tfjs'
|
||||||
|
|
||||||
Usage:
|
Usage:
|
||||||
$ python path/to/export.py --weights yolov5s.pt --include torchscript onnx coreml saved_model pb tflite tfjs
|
$ python path/to/export.py --weights yolov5s.pt --include torchscript onnx coreml saved_model pb tflite tfjs
|
||||||
|
|
||||||
Inference:
|
Inference:
|
||||||
$ python path/to/detect.py --weights yolov5s.pt
|
$ python path/to/detect.py --weights yolov5s.pt
|
||||||
yolov5s.onnx (must export with --dynamic)
|
yolov5s.torchscript.pt
|
||||||
|
yolov5s.onnx
|
||||||
|
yolov5s.mlmodel (under development)
|
||||||
yolov5s_saved_model
|
yolov5s_saved_model
|
||||||
yolov5s.pb
|
yolov5s.pb
|
||||||
yolov5s.tflite
|
yolov5s.tflite
|
||||||
|
|
Loading…
Reference in New Issue