CsiProcessor Configuration Options in WiFi DensePose

The CsiProcessor class accepts a configuration dictionary containing four required signal-processing parameters and six optional toggles that control preprocessing stages, detection sensitivity, and memory allocation.

The CsiProcessor class in the ruvnet/wifi-densepose repository orchestrates Channel State Information (CSI) processing for WiFi-based human pose estimation. Mastering the available CsiProcessor configuration options enables precise tuning of the pipeline for diverse hardware setups, noise environments, and real-time latency constraints.

Required Configuration Parameters

The processor validates the presence of four mandatory keys during initialization in v1/src/core/csi_processor.py. Omitting any of these raises a validation error in the _validate_config method (lines 99‑112).

  • sampling_rate — Defines the number of CSI samples processed per second. This integer value determines the temporal resolution of the entire pipeline. Referenced at line 68 as self.sampling_rate = config['sampling_rate'].

  • window_size — Specifies the size (in samples) of the sliding window applied during signal segmentation. This integer directly impacts frequency resolution and latency. Referenced at line 69 as self.window_size = config['window_size'].

  • overlap — Sets the fractional overlap between successive windows as a float between 0 and 1. Values closer to 1 increase temporal continuity but raise computational load. Referenced at line 70 as self.overlap = config['overlap'].

  • noise_threshold — Provides the amplitude threshold in decibels (dB) for the _remove_noise method to mask noisy sub-carriers. Typical values range from -90 dB to -70 dB depending on hardware noise floors. Referenced at line 71 as self.noise_threshold = config['noise_threshold'].

Optional Configuration Parameters

The processor applies sensible defaults for six additional settings that modulate detection logic and resource consumption. These are accessed via config.get() with fallback values at lines 72‑79.

Detection Sensitivity Controls

  • human_detection_threshold — Minimum confidence score (0.0 to 1.0) required to flag human presence. Default: 0.8. Increase this value to reduce false positives in noisy environments. Referenced at line 72.

  • smoothing_factor — Exponential moving average weight for temporal smoothing of detection confidence. Default: 0.9. Higher values produce stabler detection states but slower response to movement changes. Referenced at line 73.

Resource Management

  • max_history_size — Maximum number of CSI samples retained in the internal self.csi_history deque. Default: 500. Increase this for longer temporal context at the cost of RAM usage. Referenced at line 74.

Pipeline Stage Toggles

  • enable_preprocessing — Boolean switch to activate the preprocess_csi_data stage. Default: True. Disable to skip noise removal and normalization when supplying pre-cleaned data. Referenced at line 77.

  • enable_feature_extraction — Boolean switch to execute extract_features. Default: True. Disable when using raw CSI values without engineered features. Referenced at line 78.

  • enable_human_detection — Boolean switch to run detect_human_presence. Default: True. Disable for pure signal logging or offline analysis scenarios. Referenced at line 79.

Configuration Validation Rules

The _validate_config method enforces strict constraints on parameter values during instantiation:

  • sampling_rate and window_size must be positive integers
  • overlap must satisfy 0 <= overlap < 1
  • All four required keys must be present in the dictionary

Violating these constraints raises assertions before the processing loop begins, preventing runtime failures during CSI stream ingestion.

Complete Configuration Example

The following snippet demonstrates instantiation with custom CsiProcessor configuration options for a high-precision deployment:

import logging
from v1.src.core.csi_processor import CSIProcessor

config = {
    # Required parameters

    "sampling_rate": 2000,
    "window_size": 256,
    "overlap": 0.5,
    "noise_threshold": -80,
    
    # Optional overrides

    "human_detection_threshold": 0.85,
    "smoothing_factor": 0.95,
    "max_history_size": 1000,
    "enable_preprocessing": True,
    "enable_feature_extraction": True,
    "enable_human_detection": True,
}

logger = logging.getLogger("csi")
processor = CSIProcessor(config=config, logger=logger)

# Processor ready for async CSI data ingestion

# result = await processor.process_csi_data(raw_csi_packet)

Summary

  • Four required fields (sampling_rate, window_size, overlap, noise_threshold) define core signal-processing behavior and must be explicitly provided.
  • Six optional parameters control detection thresholds, temporal smoothing, memory limits, and pipeline stage execution with sensible defaults.
  • Validation occurs in _validate_config (lines 99‑112) to ensure positive integers and valid overlap fractions before processing begins.
  • File location: v1/src/core/csi_processor.py contains the implementation where configuration parameters are mapped to instance variables at lines 68‑79.

Frequently Asked Questions

What are the required configuration parameters for CsiProcessor?

The processor requires four mandatory keys: sampling_rate (int), window_size (int), overlap (float between 0 and 1), and noise_threshold (float in dB). These are validated in _validate_config at lines 99‑112 of v1/src/core/csi_processor.py, and omission of any required key triggers an assertion error during initialization.

How do I disable specific pipeline stages in CsiProcessor?

Set the boolean toggles enable_preprocessing, enable_feature_extraction, or enable_human_detection to False in the configuration dictionary. These default to True but can be disabled individually to skip noise removal, feature engineering, or human detection while retaining other pipeline stages.

What is the default human detection threshold in CsiProcessor?

The default human_detection_threshold is 0.8 (80% confidence). This parameter is read at line 72 using config.get('human_detection_threshold', 0.8). Increase this value toward 1.0 to reduce false positives, or decrease it toward 0.0 to capture more ambiguous human presence signals.

How does the overlap parameter affect CSI processing?

The overlap parameter controls the fractional sharing of data between successive sliding windows. A value of 0.5 means each window shares half its samples with the next window, improving temporal resolution and detection continuity. However, values approaching 1.0 significantly increase computational overhead without meaningful accuracy gains.

Have a question about this repo?

These articles cover the highlights, but your codebase questions are specific. Give your agent direct access to the source. Share this with your agent to get started:

Share the following with your agent to get started:
curl -s "https://instagit.com/install.md"

Works with
Claude Codex Cursor VS Code OpenClaw Any MCP Client

Maintain an open-source project? Get it listed too →