feat: ADR-024 Contrastive CSI Embedding Model — all 7 phases (#52)
Full implementation of Project AETHER — Contrastive CSI Embedding Model. ## Phases Delivered 1. ProjectionHead (64→128→128) + L2 normalization 2. CsiAugmenter (5 physically-motivated augmentations) 3. InfoNCE contrastive loss + SimCLR pretraining 4. FingerprintIndex (4 index types: env, activity, temporal, person) 5. RVF SEG_EMBED (0x0C) + CLI integration 6. Cross-modal alignment (PoseEncoder + InfoNCE) 7. Deep RuVector: MicroLoRA, EWC++, drift detection, hard-negative mining, SEG_LORA ## Stats - 276 tests passing (191 lib + 51 bin + 16 rvf + 18 vitals) - 3,342 additions across 8 files - Zero unsafe/unwrap/panic/todo stubs - ~55KB INT8 model for ESP32 edge deployment Also fixes deprecated GitHub Actions (v3→v4) and adds feat/* branch CI triggers. Closes #50
This commit was merged in pull request #52.
This commit is contained in:
@@ -4,6 +4,12 @@ version.workspace = true
|
||||
edition.workspace = true
|
||||
description = "WiFi CSI signal processing for DensePose estimation"
|
||||
license.workspace = true
|
||||
authors = ["rUv <ruv@ruv.net>", "WiFi-DensePose Contributors"]
|
||||
repository.workspace = true
|
||||
documentation = "https://docs.rs/wifi-densepose-signal"
|
||||
keywords = ["wifi", "csi", "signal-processing", "densepose", "rust"]
|
||||
categories = ["science", "computer-vision"]
|
||||
readme = "README.md"
|
||||
|
||||
[dependencies]
|
||||
# Core utilities
|
||||
@@ -27,7 +33,7 @@ ruvector-attention = { workspace = true }
|
||||
ruvector-solver = { workspace = true }
|
||||
|
||||
# Internal
|
||||
wifi-densepose-core = { path = "../wifi-densepose-core" }
|
||||
wifi-densepose-core = { version = "0.1.0", path = "../wifi-densepose-core" }
|
||||
|
||||
[dev-dependencies]
|
||||
criterion = { version = "0.5", features = ["html_reports"] }
|
||||
|
||||
@@ -0,0 +1,86 @@
|
||||
# wifi-densepose-signal
|
||||
|
||||
[](https://crates.io/crates/wifi-densepose-signal)
|
||||
[](https://docs.rs/wifi-densepose-signal)
|
||||
[](LICENSE)
|
||||
|
||||
State-of-the-art WiFi CSI signal processing for human pose estimation.
|
||||
|
||||
## Overview
|
||||
|
||||
`wifi-densepose-signal` implements six peer-reviewed signal processing algorithms that extract
|
||||
human motion features from raw WiFi Channel State Information (CSI). Each algorithm is traced
|
||||
back to its original publication and integrated with the
|
||||
[ruvector](https://crates.io/crates/ruvector-mincut) family of crates for high-performance
|
||||
graph and attention operations.
|
||||
|
||||
## Algorithms
|
||||
|
||||
| Algorithm | Module | Reference |
|
||||
|-----------|--------|-----------|
|
||||
| Conjugate Multiplication | `csi_ratio` | SpotFi, SIGCOMM 2015 |
|
||||
| Hampel Filter | `hampel` | WiGest, 2015 |
|
||||
| Fresnel Zone Model | `fresnel` | FarSense, MobiCom 2019 |
|
||||
| CSI Spectrogram | `spectrogram` | Common in WiFi sensing literature since 2018 |
|
||||
| Subcarrier Selection | `subcarrier_selection` | WiDance, MobiCom 2017 |
|
||||
| Body Velocity Profile (BVP) | `bvp` | Widar 3.0, MobiSys 2019 |
|
||||
|
||||
## Features
|
||||
|
||||
- **CSI preprocessing** -- Noise removal, windowing, normalization via `CsiProcessor`.
|
||||
- **Phase sanitization** -- Unwrapping, outlier removal, and smoothing via `PhaseSanitizer`.
|
||||
- **Feature extraction** -- Amplitude, phase, correlation, Doppler, and PSD features.
|
||||
- **Motion detection** -- Human presence detection with confidence scoring via `MotionDetector`.
|
||||
- **ruvector integration** -- Graph min-cut (person matching), attention mechanisms (antenna and
|
||||
spatial attention), and sparse solvers (subcarrier interpolation).
|
||||
|
||||
## Quick Start
|
||||
|
||||
```rust
|
||||
use wifi_densepose_signal::{
|
||||
CsiProcessor, CsiProcessorConfig,
|
||||
PhaseSanitizer, PhaseSanitizerConfig,
|
||||
MotionDetector,
|
||||
};
|
||||
|
||||
// Configure and create a CSI processor
|
||||
let config = CsiProcessorConfig::builder()
|
||||
.sampling_rate(1000.0)
|
||||
.window_size(256)
|
||||
.overlap(0.5)
|
||||
.noise_threshold(-30.0)
|
||||
.build();
|
||||
|
||||
let processor = CsiProcessor::new(config);
|
||||
```
|
||||
|
||||
## Architecture
|
||||
|
||||
```text
|
||||
wifi-densepose-signal/src/
|
||||
lib.rs -- Re-exports, SignalError, prelude
|
||||
bvp.rs -- Body Velocity Profile (Widar 3.0)
|
||||
csi_processor.rs -- Core preprocessing pipeline
|
||||
csi_ratio.rs -- Conjugate multiplication (SpotFi)
|
||||
features.rs -- Amplitude/phase/Doppler/PSD feature extraction
|
||||
fresnel.rs -- Fresnel zone diffraction model
|
||||
hampel.rs -- Hampel outlier filter
|
||||
motion.rs -- Motion and human presence detection
|
||||
phase_sanitizer.rs -- Phase unwrapping and sanitization
|
||||
spectrogram.rs -- Time-frequency CSI spectrograms
|
||||
subcarrier_selection.rs -- Variance-based subcarrier selection
|
||||
```
|
||||
|
||||
## Related Crates
|
||||
|
||||
| Crate | Role |
|
||||
|-------|------|
|
||||
| [`wifi-densepose-core`](../wifi-densepose-core) | Foundation types and traits |
|
||||
| [`ruvector-mincut`](https://crates.io/crates/ruvector-mincut) | Graph min-cut for person matching |
|
||||
| [`ruvector-attn-mincut`](https://crates.io/crates/ruvector-attn-mincut) | Attention-weighted min-cut |
|
||||
| [`ruvector-attention`](https://crates.io/crates/ruvector-attention) | Spatial attention for CSI |
|
||||
| [`ruvector-solver`](https://crates.io/crates/ruvector-solver) | Sparse interpolation solver |
|
||||
|
||||
## License
|
||||
|
||||
MIT OR Apache-2.0
|
||||
Reference in New Issue
Block a user