Real-time 3D human pose estimation from WiFi Channel State Information (CSI) β using an ESP32 and your existing home routers. No camera. No wearable. No cloud. Just radio waves.
- Overview
- Features
- Hardware Requirements
- Machine Learning Model
- System Architecture
- Getting Started
- Usage & Testing
- Troubleshooting
- License
SWEENEX redefines human activity tracking by transforming standard WiFi signals into a powerful 3D vision system. By analyzing how human bodies interact with and distort WiFi signals (Channel State Information - CSI), SWEENEX can reconstruct a full 17-keypoint 3D skeleton in real time.
By utilizing an ESP32 to sniff packets and an ONNX-powered ML model containing Spatial CNNs and Temporal Transformer Encoders, SWEENEX achieves a Mean Per Joint Position Error (MPJPE) of just 93.7 mmβwithout ever turning on a camera.
- π΅οΈββοΈ 100% Privacy-Preserving: No cameras, no lenses. Operates entirely through walls and physical barriers using 2.4/5GHz radio waves.
- β‘ High-Speed Edge Inference: Runs locally at
>= 80 Hzsampling rates with optimized hardware and software handling. - π‘ Multi-Router Aggregation: Gathers and synchronizes CSI data dynamically from multiple routers (up to 3 recommended) for rich spatial diversity.
- π§ Advanced ML Pipeline: Employs the
sweenex_pose_v2_multi_routermodel combining spatial CNNs with temporal Transformer encoders. - π Interactive 3D Web App: A stunning, responsive Next.js + React dashboard visualizing the predicted 3D skeletal data in real time, built with
@tweenjsfor smooth animations.
To run SWEENEX seamlessly, ensure your physical environment meets the following specifications:
| Component | Specification | Description |
|---|---|---|
| Data Collector | ESP32 NodeMCU | Must support monitor mode to extract CSI. |
| Data Cable | USB Data Cable | Must be a data-capable cable (not charge-only). |
| Signal Sources | 3x WiFi Routers | Set to HT40 mode. The system uses 52 subcarriers dynamically. |
| Processing Unit | PC / Laptop | Required for ONNX model inference and running the local Next.js server. |
Note: The ESP32 relies on the
CH340orCP210xdriver depending on your board. Ensure it is installed on your server machine.
SWEENEX leverages a sophisticated deep learning architecture. Here are the specifications of the core engine (model_info.json):
View Model Details (sweenex_pose_v2_multi_router)
- Version:
2.0.0 - Architecture: CNN (Spatial feature extraction) + Transformer Encoder (Temporal processing)
- Dataset: MM-Fi (Trained on 40 unique subjects)
- Performance:
93.7 mmMPJPE (Mean Per Joint Position Error) - Input Tensor:
csi_tensorwith shape[1, 1, 100, -1]. The feature dimension dynamically adjusts ton_routers * 52. - Output Tensors:
keypoints_3d: Shape[1, 17, 3](COCO 17 keypoints format, Coordinates in meters).confidences: Shape[1, 17](Range 0.0 - 1.0).
- Requirements: Window Size =
100, Sampling Rate =100 Hz. - ONNX Opset:
17
- Flash your ESP32 with the custom SWEENEX firmware.
- Ensure the
channel_hopper.cconfiguration matches the channels used by your 3 target routers. - Connect the ESP32 to your PC using a high-speed USB data cable.
The server handles serial data extraction from the ESP32, parses JSON packets, and executes the ONNX inference.
# Navigate to the server directory
cd server
# Create a virtual environment and install dependencies
python -m venv venv
source venv/bin/activate # On Windows use: venv\Scripts\activate
pip install -r requirements.txtThe frontend is built on Next.js and leverages packages like @tweenjs/tween.js for smooth 3D interpolation and stats.js for performance monitoring.
# Navigate to the web directory
cd web
# Install dependencies
npm install
# Start the development server
npm run devYour dashboard will be live at http://localhost:3000.
Before running the full system, verify that the ESP32 is reading packets at the correct speed (>= 80 Hz required, 100 Hz recommended). SWEENEX includes a built-in diagnostic tool.
Run the test_connection.py script:
python scripts/test_connection.py --port /dev/ttyUSB0 --duration 10(Note: On Windows, use --port COM3 or whichever COM port is assigned to the CH340 chip).
Expected Output:
Testing ESP32 connection on /dev/ttyUSB0 for 10s...
10s β 950 packets β 95.0 Hz β 3 routers
==================================================
Test Results (10s):
Total packets : 950
Sampling rate : 95.0 Hz β
Parse errors : 0
Routers seen : 3
Router details:
AA:BB:CC:DD:EE:11 β 350 packets (36.8%)
AA:BB:CC:DD:EE:22 β 320 packets (33.6%)
AA:BB:CC:DD:EE:33 β 280 packets (29.4%)
β Connection OK! Server is ready to run.
Once the connection is verified:
- Start the inference server:
python main.py(or your entry point). - Ensure the Next.js web application is running (
npm run dev). - Open the web interface to view the live 3D tracking.
If test_connection.py fails or returns β Ada masalah. Cek firmware ESP32 dan channel_hopper.c:
- Port Cannot Open: Ensure the ESP32 is not opened in another serial monitor (like Arduino IDE). Verify the
CH340driver is installed. - Low Sampling Rate (< 80 Hz): Check if you are using a charge-only USB cable. Use a proper Data cable.
- Not Seeing 3 Routers: Verify that the MAC addresses (BSSIDs) and channels in the ESP32 firmware match your actual home routers.
- Parse Errors: Make sure the ESP32 baudrate is explicitly set to
921600.
This project is licensed under the MIT License.
Designed and developed by the SWEENEX - Ricki. Bringing radio-wave vision to life.