refactor: 重构 core 包目录结构并消除旧版 mod.rs
- 优化 剥离 models,algo 层并平铺业务模块 - 重构 统一使用现代 filename.rs + 文件夹结构替代旧版 mod.rs
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
use crate::loader::{ModelLoader, ModelSession, ModelType};
|
||||
use crate::loader::ModelLoader;
|
||||
use anyhow::Context;
|
||||
use ddddocr_core::error::{DdddError, Result};
|
||||
use ddddocr_core::{DetEngine, DetOutput, InferenceEngine};
|
||||
@@ -10,15 +10,6 @@ pub struct DetSession {
|
||||
pub session: RunnableModel<TypedFact, Box<dyn TypedOp>, Graph<TypedFact, Box<dyn TypedOp>>>,
|
||||
}
|
||||
|
||||
impl ModelSession for DetSession {
|
||||
fn get_model_type(&self) -> ModelType {
|
||||
todo!()
|
||||
}
|
||||
fn desc(&self) -> String {
|
||||
"Detection Model 加载成功".to_string()
|
||||
}
|
||||
}
|
||||
|
||||
impl DetSession {
|
||||
pub fn new<P>(model_path: P) -> Result<Self>
|
||||
where
|
||||
|
||||
Reference in New Issue
Block a user