A cutting-edge WiFi-based human pose estimation system that leverages Channel State Information (CSI) data and advanced machine learning to provide real-time, privacy-preserving pose detection without cameras.
Privacy-First: No cameras required - uses WiFi signals for pose detection
Real-Time Processing: Sub-50ms latency with 30 FPS pose estimation
Multi-Person Tracking: Simultaneous tracking of up to 10 individuals
Domain-Specific Optimization: Healthcare, fitness, smart home, and security applications
Enterprise-Ready: Production-grade API with authentication, rate limiting, and monitoring
Hardware Agnostic: Works with standard WiFi routers and access points
Comprehensive Analytics: Fall detection, activity recognition, and occupancy monitoring
WebSocket Streaming: Real-time pose data streaming for live applications
100% Test Coverage: Thoroughly tested with comprehensive test suite
WiFi DensePose consists of several key components working together:
CSI Processor: Extracts and processes Channel State Information from WiFi signals
Phase Sanitizer: Removes hardware-specific phase offsets and noise
DensePose Neural Network: Converts CSI data to human pose keypoints
Multi-Person Tracker: Maintains consistent person identities across frames
REST API: Comprehensive API for data access and system control
WebSocket Streaming: Real-time pose data broadcasting
Analytics Engine: Advanced analytics including fall detection and activity recognition
WiFi-DensePose is now available on PyPI for easy installation:
# Install the latest stable version
pip install wifi-densepose
# Install with specific version
pip install wifi-densepose==1.0.0
# Install with optional dependencies
pip install wifi-densepose[gpu] # For GPU acceleration
pip install wifi-densepose[dev] # For development
pip install wifi-densepose[all] # All optional dependencies
docker pull ruvnet/wifi-densepose:latest
docker run -p 8000:8000 ruvnet/wifi-densepose:latest
Python: 3.8 or higher
Operating System: Linux (Ubuntu 18.04+), macOS (10.15+), Windows 10+
Memory: Minimum 4GB RAM, Recommended 8GB+
Storage: 2GB free space for models and data
Network: WiFi interface with CSI capability
GPU: Optional but recommended (NVIDIA GPU with CUDA support)
# Install the package
pip install wifi-densepose
# Copy example configuration
cp example.env .env
# Edit configuration (set your WiFi interface)
nano .env
fromwifi_denseposeimportWiFiDensePose# Initialize with default configurationsystem=WiFiDensePose()
# Start pose estimationsystem.start()
# Get latest pose dataposes=system.get_latest_poses()
print(f"Detected {len(poses)} persons")
# Stop the systemsystem.stop()
# Start the API server
wifi-densepose start
# Start with custom configuration
wifi-densepose -c /path/to/config.yaml start
# Start with verbose logging
wifi-densepose -v start
# Check server status
wifi-densepose status
The API will be available at http://localhost:8000
importasyncioimportwebsocketsimportjsonasyncdefstream_poses():
uri="ws://localhost:8000/ws/pose/stream"asyncwithwebsockets.connect(uri) aswebsocket:
whileTrue:
data=awaitwebsocket.recv()
poses=json.loads(data)
print(f"Received poses: {len(poses['persons'])} persons detected")
# Run the streaming clientasyncio.run(stream_poses())
WiFi DensePose provides a comprehensive command-line interface for easy system management, configuration, and monitoring.
The CLI is automatically installed with the package:
# Install WiFi DensePose with CLI
pip install wifi-densepose
# Verify CLI installation
wifi-densepose --help
wifi-densepose version
The WiFi-DensePose CLI provides the following commands:
wifi-densepose [OPTIONS] COMMAND [ARGS]...
Options:
-c, --config PATH Path to configuration file
-v, --verbose Enable verbose logging
--debug Enable debug mode
--help Show this message and exit.
Commands:
config Configuration management commands.
db Database management commands.
start Start the WiFi-DensePose API server.
status Show the status of the WiFi-DensePose API server.
stop Stop the WiFi-DensePose API server.
tasks Background task management commands.
version Show version information.
# Start the WiFi-DensePose API server
wifi-densepose start
# Start with custom configuration
wifi-densepose -c /path/to/config.yaml start
# Start with verbose logging
wifi-densepose -v start
# Start with debug mode
wifi-densepose --debug start
# Check server status
wifi-densepose status
# Stop the server
wifi-densepose stop
# Show version information
wifi-densepose version
# Database management commands
wifi-densepose db [SUBCOMMAND]
# Examples:# Initialize database
wifi-densepose db init
# Run database migrations
wifi-densepose db migrate
# Check database status
wifi-densepose db status
# Backup database
wifi-densepose db backup
# Restore database
wifi-densepose db restore
# Background task management commands
wifi-densepose tasks [SUBCOMMAND]
# Examples:# List running tasks
wifi-densepose tasks list
# Start background tasks
wifi-densepose tasks start
# Stop background tasks
wifi-densepose tasks stop
# Check task status
wifi-densepose tasks status
# Show help for main command
wifi-densepose --help
# Show help for specific command
wifi-densepose start --help
wifi-densepose config --help
wifi-densepose db --help
# Use global options with commands
wifi-densepose -v status # Verbose status check
wifi-densepose --debug start # Start with debug logging
wifi-densepose -c custom.yaml start # Start with custom config
# Basic server lifecycle
wifi-densepose start # Start the server
wifi-densepose status # Check if running
wifi-densepose stop # Stop the server# Configuration management
wifi-densepose config show # View current config
wifi-densepose config validate # Check config validity# Database operations
wifi-densepose db init # Initialize database
wifi-densepose db migrate # Run migrations
wifi-densepose db status # Check database health# Task management
wifi-densepose tasks list # List background tasks
wifi-densepose tasks status # Check task status# Version and help
wifi-densepose version # Show version info
wifi-densepose --help # Show help message
# 1. Check version and help
wifi-densepose version
wifi-densepose --help
# 2. Initialize configuration
wifi-densepose config init
# 3. Initialize database
wifi-densepose db init
# 4. Start the server
wifi-densepose start
# 5. Check status
wifi-densepose status
# Start with debug logging
wifi-densepose --debug start
# Use custom configuration
wifi-densepose -c dev-config.yaml start
# Check database status
wifi-densepose db status
# Manage background tasks
wifi-densepose tasks start
wifi-densepose tasks list
# Start with production config
wifi-densepose -c production.yaml start
# Check system status
wifi-densepose status
# Manage database
wifi-densepose db migrate
wifi-densepose db backup
# Monitor tasks
wifi-densepose tasks status
# Enable verbose logging
wifi-densepose -v status
# Check configuration
wifi-densepose config validate
# Check database health
wifi-densepose db status
# Restart services
wifi-densepose stop
wifi-densepose start
Comprehensive documentation is available to help you get started and make the most of WiFi-DensePose:
User Guide - Complete guide covering installation, setup, basic usage, and examples
API Reference - Detailed documentation of all public classes, methods, and endpoints
Deployment Guide - Production deployment, Docker setup, Kubernetes, and scaling strategies
The system provides a comprehensive REST API and WebSocket streaming:
# Pose estimation
GET /api/v1/pose/latest # Get latest pose data
GET /api/v1/pose/history # Get historical data
GET /api/v1/pose/zones/{zone_id} # Get zone-specific data# System management
GET /api/v1/system/status # System health and status
POST /api/v1/system/calibrate # Calibrate environment
GET /api/v1/analytics/summary # Analytics dashboard data
// Real-time pose data
ws://localhost:8000/ws/pose/stream// Analytics events (falls, alerts)
ws://localhost:8000/ws/analytics/events// System status updates
ws://localhost:8000/ws/system/status
fromwifi_denseposeimportWiFiDensePoseClient# Initialize clientclient=WiFiDensePoseClient(base_url="http://localhost:8000")
# Get latest poses with confidence filteringposes=client.get_latest_poses(min_confidence=0.7)
print(f"Detected {len(poses)} persons")
# Get zone occupancyoccupancy=client.get_zone_occupancy("living_room")
print(f"Living room occupancy: {occupancy.person_count}")
WiFi DensePose maintains 100% test coverage with comprehensive testing:
# Run all tests
pytest
# Run with coverage report
pytest --cov=wifi_densepose --cov-report=html
# Run specific test categories
pytest tests/unit/ # Unit tests
pytest tests/integration/ # Integration tests
pytest tests/e2e/ # End-to-end tests
pytest tests/performance/ # Performance tests
Unit Tests (95% coverage)
CSI processing algorithms
Neural network components
Tracking algorithms
API endpoints
Configuration validation
Hardware interface integration
Database operations
WebSocket connections
Authentication flows
Complete pose estimation pipeline
Multi-person tracking scenarios
Real-time streaming
Analytics generation
Latency benchmarks
Throughput testing
Memory usage profiling
Stress testing
For development without hardware:
# Enable mock modeexport MOCK_HARDWARE=true
export MOCK_POSE_DATA=true
# Run tests with mocked hardware
pytest tests/ --mock-hardware
# API load testing with Apache Bench
ab -n 10000 -c 100 http://localhost:8000/api/v1/pose/latest
# WebSocket load testing
python scripts/websocket_load_test.py --connections 1000 --duration 300
We welcome contributions to WiFi DensePose! Please follow these guidelines:
# Clone the repository
git clone https://github.com/ruvnet/wifi-densepose.git
cd wifi-densepose
# Create virtual environment
python -m venv venv
source venv/bin/activate # On Windows: venv\Scripts\activate# Install development dependencies
pip install -r requirements-dev.txt
pip install -e .# Install pre-commit hooks
pre-commit install
Python Style: Follow PEP 8, enforced by Black and Flake8
Type Hints: Use type hints for all functions and methods
Documentation: Comprehensive docstrings for all public APIs
Testing: Maintain 100% test coverage for new code
Security: Follow OWASP guidelines for security
Fork the repository
Create a feature branch (git checkout -b feature/amazing-feature)
Commit your changes (git commit -m 'Add amazing feature')
Push to the branch (git push origin feature/amazing-feature)
Open a Pull Request
Code follows style guidelines
Tests pass and coverage is maintained
Documentation is updated
Security considerations addressed
Performance impact assessed
Backward compatibility maintained
**Describe the bug**
A clear description of the bug.
**To Reproduce**
Steps to reproduce the behavior.
**Expected behavior**
What you expected to happen.
**Environment**- OS: [e.g., Ubuntu 20.04]- Python version: [e.g., 3.8.10]- WiFi DensePose version: [e.g., 1.0.0]
**Feature Description**
A clear description of the feature.
**Use Case**
Describe the use case and benefits.
**Implementation Ideas**
Any ideas on how to implement this feature.
This project is licensed under the MIT License - see the LICENSE file for details.
MIT License
Copyright (c) 2025 WiFi DensePose Contributors
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
Research Foundation: Based on groundbreaking research in WiFi-based human sensing
Open Source Libraries: Built on PyTorch, FastAPI, and other excellent open source projects
Community: Thanks to all contributors and users who make this project possible
Hardware Partners: Special thanks to router manufacturers for CSI support