feat: 重构 CTC 解码逻辑

- 重构 ctc_decode 为关联函数并优化内存分配。
- 增加 单元测试和集成测试
This commit is contained in:
2026-05-01 21:54:33 +08:00
parent 642fed5d9f
commit 1c366b7165
4 changed files with 106 additions and 152 deletions

5
examples/simple_usage.rs Normal file
View File

@@ -0,0 +1,5 @@
fn main() {
let ocr = ddddocr_rs::DdddOcr::new("model/common.onnx").unwrap();
let img = image::open("samples/code3.png").unwrap();
println!("Result: {}", ocr.classification(&img).unwrap());
}