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.
WiFi-DensePose v1 (Python Implementation)
This directory contains the original Python implementation of WiFi-DensePose.
Structure
v1/
├── src/ # Python source code
│ ├── api/ # REST API endpoints
│ ├── config/ # Configuration management
│ ├── core/ # Core processing logic
│ ├── database/ # Database models and migrations
│ ├── hardware/ # Hardware interfaces
│ ├── middleware/ # API middleware
│ ├── models/ # Neural network models
│ ├── services/ # Business logic services
│ └── tasks/ # Background tasks
├── tests/ # Test suite
├── docs/ # Documentation
├── scripts/ # Utility scripts
├── data/ # Data files
├── setup.py # Package setup
├── test_application.py # Application tests
└── test_auth_rate_limit.py # Auth/rate limit tests
Requirements
- Python 3.10+
- PyTorch 2.0+
- FastAPI
- PostgreSQL/SQLite
Installation
cd v1
pip install -e .
Usage
# Start API server
python -m src.main
# Run tests
pytest tests/
Note
This is the legacy Python implementation. For the new Rust implementation with improved performance, see /rust-port/wifi-densepose-rs/.