mirror of
https://github.com/mii443/usls.git
synced 2025-08-22 15:45:41 +00:00
Add YOLOv8-OBB and some bug fixes (#9)
* Add YOLOv8-Obb & Refactor outputs * Update README.md
This commit is contained in:
@ -20,4 +20,4 @@ cargo run -r --example db
|
||||
|
||||
## Results
|
||||
|
||||

|
||||

|
||||
|
Binary file not shown.
Before Width: | Height: | Size: 165 KiB |
BIN
examples/db/demo.png
Normal file
BIN
examples/db/demo.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 35 KiB |
@ -15,18 +15,21 @@ fn main() -> Result<(), Box<dyn std::error::Error>> {
|
||||
let mut model = DB::new(&options)?;
|
||||
|
||||
// load image
|
||||
let x = vec![DataLoader::try_read("./assets/db.png")?];
|
||||
let x = vec![
|
||||
DataLoader::try_read("./assets/db.png")?,
|
||||
// DataLoader::try_read("./assets/2.jpg")?,
|
||||
];
|
||||
|
||||
// run
|
||||
let y = model.run(&x)?;
|
||||
|
||||
// annotate
|
||||
let annotator = Annotator::default()
|
||||
.without_name(true)
|
||||
.without_polygons(false)
|
||||
.with_mask_alpha(0)
|
||||
.without_bboxes(false)
|
||||
.with_saveout("DB-Text-Detection");
|
||||
.without_bboxes(true)
|
||||
.with_masks_alpha(60)
|
||||
.with_polygon_color([255, 105, 180, 255])
|
||||
.without_mbrs(true)
|
||||
.with_saveout("DB");
|
||||
annotator.annotate(&x, &y);
|
||||
|
||||
Ok(())
|
||||
|
Reference in New Issue
Block a user