Add missing validated args to TorchScript, CoreML, ExecuTorch integration pages (#24207)
Signed-off-by: Onuralp SEZER <onuralp@ultralytics.com> Co-authored-by: UltralyticsAssistant <web@ultralytics.com> Co-authored-by: Onuralp SEZER <onuralp@ultralytics.com>
This commit is contained in:
parent
49deea630a
commit
117accf360
@ -117,15 +117,16 @@ Before diving into the usage instructions, be sure to check out the range of [YO
|
||||
|
||||
### Export Arguments
|
||||
|
||||
| Argument | Type | Default | Description |
|
||||
| -------- | ---------------- | ---------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||
| `format` | `str` | `'coreml'` | Target format for the exported model, defining compatibility with various deployment environments. |
|
||||
| `imgsz` | `int` or `tuple` | `640` | Desired image size for the model input. Can be an integer for square images or a tuple `(height, width)` for specific dimensions. |
|
||||
| `half` | `bool` | `False` | Enables FP16 (half-precision) quantization, reducing model size and potentially speeding up inference on supported hardware. |
|
||||
| `int8` | `bool` | `False` | Activates INT8 quantization, further compressing the model and speeding up inference with minimal [accuracy](https://www.ultralytics.com/glossary/accuracy) loss, primarily for edge devices. |
|
||||
| `nms` | `bool` | `False` | Adds Non-Maximum Suppression (NMS), essential for accurate and efficient detection post-processing. |
|
||||
| `batch` | `int` | `1` | Specifies export model batch inference size or the max number of images the exported model will process concurrently in `predict` mode. |
|
||||
| `device` | `str` | `None` | Specifies the device for exporting: GPU (`device=0`), CPU (`device=cpu`), MPS for Apple silicon (`device=mps`). |
|
||||
| Argument | Type | Default | Description |
|
||||
| --------- | ---------------- | ---------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||
| `format` | `str` | `'coreml'` | Target format for the exported model, defining compatibility with various deployment environments. |
|
||||
| `imgsz` | `int` or `tuple` | `640` | Desired image size for the model input. Can be an integer for square images or a tuple `(height, width)` for specific dimensions. |
|
||||
| `dynamic` | `bool` | `False` | Allows dynamic input sizes, enhancing flexibility in handling varying image dimensions. |
|
||||
| `half` | `bool` | `False` | Enables FP16 (half-precision) quantization, reducing model size and potentially speeding up inference on supported hardware. |
|
||||
| `int8` | `bool` | `False` | Activates INT8 quantization, further compressing the model and speeding up inference with minimal [accuracy](https://www.ultralytics.com/glossary/accuracy) loss, primarily for edge devices. |
|
||||
| `nms` | `bool` | `False` | Adds Non-Maximum Suppression (NMS), essential for accurate and efficient detection post-processing. |
|
||||
| `batch` | `int` | `1` | Specifies export model batch inference size or the max number of images the exported model will process concurrently in `predict` mode. |
|
||||
| `device` | `str` | `None` | Specifies the device for exporting: GPU (`device=0`), CPU (`device=cpu`), MPS for Apple silicon (`device=mps`). |
|
||||
|
||||
!!! tip
|
||||
|
||||
|
||||
@ -103,11 +103,12 @@ Exporting YOLO26 models to ExecuTorch is straightforward:
|
||||
|
||||
When exporting to ExecuTorch format, you can specify the following arguments:
|
||||
|
||||
| Argument | Type | Default | Description |
|
||||
| -------- | --------------- | ------- | --------------------------------------------------------------------------------------------------------------------------------------- |
|
||||
| `imgsz` | `int` or `list` | `640` | Image size for model input (height, width). |
|
||||
| `batch` | `int` | `1` | Specifies export model batch inference size or the max number of images the exported model will process concurrently in `predict` mode. |
|
||||
| `device` | `str` | `'cpu'` | Device to use for export (`'cpu'`). |
|
||||
| Argument | Type | Default | Description |
|
||||
| -------- | ---------------- | -------------- | --------------------------------------------------------------------------------------------------------------------------------------- |
|
||||
| `format` | `str` | `'executorch'` | Target format for the exported model, defining compatibility with various deployment environments. |
|
||||
| `imgsz` | `int` or `tuple` | `640` | Desired image size for the model input. Can be an integer for square images or a tuple `(height, width)` for specific dimensions. |
|
||||
| `batch` | `int` | `1` | Specifies export model batch inference size or the max number of images the exported model will process concurrently in `predict` mode. |
|
||||
| `device` | `str` | `None` | Specifies the device for exporting: GPU (`device=0`), CPU (`device=cpu`), MPS for Apple silicon (`device=mps`). |
|
||||
|
||||
### Output Structure
|
||||
|
||||
|
||||
@ -112,6 +112,7 @@ All [Ultralytics YOLO26 models](../models/index.md) are designed to support expo
|
||||
| `format` | `str` | `'torchscript'` | Target format for the exported model, defining compatibility with various deployment environments. |
|
||||
| `imgsz` | `int` or `tuple` | `640` | Desired image size for the model input. Can be an integer for square images or a tuple `(height, width)` for specific dimensions. |
|
||||
| `dynamic` | `bool` | `False` | Allows dynamic input sizes, enhancing flexibility in handling varying image dimensions. |
|
||||
| `half` | `bool` | `False` | Enables FP16 (half-precision) quantization, reducing model size and potentially speeding up inference on supported hardware. |
|
||||
| `optimize` | `bool` | `False` | Applies optimization for mobile devices, potentially reducing model size and improving performance. |
|
||||
| `nms` | `bool` | `False` | Adds Non-Maximum Suppression (NMS), essential for accurate and efficient detection post-processing. |
|
||||
| `batch` | `int` | `1` | Specifies export model batch inference size or the max number of images the exported model will process concurrently in `predict` mode. |
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user