From 562191f5756273aca54225903f5933f7683daade Mon Sep 17 00:00:00 2001 From: Glenn Jocher Date: Wed, 17 Nov 2021 15:18:50 +0100 Subject: [PATCH] Update export.py docstring (#5689) --- export.py | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) diff --git a/export.py b/export.py index 4cf30e34fc7b..b3ab4df25ae3 100644 --- a/export.py +++ b/export.py @@ -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