feat(ml): implement v3.0 architecture with CBAM and calibrated inference

- Integrate Convolutional Block Attention Module (CBAM) for improved feature focus
- Implement temperature scaling and confidence-based status reporting
- Automate dataset acquisition using kagglehub
- Update ONNX opset to 18 and refine preprocessing validation
This commit is contained in:
MythEclipse
2026-06-12 15:24:49 +00:00
parent 43307a15a5
commit f9bd991bdf
10 changed files with 1756 additions and 3506 deletions
+11 -4
View File
@@ -23,13 +23,20 @@ async fn main() -> Result<()> {
// Load configuration from environment
let config = Config::from_env()?;
// Create ModelService and wrap in Arc
let model = Arc::new(ModelService::new(&config.model_path, config.input_size));
// Log model status
// Create ModelService with calibration and wrap in Arc
let model = Arc::new(ModelService::with_calibration(
&config.model_path,
config.input_size,
config.temperature,
config.conf_threshold_high,
config.conf_threshold_low,
));
tracing::info!(
model_loaded = model.is_loaded(),
model_path = ?config.model_path,
temperature = config.temperature,
conf_high = config.conf_threshold_high,
conf_low = config.conf_threshold_low,
"Model service initialized"
);