Ultralytics Code Refactor https://ultralytics.com/actions (#13191)
* Refactor code for speed and clarity * Auto-format by https://ultralytics.com/actions --------- Co-authored-by: UltralyticsAssistant <web@ultralytics.com>
This commit is contained in:
1 parent
41e26a7f83
commit
12be49963c
6 files changed
+216
-213
No files matched your search
+5
-5
@@ -78,10 +78,11 @@ def run(
|
||||
None. Logs information about the benchmark results, including the format, size, mAP50-95, and inference time.
|
||||
|
||||
Notes:
|
||||
Supported export formats and models include PyTorch, TorchScript, ONNX, OpenVINO, TensorRT, CoreML, TensorFlow
|
||||
SavedModel, TensorFlow GraphDef, TensorFlow Lite, and TensorFlow Edge TPU. Edge TPU and TF.js are unsupported.
|
||||
Supported export formats and models include PyTorch, TorchScript, ONNX, OpenVINO, TensorRT, CoreML,
|
||||
TensorFlow SavedModel, TensorFlow GraphDef, TensorFlow Lite, and TensorFlow Edge TPU. Edge TPU and TF.js
|
||||
are unsupported.
|
||||
|
||||
Examples:
|
||||
Example:
|
||||
```python
|
||||
$ python benchmarks.py --weights yolov5s.pt --img 640
|
||||
```
|
||||
@@ -190,7 +191,6 @@ def test(
|
||||
$ pip install -r requirements.txt coremltools onnx onnx-simplifier onnxruntime openvino-dev tensorflow-cpu # CPU support
|
||||
$ pip install -r requirements.txt coremltools onnx onnx-simplifier onnxruntime-gpu openvino-dev tensorflow # GPU support
|
||||
$ pip install -U nvidia-tensorrt --index-url https://pypi.ngc.nvidia.com # TensorRT
|
||||
|
||||
Run export tests:
|
||||
$ python benchmarks.py --weights yolov5s.pt --img 640
|
||||
"""
|
||||
@@ -263,7 +263,7 @@ def main(opt):
|
||||
|
||||
Args:
|
||||
opt (argparse.Namespace): Parsed command-line arguments including options for weights, image size, batch size, data
|
||||
configuration, device, and other flags for inference settings.
|
||||
configuration, device, and other flags for inference settings.
|
||||
|
||||
Returns:
|
||||
None: This function does not return any value. It leverages side-effects such as logging and running benchmarks.
|
||||
|
||||
Reference in new issue
Block a user