Fixed IndexError in breathing and heartbeat detection caused by incorrect
rfft output length calculation. The rfft output length is n//2+1 for input
of length n, so original length is (len(spectrum)-1)*2, not len(spectrum)*2.
Also added array length alignment to prevent edge case dimension mismatches.
Major refactoring to replace placeholder/mock implementations with real code:
CSI Extractor (csi_extractor.py):
- Real ESP32 CSI parsing with I/Q to amplitude/phase conversion
- Real Atheros CSI Tool binary format parsing
- Real Intel 5300 CSI Tool format support
- Binary and text format auto-detection
- Proper hardware connection management
CSI Processor (csi_processor.py):
- Real Doppler shift calculation from phase history
- Phase rate of change to frequency conversion
- Proper temporal analysis using CSI history
Router Interface (router_interface.py):
- Real SSH connection using asyncssh
- Router type detection (OpenWRT, DD-WRT, Atheros CSI Tool)
- Multiple CSI collection methods (debugfs, procfs, CSI tool)
- Real binary CSI data parsing
Pose Service (pose_service.py):
- Real pose parsing from DensePose segmentation output
- Connected component analysis for person detection
- Keypoint extraction from body part segmentation
- Activity classification from keypoint geometry
- Bounding box calculation from detected regions
Removed random.uniform/random.randint/np.random in production code paths.
- Add detailed wifi-Mat user guide covering:
- Installation and setup
- Detection capabilities (breathing, heartbeat, movement)
- Localization system (triangulation, depth estimation)
- START protocol triage classification
- Alert system with priority escalation
- Field deployment guide
- Hardware setup requirements
- API reference and troubleshooting
- Update main README.md with wifi-Mat section and links
- Fix compilation issues:
- Add missing deadline field in AlertPayload
- Fix type ambiguity in powi calls
- Resolve borrow checker issues in scan_cycle
- Export CsiDataBuffer from detection module
- Add missing imports in test modules
- All 83 tests now passing
- Created comprehensive API reference documentation covering authentication, request/response formats, error handling, and various API endpoints for pose estimation, system management, health checks, and WebSocket interactions.
- Developed a detailed deployment guide outlining prerequisites, Docker and Kubernetes deployment steps, cloud deployment options for AWS, GCP, and Azure, and configuration for production environments.
- Added HardwareService for managing router interfaces, data collection, and monitoring.
- Introduced PoseService for processing CSI data and estimating poses using neural networks.
- Created StreamService for real-time data streaming via WebSocket connections.
- Implemented initialization, start, stop, and status retrieval methods for each service.
- Added data processing, error handling, and statistics tracking across services.
- Integrated mock data generation for development and testing purposes.
- Added CSIExtractor class for extracting CSI data from WiFi routers.
- Implemented RouterInterface class for SSH communication with routers.
- Developed DensePoseHead class for body part segmentation and UV coordinate regression.
- Created unit tests for CSIExtractor and RouterInterface to ensure functionality and error handling.
- Integrated paramiko for SSH connections and command execution.
- Established configuration validation for both extractor and router interface.
- Added context manager support for resource management in both classes.
- Implemented the WiFi DensePose model in PyTorch, including CSI phase processing, modality translation, and DensePose prediction heads.
- Added a comprehensive training utility for the model, including loss functions and training steps.
- Created a CSV file to document hardware specifications, architecture details, training parameters, performance metrics, and advantages of the model.