mirror of
https://github.com/ultralytics/ultralytics
synced 2026-05-23 17:18:56 +00:00
Update DeepStream doc with YOLO11 support (#19958)
This commit is contained in:
parent
d650885b2e
commit
bf6602af98
1 changed files with 10 additions and 14 deletions
|
|
@ -66,17 +66,13 @@ Here we are using [marcoslucianops/DeepStream-Yolo](https://github.com/marcosluc
|
|||
git clone https://github.com/marcoslucianops/DeepStream-Yolo
|
||||
```
|
||||
|
||||
3. Copy the `export_yoloV8.py` file from `DeepStream-Yolo/utils` directory to the `ultralytics` folder
|
||||
3. Copy the `export_yolo11.py` file from `DeepStream-Yolo/utils` directory to the `ultralytics` folder
|
||||
|
||||
```bash
|
||||
cp ~/DeepStream-Yolo/utils/export_yoloV8.py ~/ultralytics
|
||||
cp ~/DeepStream-Yolo/utils/export_yolo11.py ~/ultralytics
|
||||
cd ultralytics
|
||||
```
|
||||
|
||||
!!! note
|
||||
|
||||
`export_yoloV8.py` works for both YOLOv8 and YOLO11 models.
|
||||
|
||||
4. Download Ultralytics YOLO11 detection model (.pt) of your choice from [YOLO11 releases](https://github.com/ultralytics/assets/releases). Here we use [yolo11s.pt](https://github.com/ultralytics/assets/releases/download/v8.3.0/yolo11s.pt).
|
||||
|
||||
```bash
|
||||
|
|
@ -90,12 +86,12 @@ Here we are using [marcoslucianops/DeepStream-Yolo](https://github.com/marcosluc
|
|||
5. Convert model to ONNX
|
||||
|
||||
```bash
|
||||
python3 export_yoloV8.py -w yolo11s.pt
|
||||
python3 export_yolo11.py -w yolo11s.pt
|
||||
```
|
||||
|
||||
!!! note "Pass the below arguments to the above command"
|
||||
|
||||
For DeepStream 6.0.1, use opset 12 or lower. The default opset is 16.
|
||||
For DeepStream 5.1, remove the `--dynamic` arg and use `opset` 12 or lower. The default `opset` is 17.
|
||||
|
||||
```bash
|
||||
--opset 12
|
||||
|
|
@ -169,7 +165,7 @@ Here we are using [marcoslucianops/DeepStream-Yolo](https://github.com/marcosluc
|
|||
make -C nvdsinfer_custom_impl_Yolo clean && make -C nvdsinfer_custom_impl_Yolo
|
||||
```
|
||||
|
||||
9. Edit the `config_infer_primary_yoloV8.txt` file according to your model (for YOLO11s with 80 classes)
|
||||
9. Edit the `config_infer_primary_yolo11.txt` file according to your model (for YOLO11s with 80 classes)
|
||||
|
||||
```bash
|
||||
[property]
|
||||
|
|
@ -186,7 +182,7 @@ Here we are using [marcoslucianops/DeepStream-Yolo](https://github.com/marcosluc
|
|||
...
|
||||
[primary-gie]
|
||||
...
|
||||
config-file=config_infer_primary_yoloV8.txt
|
||||
config-file=config_infer_primary_yolo11.txt
|
||||
```
|
||||
|
||||
11. You can also change the video source in `deepstream_app_config` file. Here a default video file is loaded
|
||||
|
|
@ -212,7 +208,7 @@ deepstream-app -c deepstream_app_config.txt
|
|||
|
||||
!!! tip
|
||||
|
||||
If you want to convert the model to FP16 precision, simply set `model-engine-file=model_b1_gpu0_fp16.engine` and `network-mode=2` inside `config_infer_primary_yoloV8.txt`
|
||||
If you want to convert the model to FP16 precision, simply set `model-engine-file=model_b1_gpu0_fp16.engine` and `network-mode=2` inside `config_infer_primary_yolo11.txt`
|
||||
|
||||
## INT8 Calibration
|
||||
|
||||
|
|
@ -271,7 +267,7 @@ If you want to use INT8 precision for inference, you need to follow the steps be
|
|||
|
||||
Higher INT8_CALIB_BATCH_SIZE values will result in more accuracy and faster calibration speed. Set it according to you GPU memory.
|
||||
|
||||
8. Update the `config_infer_primary_yoloV8.txt` file
|
||||
8. Update the `config_infer_primary_yolo11.txt` file
|
||||
|
||||
From
|
||||
|
||||
|
|
@ -417,12 +413,12 @@ Yes, the guide for deploying Ultralytics YOLO11 with the DeepStream SDK and Tens
|
|||
|
||||
### How can I convert a YOLO11 model to ONNX for DeepStream?
|
||||
|
||||
To convert a YOLO11 model to ONNX format for deployment with DeepStream, use the `utils/export_yoloV8.py` script from the [DeepStream-Yolo](https://github.com/marcoslucianops/DeepStream-Yolo) repository.
|
||||
To convert a YOLO11 model to ONNX format for deployment with DeepStream, use the `utils/export_yolo11.py` script from the [DeepStream-Yolo](https://github.com/marcoslucianops/DeepStream-Yolo) repository.
|
||||
|
||||
Here's an example command:
|
||||
|
||||
```bash
|
||||
python3 utils/export_yoloV8.py -w yolo11s.pt --opset 12 --simplify
|
||||
python3 utils/export_yolo11.py -w yolo11s.pt --opset 12 --simplify
|
||||
```
|
||||
|
||||
For more details on model conversion, check out our [model export section](../modes/export.md).
|
||||
|
|
|
|||
Loading…
Reference in a new issue