Reformat Docs and YAMLs (#12806)

Signed-off-by: Glenn Jocher <glenn.jocher@ultralytics.com>
This commit is contained in:
Glenn Jocher 2024-05-18 22:17:57 +02:00 committed by GitHub
parent d25dd182d6
commit e8e434fe48
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
26 changed files with 325 additions and 324 deletions

View file

@ -93,12 +93,16 @@ sudo docker pull $t
## Running Ultralytics in Docker Container ## Running Ultralytics in Docker Container
Here's how to execute the Ultralytics Docker container: Here's how to execute the Ultralytics Docker container:
### Using only the CPU ### Using only the CPU
```bash ```bash
# Run with all GPUs # Run with all GPUs
sudo docker run -it --ipc=host $t sudo docker run -it --ipc=host $t
``` ```
### Using GPUs ### Using GPUs
```bash ```bash
# Run with all GPUs # Run with all GPUs
sudo docker run -it --ipc=host --gpus all $t sudo docker run -it --ipc=host --gpus all $t
@ -109,7 +113,6 @@ sudo docker run -it --ipc=host --gpus '"device=2,3"' $t
The `-it` flag assigns a pseudo-TTY and keeps stdin open, allowing you to interact with the container. The `--ipc=host` flag enables sharing of host's IPC namespace, essential for sharing memory between processes. The `--gpus` flag allows the container to access the host's GPUs. The `-it` flag assigns a pseudo-TTY and keeps stdin open, allowing you to interact with the container. The `--ipc=host` flag enables sharing of host's IPC namespace, essential for sharing memory between processes. The `--gpus` flag allows the container to access the host's GPUs.
## Running Ultralytics in Docker Container ## Running Ultralytics in Docker Container
Here's how to execute the Ultralytics Docker container: Here's how to execute the Ultralytics Docker container:

View file

@ -23,7 +23,7 @@ NVIDIA Jetson is a series of embedded computing boards designed to bring acceler
[Jetson Orin](https://www.nvidia.com/en-us/autonomous-machines/embedded-systems/jetson-orin/) is the latest iteration of the NVIDIA Jetson family based on NVIDIA Ampere architecture which brings drastically improved AI performance when compared to the previous generations. Below table compared few of the Jetson devices in the ecosystem. [Jetson Orin](https://www.nvidia.com/en-us/autonomous-machines/embedded-systems/jetson-orin/) is the latest iteration of the NVIDIA Jetson family based on NVIDIA Ampere architecture which brings drastically improved AI performance when compared to the previous generations. Below table compared few of the Jetson devices in the ecosystem.
| | Jetson AGX Orin 64GB | Jetson Orin NX 16GB | Jetson Orin Nano 8GB | Jetson AGX Xavier | Jetson Xavier NX | Jetson Nano | | | Jetson AGX Orin 64GB | Jetson Orin NX 16GB | Jetson Orin Nano 8GB | Jetson AGX Xavier | Jetson Xavier NX | Jetson Nano |
| ----------------- | ---------------------------------------------------------------- | --------------------------------------------------------------- | ------------------------------------------------------------- | ----------------------------------------------------------- | ------------------------------------------------------------ | ------------------------------------------- | |-------------------|------------------------------------------------------------------|-----------------------------------------------------------------|---------------------------------------------------------------|-------------------------------------------------------------|--------------------------------------------------------------|---------------------------------------------|
| AI Performance | 275 TOPS | 100 TOPS | 40 TOPs | 32 TOPS | 21 TOPS | 472 GFLOPS | | AI Performance | 275 TOPS | 100 TOPS | 40 TOPs | 32 TOPS | 21 TOPS | 472 GFLOPS |
| GPU | 2048-core NVIDIA Ampere architecture GPU with 64 Tensor Cores | 1024-core NVIDIA Ampere architecture GPU with 32 Tensor Cores | 1024-core NVIDIA Ampere architecture GPU with 32 Tensor Cores | 512-core NVIDIA Volta architecture GPU with 64 Tensor Cores | 384-core NVIDIA Volta™ architecture GPU with 48 Tensor Cores | 128-core NVIDIA Maxwell™ architecture GPU | | GPU | 2048-core NVIDIA Ampere architecture GPU with 64 Tensor Cores | 1024-core NVIDIA Ampere architecture GPU with 32 Tensor Cores | 1024-core NVIDIA Ampere architecture GPU with 32 Tensor Cores | 512-core NVIDIA Volta architecture GPU with 64 Tensor Cores | 384-core NVIDIA Volta™ architecture GPU with 48 Tensor Cores | 128-core NVIDIA Maxwell™ architecture GPU |
| GPU Max Frequency | 1.3 GHz | 918 MHz | 625 MHz | 1377 MHz | 1100 MHz | 921MHz | | GPU Max Frequency | 1.3 GHz | 918 MHz | 625 MHz | 1377 MHz | 1100 MHz | 921MHz |

View file

@ -167,7 +167,7 @@ keywords: Ultralytics, YOLOv8, Object Detection, Object Tracking, IDetection, Vi
### `visioneye` Arguments ### `visioneye` Arguments
| Name | Type | Default | Description | | Name | Type | Default | Description |
|---------------|---------|------------------|--------------------------------------------------| |-------------|---------|------------------|--------------------------------|
| `color` | `tuple` | `(235, 219, 11)` | Line and object centroid color | | `color` | `tuple` | `(235, 219, 11)` | Line and object centroid color |
| `pin_color` | `tuple` | `(255, 0, 255)` | VisionEye pinpoint color | | `pin_color` | `tuple` | `(255, 0, 255)` | VisionEye pinpoint color |

View file

@ -70,7 +70,7 @@ curl -X POST "https://api.ultralytics.com/v1/predict/MODEL_ID" \
See the table below for a full list of available inference arguments. See the table below for a full list of available inference arguments.
| Argument | Default | Type | Description | | Argument | Default | Type | Description |
| ------------ | ------- | ------- | -------------------------------------- | |--------------|---------|---------|----------------------------------------|
| `image` | | `image` | image file | | `image` | | `image` | image file |
| `url` | | `str` | URL of the image if not passing a file | | `url` | | `str` | URL of the image if not passing a file |
| `size` | `640` | `int` | valid range `32` - `1280` pixels | | `size` | `640` | `int` | valid range `32` - `1280` pixels |
@ -91,10 +91,10 @@ The [Ultralytics HUB](https://bit.ly/ultralytics_hub) Inference API returns a JS
from ultralytics import YOLO from ultralytics import YOLO
# Load model # Load model
model = YOLO('yolov8n-cls.pt') model = YOLO("yolov8n-cls.pt")
# Run inference # Run inference
results = model('image.jpg') results = model("image.jpg")
# Print image.jpg results in JSON format # Print image.jpg results in JSON format
print(results[0].tojson()) print(results[0].tojson())
@ -159,10 +159,10 @@ The [Ultralytics HUB](https://bit.ly/ultralytics_hub) Inference API returns a JS
from ultralytics import YOLO from ultralytics import YOLO
# Load model # Load model
model = YOLO('yolov8n.pt') model = YOLO("yolov8n.pt")
# Run inference # Run inference
results = model('image.jpg') results = model("image.jpg")
# Print image.jpg results in JSON format # Print image.jpg results in JSON format
print(results[0].tojson()) print(results[0].tojson())
@ -231,10 +231,10 @@ The [Ultralytics HUB](https://bit.ly/ultralytics_hub) Inference API returns a JS
from ultralytics import YOLO from ultralytics import YOLO
# Load model # Load model
model = YOLO('yolov8n-obb.pt') model = YOLO("yolov8n-obb.pt")
# Run inference # Run inference
results = model('image.jpg') results = model("image.jpg")
# Print image.jpg results in JSON format # Print image.jpg results in JSON format
print(results[0].tojson()) print(results[0].tojson())
@ -305,10 +305,10 @@ The [Ultralytics HUB](https://bit.ly/ultralytics_hub) Inference API returns a JS
from ultralytics import YOLO from ultralytics import YOLO
# Load model # Load model
model = YOLO('yolov8n-seg.pt') model = YOLO("yolov8n-seg.pt")
# Run inference # Run inference
results = model('image.jpg') results = model("image.jpg")
# Print image.jpg results in JSON format # Print image.jpg results in JSON format
print(results[0].tojson()) print(results[0].tojson())
@ -374,10 +374,10 @@ The [Ultralytics HUB](https://bit.ly/ultralytics_hub) Inference API returns a JS
from ultralytics import YOLO from ultralytics import YOLO
# Load model # Load model
model = YOLO('yolov8n-pose.pt') model = YOLO("yolov8n-pose.pt")
# Run inference # Run inference
results = model('image.jpg') results = model("image.jpg")
# Print image.jpg results in JSON format # Print image.jpg results in JSON format
print(results[0].tojson()) print(results[0].tojson())

View file

@ -123,7 +123,7 @@ When processing implicitly quantized networks TensorRT uses INT8 opportunistical
The arguments provided when using [export](../modes/export.md) for an Ultralytics YOLO model will **greatly** influence the performance of the exported model. They will also need to be selected based on the device resources available, however the default arguments _should_ work for most [Ampere (or newer) NVIDIA discrete GPUs](https://developer.nvidia.com/blog/nvidia-ampere-architecture-in-depth/). The calibration algorithm used is `"ENTROPY_CALIBRATION_2"` and you can read more details about the options available [in the TensorRT Developer Guide](https://docs.nvidia.com/deeplearning/tensorrt/developer-guide/index.html#enable_int8_c). Ultralytics tests found that `"ENTROPY_CALIBRATION_2"` was the best choice and exports are fixed to using this algorithm. The arguments provided when using [export](../modes/export.md) for an Ultralytics YOLO model will **greatly** influence the performance of the exported model. They will also need to be selected based on the device resources available, however the default arguments _should_ work for most [Ampere (or newer) NVIDIA discrete GPUs](https://developer.nvidia.com/blog/nvidia-ampere-architecture-in-depth/). The calibration algorithm used is `"ENTROPY_CALIBRATION_2"` and you can read more details about the options available [in the TensorRT Developer Guide](https://docs.nvidia.com/deeplearning/tensorrt/developer-guide/index.html#enable_int8_c). Ultralytics tests found that `"ENTROPY_CALIBRATION_2"` was the best choice and exports are fixed to using this algorithm.
- `workspace` : Controls the size (in GiB) of the device memory allocation while converting the model weights. - `workspace` : Controls the size (in GiB) of the device memory allocation while converting the model weights.
- Aim to use the <u>minimum</u> `workspace` value required as this prevents testing algorithms that require more `workspace` from being considered by the TensorRT builder. Setting a higher value for `workspace` may take **considerably longer** to calibrate and export. - Aim to use the <u>minimum</u> `workspace` value required as this prevents testing algorithms that require more `workspace` from being considered by the TensorRT builder. Setting a higher value for `workspace` may take **considerably longer** to calibrate and export.
@ -135,7 +135,7 @@ The arguments provided when using [export](../modes/export.md) for an Ultralytic
- <u><b>Remember</b> calibration for INT8 is specific to each device</u>, borrowing a "high-end" GPU for calibration, might result in poor performance when inference is run on another device. - <u><b>Remember</b> calibration for INT8 is specific to each device</u>, borrowing a "high-end" GPU for calibration, might result in poor performance when inference is run on another device.
- `batch` : The maximum batch-size that will be used for inference. During inference smaller batches can be used, but inference will not accept batches any larger than what is specified. - `batch` : The maximum batch-size that will be used for inference. During inference smaller batches can be used, but inference will not accept batches any larger than what is specified.
!!! note !!! note
@ -182,7 +182,6 @@ Experimentation by NVIDIA led them to recommend using at least 500 calibration i
yolo predict model=yolov8n.engine source='https://ultralytics.com/images/bus.jpg' yolo predict model=yolov8n.engine source='https://ultralytics.com/images/bus.jpg'
``` ```
???+ warning "Calibration Cache" ???+ warning "Calibration Cache"
TensorRT will generate a calibration `.cache` which can be re-used to speed up export of future model weights using the same data, but this may result in poor calibration when the data is vastly different or if the `batch` value is changed drastically. In these circumstances, the existing `.cache` should be renamed and moved to a different directory or deleted entirely. TensorRT will generate a calibration `.cache` which can be re-used to speed up export of future model weights using the same data, but this may result in poor calibration when the data is vastly different or if the `batch` value is changed drastically. In these circumstances, the existing `.cache` should be renamed and moved to a different directory or deleted entirely.
@ -467,7 +466,6 @@ Having successfully exported your Ultralytics YOLOv8 models to TensorRT format,
- **[GitHub Repository for NVIDIA TensorRT:](https://github.com/NVIDIA/TensorRT)**: This is the official GitHub repository that contains the source code and documentation for NVIDIA TensorRT. - **[GitHub Repository for NVIDIA TensorRT:](https://github.com/NVIDIA/TensorRT)**: This is the official GitHub repository that contains the source code and documentation for NVIDIA TensorRT.
## Summary ## Summary
In this guide, we focused on converting Ultralytics YOLOv8 models to NVIDIA's TensorRT model format. This conversion step is crucial for improving the efficiency and speed of YOLOv8 models, making them more effective and suitable for diverse deployment environments. In this guide, we focused on converting Ultralytics YOLOv8 models to NVIDIA's TensorRT model format. This conversion step is crucial for improving the efficiency and speed of YOLOv8 models, making them more effective and suitable for diverse deployment environments.

View file

@ -404,7 +404,7 @@ YOLOv8 supports various image and video formats, as specified in [ultralytics/da
The below table contains valid Ultralytics image formats. The below table contains valid Ultralytics image formats.
| Image Suffixes | Example Predict Command | Reference | | Image Suffixes | Example Predict Command | Reference |
|----------------|----------------------------------|-------------------------------------------------------------------------------| |----------------|----------------------------------|----------------------------------------------------------------------------|
| `.bmp` | `yolo predict source=image.bmp` | [Microsoft BMP File Format](https://en.wikipedia.org/wiki/BMP_file_format) | | `.bmp` | `yolo predict source=image.bmp` | [Microsoft BMP File Format](https://en.wikipedia.org/wiki/BMP_file_format) |
| `.dng` | `yolo predict source=image.dng` | [Adobe DNG](https://helpx.adobe.com/camera-raw/digital-negative.html) | | `.dng` | `yolo predict source=image.dng` | [Adobe DNG](https://helpx.adobe.com/camera-raw/digital-negative.html) |
| `.jpeg` | `yolo predict source=image.jpeg` | [JPEG](https://en.wikipedia.org/wiki/JPEG) | | `.jpeg` | `yolo predict source=image.jpeg` | [JPEG](https://en.wikipedia.org/wiki/JPEG) |

View file

@ -19,11 +19,11 @@ backbone:
- [-1, 1, SPPELAN, [512, 256]] # 9 - [-1, 1, SPPELAN, [512, 256]] # 9
head: head:
- [-1, 1, nn.Upsample, [None, 2, 'nearest']] - [-1, 1, nn.Upsample, [None, 2, "nearest"]]
- [[-1, 6], 1, Concat, [1]] # cat backbone P4 - [[-1, 6], 1, Concat, [1]] # cat backbone P4
- [-1, 1, RepNCSPELAN4, [512, 512, 256, 1]] # 12 - [-1, 1, RepNCSPELAN4, [512, 512, 256, 1]] # 12
- [-1, 1, nn.Upsample, [None, 2, 'nearest']] - [-1, 1, nn.Upsample, [None, 2, "nearest"]]
- [[-1, 4], 1, Concat, [1]] # cat backbone P3 - [[-1, 4], 1, Concat, [1]] # cat backbone P3
- [-1, 1, RepNCSPELAN4, [256, 256, 128, 1]] # 15 (P3/8-small) - [-1, 1, RepNCSPELAN4, [256, 256, 128, 1]] # 15 (P3/8-small)

View file

@ -19,11 +19,11 @@ backbone:
- [-1, 1, SPPELAN, [512, 256]] # 9 - [-1, 1, SPPELAN, [512, 256]] # 9
head: head:
- [-1, 1, nn.Upsample, [None, 2, 'nearest']] - [-1, 1, nn.Upsample, [None, 2, "nearest"]]
- [[-1, 6], 1, Concat, [1]] # cat backbone P4 - [[-1, 6], 1, Concat, [1]] # cat backbone P4
- [-1, 1, RepNCSPELAN4, [512, 512, 256, 1]] # 12 - [-1, 1, RepNCSPELAN4, [512, 512, 256, 1]] # 12
- [-1, 1, nn.Upsample, [None, 2, 'nearest']] - [-1, 1, nn.Upsample, [None, 2, "nearest"]]
- [[-1, 4], 1, Concat, [1]] # cat backbone P3 - [[-1, 4], 1, Concat, [1]] # cat backbone P3
- [-1, 1, RepNCSPELAN4, [256, 256, 128, 1]] # 15 (P3/8-small) - [-1, 1, RepNCSPELAN4, [256, 256, 128, 1]] # 15 (P3/8-small)

View file

@ -42,11 +42,11 @@ backbone:
# gelan head # gelan head
head: head:
- [-1, 1, nn.Upsample, [None, 2, 'nearest']] - [-1, 1, nn.Upsample, [None, 2, "nearest"]]
- [[-1, 25], 1, Concat, [1]] # cat backbone P4 - [[-1, 25], 1, Concat, [1]] # cat backbone P4
- [-1, 1, RepNCSPELAN4, [512, 512, 256, 2]] # 32 - [-1, 1, RepNCSPELAN4, [512, 512, 256, 2]] # 32
- [-1, 1, nn.Upsample, [None, 2, 'nearest']] - [-1, 1, nn.Upsample, [None, 2, "nearest"]]
- [[-1, 22], 1, Concat, [1]] # cat backbone P3 - [[-1, 22], 1, Concat, [1]] # cat backbone P3
- [-1, 1, RepNCSPELAN4, [256, 256, 128, 2]] # 35 (P3/8-small) - [-1, 1, RepNCSPELAN4, [256, 256, 128, 2]] # 35 (P3/8-small)

View file

@ -42,11 +42,11 @@ backbone:
# gelan head # gelan head
head: head:
- [-1, 1, nn.Upsample, [None, 2, 'nearest']] - [-1, 1, nn.Upsample, [None, 2, "nearest"]]
- [[-1, 25], 1, Concat, [1]] # cat backbone P4 - [[-1, 25], 1, Concat, [1]] # cat backbone P4
- [-1, 1, RepNCSPELAN4, [512, 512, 256, 2]] # 32 - [-1, 1, RepNCSPELAN4, [512, 512, 256, 2]] # 32
- [-1, 1, nn.Upsample, [None, 2, 'nearest']] - [-1, 1, nn.Upsample, [None, 2, "nearest"]]
- [[-1, 22], 1, Concat, [1]] # cat backbone P3 - [[-1, 22], 1, Concat, [1]] # cat backbone P3
- [-1, 1, RepNCSPELAN4, [256, 256, 128, 2]] # 35 (P3/8-small) - [-1, 1, RepNCSPELAN4, [256, 256, 128, 2]] # 35 (P3/8-small)