Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update YOLO example instructions to use YOLO v11 #374

Merged
merged 1 commit into from
Oct 1, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion rten-examples/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ The examples have been chosen to cover common tasks and popular models.
- **rmbg** - Background removal using [BRIA Background Removal](https://huggingface.co/briaai/RMBG-1.4)
- **segment_anything** - Image segmentation using [Segment Anything](https://segment-anything.com)
- **trocr** - Recognize text using [TrOCR](https://arxiv.org/abs/2109.10282)
- **yolo** - Object detection using [YOLO v8](https://github.com/ultralytics/ultralytics)
- **yolo** - Object detection using [Ultralytics YOLO](https://github.com/ultralytics/ultralytics)

### Text

Expand Down
21 changes: 12 additions & 9 deletions rten-examples/src/yolo.rs
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ Options:

Print only a summary of the objects found
",
bin_name = parser.bin_name().unwrap_or("detr")
bin_name = parser.bin_name().unwrap_or("yolo")
);
std::process::exit(0);
}
Expand Down Expand Up @@ -76,25 +76,28 @@ fn resource_path(path: &str) -> PathBuf {
abs_path
}

/// Detect objects in images using the YOLO v8 model.
/// Detect objects in images using Ultralytics YOLO models.
///
/// This example has been tested with YOLO v8 and YOLO v11. The steps are the
/// same for both versions.
///
/// See <https://docs.ultralytics.com/modes/export/> for current instructions on
/// how to get YOLO v8 models in ONNX format.
/// how to get YOLO v11 models in ONNX format.
///
/// Note that this model is AGPL-licensed. If you need an object detection model
/// for commercial purposes, you can either buy a license from Ultralytics, or
/// use an alternate model such as DETR.
/// Note that these models are AGPL-licensed. If you need an object detection
/// model for commercial purposes, you can either buy a license from
/// Ultralytics, or use an alternate model such as DETR.
///
/// ```
/// pip install ultralytics
/// yolo mode=export model=yolov8s.pt format=onnx
/// rten-convert yolov8s.onnx yolov8.rten
/// yolo mode=export model=yolov11s.pt format=onnx
/// rten-convert yolov11s.onnx yolov11.rten
/// ```
///
/// Run this program on an image:
///
/// ```
/// cargo run --release --bin yolo yolov8.rten image.jpg
/// cargo run --release --bin yolo yolov11.rten image.jpg
/// ```
fn main() -> Result<(), Box<dyn Error>> {
let args = parse_args()?;
Expand Down
Loading