Add YOLOv8-OBB and some bug fixes (#9)

* Add YOLOv8-Obb & Refactor outputs

* Update README.md
This commit is contained in:
Jamjamjon
2024-04-21 17:06:58 +08:00
committed by GitHub
parent 91049fc18a
commit beda8ef803
109 changed files with 2542 additions and 1940 deletions

View File

@ -20,4 +20,4 @@ cargo run -r --example db
## Results
![](./demo.jpg)
![](./demo.png)

Binary file not shown.

Before

Width:  |  Height:  |  Size: 165 KiB

BIN
examples/db/demo.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 35 KiB

View File

@ -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(())