Major changes: - Organized Python v1 implementation into v1/ subdirectory - Created Rust workspace with 9 modular crates: - wifi-densepose-core: Core types, traits, errors - wifi-densepose-signal: CSI processing, phase sanitization, FFT - wifi-densepose-nn: Neural network inference (ONNX/Candle/tch) - wifi-densepose-api: Axum-based REST/WebSocket API - wifi-densepose-db: SQLx database layer - wifi-densepose-config: Configuration management - wifi-densepose-hardware: Hardware abstraction - wifi-densepose-wasm: WebAssembly bindings - wifi-densepose-cli: Command-line interface Documentation: - ADR-001: Workspace structure - ADR-002: Signal processing library selection - ADR-003: Neural network inference strategy - DDD domain model with bounded contexts Testing: - 69 tests passing across all crates - Signal processing: 45 tests - Neural networks: 21 tests - Core: 3 doc tests Performance targets: - 10x faster CSI processing (~0.5ms vs ~5ms) - 5x lower memory usage (~100MB vs ~500MB) - WASM support for browser deployment
5.0 KiB
5.0 KiB
Domain-Driven Design: WiFi-DensePose Domain Model
Bounded Contexts
1. Signal Domain
Purpose: Raw CSI data acquisition and preprocessing
Aggregates:
CsiFrame: Raw CSI measurement from WiFi hardwareProcessedSignal: Cleaned and feature-extracted signal
Value Objects:
Amplitude: Signal strength measurementsPhase: Phase angle measurementsSubcarrierData: Per-subcarrier informationTimestamp: Measurement timing
Domain Services:
CsiProcessor: Preprocesses raw CSI dataPhaseSanitizer: Unwraps and cleans phase dataFeatureExtractor: Extracts signal features
2. Pose Domain
Purpose: Human pose estimation from processed signals
Aggregates:
PoseEstimate: Complete DensePose outputInferenceSession: Neural network session state
Value Objects:
BodyPart: Labeled body segment (torso, arms, legs, etc.)UVCoordinate: Surface mapping coordinateKeypoint: Body joint positionConfidence: Prediction confidence score
Domain Services:
ModalityTranslator: CSI → visual feature translationDensePoseHead: Body part segmentation and UV regression
3. Streaming Domain
Purpose: Real-time data delivery to clients
Aggregates:
Session: Client connection with historyStreamConfig: Client streaming preferences
Value Objects:
WebSocketMessage: Typed message payloadConnectionState: Active/idle/disconnected
Domain Services:
StreamManager: Manages client connectionsBroadcastService: Pushes updates to subscribers
4. Storage Domain
Purpose: Persistence and retrieval
Aggregates:
Recording: Captured CSI sessionModelArtifact: Neural network weights
Repositories:
SessionRepository: Session CRUD operationsRecordingRepository: Recording storageModelRepository: Model management
5. Hardware Domain
Purpose: Physical device management
Aggregates:
Device: WiFi router/receiverAntenna: Individual antenna configuration
Domain Services:
DeviceManager: Device discovery and controlCsiExtractor: Raw CSI extraction
Context Map
┌─────────────────────────────────────────────────────────────┐
│ WiFi-DensePose │
├─────────────────────────────────────────────────────────────┤
│ │
│ ┌──────────────┐ ┌──────────────┐ ┌─────────────┐ │
│ │ Hardware │────▶│ Signal │────▶│ Pose │ │
│ │ Domain │ │ Domain │ │ Domain │ │
│ └──────────────┘ └──────────────┘ └─────────────┘ │
│ │ │ │ │
│ │ │ │ │
│ ▼ ▼ ▼ │
│ ┌──────────────────────────────────────────────────────┐ │
│ │ Storage Domain │ │
│ └──────────────────────────────────────────────────────┘ │
│ │ │ │ │
│ ▼ ▼ ▼ │
│ ┌──────────────────────────────────────────────────────┐ │
│ │ Streaming Domain │ │
│ └──────────────────────────────────────────────────────┘ │
│ │
└─────────────────────────────────────────────────────────────┘
Ubiquitous Language
| Term | Definition |
|---|---|
| CSI | Channel State Information - WiFi signal properties |
| Subcarrier | Individual frequency component in OFDM |
| Phase Unwrapping | Correcting 2π phase discontinuities |
| DensePose | Dense human pose estimation with UV mapping |
| Modality Translation | Converting CSI features to visual features |
| Body Part | One of 15 labeled human body segments |
| UV Mapping | 2D surface parameterization of 3D body |