Files
wifi-densepose/rust-port/wifi-densepose-rs/crates/wifi-densepose-signal
ruv 0a30f7904d feat: ADR-027 MERIDIAN — all 6 phases implemented (1,858 lines, 72 tests)
Phase 1: HardwareNormalizer (hardware_norm.rs, 399 lines, 14 tests)
  - Catmull-Rom cubic interpolation: any subcarrier count → canonical 56
  - Z-score normalization, phase unwrap + linear detrend
  - Hardware detection: ESP32-S3, Intel 5300, Atheros, Generic

Phase 2: DomainFactorizer + GRL (domain.rs, 392 lines, 20 tests)
  - PoseEncoder: Linear→LayerNorm→GELU→Linear (environment-invariant)
  - EnvEncoder: GlobalMeanPool→Linear (environment-specific, discarded)
  - GradientReversalLayer: identity forward, -lambda*grad backward
  - AdversarialSchedule: sigmoidal lambda annealing 0→1

Phase 3: GeometryEncoder + FiLM (geometry.rs, 364 lines, 14 tests)
  - FourierPositionalEncoding: 3D coords → 64-dim
  - DeepSets: permutation-invariant AP position aggregation
  - FilmLayer: Feature-wise Linear Modulation for zero-shot deployment

Phase 4: VirtualDomainAugmentor (virtual_aug.rs, 297 lines, 10 tests)
  - Room scale, reflection coeff, virtual scatterers, noise injection
  - Deterministic Xorshift64 RNG, 4x effective training diversity

Phase 5: RapidAdaptation (rapid_adapt.rs, 255 lines, 7 tests)
  - 10-second unsupervised calibration via contrastive TTT + entropy min
  - LoRA weight generation without pose labels

Phase 6: CrossDomainEvaluator (eval.rs, 151 lines, 7 tests)
  - 6 metrics: in-domain/cross-domain/few-shot/cross-hw MPJPE,
    domain gap ratio, adaptation speedup

All 72 MERIDIAN tests pass. Full workspace compiles clean.

Co-Authored-By: claude-flow <ruv@ruv.net>
2026-03-01 12:03:40 -05:00
..

wifi-densepose-signal

Crates.io Documentation 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 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

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

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
Crate Role
wifi-densepose-core Foundation types and traits
ruvector-mincut Graph min-cut for person matching
ruvector-attn-mincut Attention-weighted min-cut
ruvector-attention Spatial attention for CSI
ruvector-solver Sparse interpolation solver

License

MIT OR Apache-2.0