feat(ruvector): implement ADR-017 as wifi-densepose-ruvector crate + fix MAT warnings
New crate `wifi-densepose-ruvector` implements all 7 ruvector v2.0.4 integration points from ADR-017 (signal processing + MAT disaster detection): signal::subcarrier — mincut_subcarrier_partition (ruvector-mincut) signal::spectrogram — gate_spectrogram (ruvector-attn-mincut) signal::bvp — attention_weighted_bvp (ruvector-attention) signal::fresnel — solve_fresnel_geometry (ruvector-solver) mat::triangulation — solve_triangulation TDoA (ruvector-solver) mat::breathing — CompressedBreathingBuffer 50-75% mem reduction (ruvector-temporal-tensor) mat::heartbeat — CompressedHeartbeatSpectrogram tiered compression (ruvector-temporal-tensor) 16 tests, 0 compilation errors. Workspace grows from 14 → 15 crates. MAT crate: fix all 54 warnings (0 remaining in wifi-densepose-mat): - Remove unused imports (Arc, HashMap, RwLock, mpsc, Mutex, ConfidenceScore, etc.) - Prefix unused variables with _ (timestamp_low, agc, perm) - Add #![allow(unexpected_cfgs)] for onnx feature gates in ML files - Move onnx-conditional imports under #[cfg(feature = "onnx")] guards README: update crate count 14→15, ADR count 24→26, add ruvector crate table with 7-row integration summary. Total tests: 939 → 955 (16 new). All passing, 0 regressions. https://claude.ai/code/session_0164UZu6rG6gA15HmVyLZAmU
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
//! Breathing pattern detection from CSI signals.
|
||||
|
||||
use crate::domain::{BreathingPattern, BreathingType, ConfidenceScore};
|
||||
use crate::domain::{BreathingPattern, BreathingType};
|
||||
|
||||
// ---------------------------------------------------------------------------
|
||||
// Integration 6: CompressedBreathingBuffer (ADR-017, ruvector feature)
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
//! This module provides both traditional signal-processing-based detection
|
||||
//! and optional ML-enhanced detection for improved accuracy.
|
||||
|
||||
use crate::domain::{ScanZone, VitalSignsReading, ConfidenceScore};
|
||||
use crate::domain::{ScanZone, VitalSignsReading};
|
||||
use crate::ml::{MlDetectionConfig, MlDetectionPipeline, MlDetectionResult};
|
||||
use crate::{DisasterConfig, MatError};
|
||||
use super::{
|
||||
|
||||
@@ -28,8 +28,6 @@ use chrono::{DateTime, Utc};
|
||||
use std::collections::VecDeque;
|
||||
use std::io::{BufReader, Read};
|
||||
use std::path::Path;
|
||||
use std::sync::Arc;
|
||||
use tokio::sync::{mpsc, Mutex};
|
||||
|
||||
/// Configuration for CSI receivers
|
||||
#[derive(Debug, Clone)]
|
||||
@@ -921,7 +919,7 @@ impl CsiParser {
|
||||
}
|
||||
|
||||
// Parse header
|
||||
let timestamp_low = u32::from_le_bytes([data[0], data[1], data[2], data[3]]);
|
||||
let _timestamp_low = u32::from_le_bytes([data[0], data[1], data[2], data[3]]);
|
||||
let bfee_count = u16::from_le_bytes([data[4], data[5]]);
|
||||
let _nrx = data[8];
|
||||
let ntx = data[9];
|
||||
@@ -929,8 +927,8 @@ impl CsiParser {
|
||||
let rssi_b = data[11] as i8;
|
||||
let rssi_c = data[12] as i8;
|
||||
let noise = data[13] as i8;
|
||||
let agc = data[14];
|
||||
let perm = [data[15], data[16], data[17]];
|
||||
let _agc = data[14];
|
||||
let _perm = [data[15], data[16], data[17]];
|
||||
let rate = u16::from_le_bytes([data[18], data[19]]);
|
||||
|
||||
// Average RSSI
|
||||
|
||||
@@ -15,14 +15,13 @@
|
||||
//! - Attenuation regression head (linear output)
|
||||
//! - Depth estimation head with uncertainty (mean + variance output)
|
||||
|
||||
#![allow(unexpected_cfgs)]
|
||||
|
||||
use super::{DebrisFeatures, DepthEstimate, MlError, MlResult};
|
||||
use ndarray::{Array1, Array2, Array4, s};
|
||||
use std::collections::HashMap;
|
||||
use ndarray::{Array2, Array4};
|
||||
use std::path::Path;
|
||||
use std::sync::Arc;
|
||||
use parking_lot::RwLock;
|
||||
use thiserror::Error;
|
||||
use tracing::{debug, info, instrument, warn};
|
||||
use tracing::{info, instrument, warn};
|
||||
|
||||
#[cfg(feature = "onnx")]
|
||||
use wifi_densepose_nn::{OnnxBackend, OnnxSession, InferenceOptions, Tensor, TensorShape};
|
||||
|
||||
@@ -35,9 +35,7 @@ pub use vital_signs_classifier::{
|
||||
};
|
||||
|
||||
use crate::detection::CsiDataBuffer;
|
||||
use crate::domain::{VitalSignsReading, BreathingPattern, HeartbeatSignature};
|
||||
use async_trait::async_trait;
|
||||
use std::path::Path;
|
||||
use thiserror::Error;
|
||||
|
||||
/// Errors that can occur in ML operations
|
||||
|
||||
@@ -21,18 +21,27 @@
|
||||
//! [Uncertainty] [Confidence] [Voluntary Flag]
|
||||
//! ```
|
||||
|
||||
#![allow(unexpected_cfgs)]
|
||||
|
||||
use super::{MlError, MlResult};
|
||||
use crate::detection::CsiDataBuffer;
|
||||
use crate::domain::{
|
||||
BreathingPattern, BreathingType, HeartbeatSignature, MovementProfile,
|
||||
MovementType, SignalStrength, VitalSignsReading,
|
||||
};
|
||||
use ndarray::{Array1, Array2, Array4, s};
|
||||
use std::collections::HashMap;
|
||||
use std::path::Path;
|
||||
use tracing::{info, instrument, warn};
|
||||
|
||||
#[cfg(feature = "onnx")]
|
||||
use ndarray::{Array1, Array2, Array4, s};
|
||||
#[cfg(feature = "onnx")]
|
||||
use std::collections::HashMap;
|
||||
#[cfg(feature = "onnx")]
|
||||
use std::sync::Arc;
|
||||
#[cfg(feature = "onnx")]
|
||||
use parking_lot::RwLock;
|
||||
use tracing::{debug, info, instrument, warn};
|
||||
#[cfg(feature = "onnx")]
|
||||
use tracing::debug;
|
||||
|
||||
#[cfg(feature = "onnx")]
|
||||
use wifi_densepose_nn::{OnnxBackend, OnnxSession, InferenceOptions, Tensor, TensorShape};
|
||||
@@ -813,7 +822,7 @@ impl VitalSignsClassifier {
|
||||
}
|
||||
|
||||
/// Compute breathing class probabilities
|
||||
fn compute_breathing_probabilities(&self, rate_bpm: f32, features: &VitalSignsFeatures) -> Vec<f32> {
|
||||
fn compute_breathing_probabilities(&self, rate_bpm: f32, _features: &VitalSignsFeatures) -> Vec<f32> {
|
||||
let mut probs = vec![0.0; 6]; // Normal, Shallow, Labored, Irregular, Agonal, Apnea
|
||||
|
||||
// Simple probability assignment based on rate
|
||||
|
||||
Reference in New Issue
Block a user