Skip to content

Commit

Permalink
Update export.py docstring (#5689)
Browse files Browse the repository at this point in the history
  • Loading branch information
glenn-jocher committed Nov 17, 2021
1 parent 47fac9f commit 562191f
Showing 1 changed file with 15 additions and 3 deletions.
18 changes: 15 additions & 3 deletions export.py
Original file line number Diff line number Diff line change
@@ -1,14 +1,26 @@
# YOLOv5 🚀 by Ultralytics, GPL-3.0 license
"""
Export a YOLOv5 PyTorch model to TorchScript, ONNX, CoreML, TensorFlow (saved_model, pb, TFLite, TF.js,) formats
TensorFlow exports authored by https://github.com/zldrobit
Export a YOLOv5 PyTorch model to other formats. 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:
$ python path/to/export.py --weights yolov5s.pt --include torchscript onnx coreml saved_model pb tflite tfjs
Inference:
$ 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.pb
yolov5s.tflite
Expand Down

0 comments on commit 562191f

Please sign in to comment.