# abinand2631/wifi-vision architecture

> Architecture diagram of the GitHub repository abinand2631/wifi-vision, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-20). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/abinand2631/wifi-vision
- Repository: https://github.com/abinand2631/wifi-vision

## Overview

Wi-Fi Vision is a camera-free human pose and activity sensing application built around dual ESP32 CSI receivers and a learned pose-regression model. Its documented offline workflow captures labeled CSI and video, synchronizes and preprocesses CSI against pose ground truth, then trains TEDNet; its live workflow buffers two CSI streams, applies a kinetic gate, predicts 3D keypoints, classifies posture, and renders results. The README also documents standalone inference and a port-selection launcher. Source excerpts support core capture, preprocessing, training, and dashboard behavior; launcher dispatch is directly shown, while some standalone and firmware details are documented only in the README.

Main entry points: [`1_capture.py`](https://github.com/abinand2631/wifi-vision/blob/main/1_capture.py) (CSI Capture), [`3_extraction.py`](https://github.com/abinand2631/wifi-vision/blob/main/3_extraction.py) (CSI Synchronization), [`6_test_live_v1.py`](https://github.com/abinand2631/wifi-vision/blob/main/6_test_live_v1.py) (TEDNet Pose Regression), [`train.py`](https://github.com/abinand2631/wifi-vision/blob/main/train.py) (TEDNet Training)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_data["Data Collection"]
  node_capture["CSI Capture<br/>[1_capture.py]"]
  node_recordings[("CSI and Video Recordings")]
end

subgraph group_learning["Model Preparation"]
  node_preprocessing["CSI Synchronization<br/>[3_extraction.py]"]
  node_groundtruth[("Pose Ground Truth")]
  node_trainingdata[("Training Tensors")]
  node_dataset["CSI Dataset<br/>[train.py]"]
  node_tednettrain["TEDNet Training<br/>[train.py]"]
  node_weights[("Model Weights")]
end

subgraph group_live["Live Sensing"]
  node_standalone["Standalone Inference<br/>[6_test_live_v1.py]"]
  node_standalonev2["Standalone Inference V2<br/>[6_test_live_v2.py]"]
  node_dashboard["Streamlit Dashboard<br/>[dashboard.py]"]
  node_serialinput["Dual CSI Stream Input<br/>[6_test_live_v1.py]"]
  node_windowing["Windowing and Calibration<br/>[6_test_live_v1.py]"]
  node_inference["TEDNet Pose Regression<br/>[6_test_live_v1.py]"]
  node_classification["Posture Classification<br/>[6_test_live_v1.py]"]
  node_rendering["3D Pose Rendering<br/>[6_test_live_v1.py]"]
  node_dashboardengine["Dashboard Inference Engine<br/>[dashboard.py]"]
end

subgraph group_launch["Application Launch"]
  node_portlauncher["Port Launcher<br/>[launcher.py]"]
end

node_operator(("Operator"))
node_esp32tx{{"ESP32 Transmitter"}}
node_receivers{{"Dual ESP32 Receivers"}}
node_webcam{{"Webcam Ground Truth"}}

node_operator -->|"records sessions"| node_capture
node_esp32tx -->|"transmits CSI"| node_receivers
node_receivers -->|"streams serial CSI"| node_capture
node_webcam -->|"provides video"| node_capture
node_capture -->|"writes recordings"| node_recordings
node_operator -->|"runs extraction"| node_preprocessing
node_recordings -->|"reads CSI CSV"| node_preprocessing
node_groundtruth -->|"provides pose labels"| node_preprocessing
node_preprocessing -->|"writes tensors"| node_trainingdata
node_operator -->|"starts training"| node_tednettrain
node_tednettrain -->|"loads samples"| node_dataset
node_trainingdata -->|"loads arrays"| node_dataset
node_tednettrain -->|"saves best weights"| node_weights
node_operator -->|"selects ports"| node_portlauncher
node_portlauncher -->|"launches script"| node_standalone
node_operator -->|"starts dashboard"| node_dashboard
node_receivers -->|"streams CSI"| node_serialinput
node_serialinput -->|"buffers frames"| node_windowing
node_windowing -->|"supplies CSI window"| node_inference
node_weights -.->|"loads model"| node_inference
node_inference -->|"predicts keypoints"| node_classification
node_classification -->|"provides pose status"| node_rendering
node_receivers -->|"streams serial CSI"| node_dashboardengine
node_dashboardengine -.->|"runs TEDNet"| node_inference
node_dashboard -->|"hosts inference"| node_dashboardengine
node_operator -->|"runs alternate UI"| node_standalonev2

click node_capture "https://github.com/abinand2631/wifi-vision/blob/main/1_capture.py"
click node_recordings "https://github.com/abinand2631/wifi-vision/tree/main/data"
click node_preprocessing "https://github.com/abinand2631/wifi-vision/blob/main/3_extraction.py"
click node_groundtruth "https://github.com/abinand2631/wifi-vision/tree/main/data/gt"
click node_trainingdata "https://github.com/abinand2631/wifi-vision/tree/main/data/processed"
click node_dataset "https://github.com/abinand2631/wifi-vision/blob/main/train.py"
click node_tednettrain "https://github.com/abinand2631/wifi-vision/blob/main/train.py"
click node_weights "https://github.com/abinand2631/wifi-vision/tree/main/models"
click node_portlauncher "https://github.com/abinand2631/wifi-vision/blob/main/launcher.py"
click node_standalone "https://github.com/abinand2631/wifi-vision/blob/main/6_test_live_v1.py"
click node_standalonev2 "https://github.com/abinand2631/wifi-vision/blob/main/6_test_live_v2.py"
click node_dashboard "https://github.com/abinand2631/wifi-vision/blob/main/dashboard.py"
click node_serialinput "https://github.com/abinand2631/wifi-vision/blob/main/6_test_live_v1.py"
click node_windowing "https://github.com/abinand2631/wifi-vision/blob/main/6_test_live_v1.py"
click node_inference "https://github.com/abinand2631/wifi-vision/blob/main/6_test_live_v1.py"
click node_classification "https://github.com/abinand2631/wifi-vision/blob/main/6_test_live_v1.py"
click node_rendering "https://github.com/abinand2631/wifi-vision/blob/main/6_test_live_v1.py"
click node_dashboardengine "https://github.com/abinand2631/wifi-vision/blob/main/dashboard.py"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_capture,node_recordings toneBlue
class node_preprocessing,node_groundtruth,node_trainingdata,node_dataset,node_tednettrain,node_weights toneAmber
class node_standalone,node_standalonev2,node_dashboard,node_serialinput,node_windowing,node_inference,node_classification,node_rendering,node_dashboardengine toneMint
class node_portlauncher toneRose
class node_operator,node_esp32tx,node_receivers,node_webcam toneIndigo
```

## Components

### Data Collection

- [CSI Capture](https://github.com/abinand2631/wifi-vision/blob/main/1_capture.py): `1_capture.py`
- [CSI and Video Recordings](https://github.com/abinand2631/wifi-vision/tree/main/data): `data`

### Model Preparation

- [CSI Synchronization](https://github.com/abinand2631/wifi-vision/blob/main/3_extraction.py): `3_extraction.py`
- [Pose Ground Truth](https://github.com/abinand2631/wifi-vision/tree/main/data/gt): `data/gt`
- [Training Tensors](https://github.com/abinand2631/wifi-vision/tree/main/data/processed): `data/processed`
- [CSI Dataset](https://github.com/abinand2631/wifi-vision/blob/main/train.py): `train.py`
- [TEDNet Training](https://github.com/abinand2631/wifi-vision/blob/main/train.py): `train.py`
- [Model Weights](https://github.com/abinand2631/wifi-vision/tree/main/models): `models`

### Live Sensing

- [Standalone Inference](https://github.com/abinand2631/wifi-vision/blob/main/6_test_live_v1.py): `6_test_live_v1.py`
- [Standalone Inference V2](https://github.com/abinand2631/wifi-vision/blob/main/6_test_live_v2.py): `6_test_live_v2.py`
- [Streamlit Dashboard](https://github.com/abinand2631/wifi-vision/blob/main/dashboard.py): `dashboard.py`
- [Dual CSI Stream Input](https://github.com/abinand2631/wifi-vision/blob/main/6_test_live_v1.py): `6_test_live_v1.py`
- [Windowing and Calibration](https://github.com/abinand2631/wifi-vision/blob/main/6_test_live_v1.py): `6_test_live_v1.py`
- [TEDNet Pose Regression](https://github.com/abinand2631/wifi-vision/blob/main/6_test_live_v1.py): `6_test_live_v1.py`
- [Posture Classification](https://github.com/abinand2631/wifi-vision/blob/main/6_test_live_v1.py): `6_test_live_v1.py`
- [3D Pose Rendering](https://github.com/abinand2631/wifi-vision/blob/main/6_test_live_v1.py): `6_test_live_v1.py`
- [Dashboard Inference Engine](https://github.com/abinand2631/wifi-vision/blob/main/dashboard.py): `dashboard.py`

### Application Launch

- [Port Launcher](https://github.com/abinand2631/wifi-vision/blob/main/launcher.py): `launcher.py`

### Other components

- **Operator**
- **ESP32 Transmitter**
- **Dual ESP32 Receivers**
- **Webcam Ground Truth**

## Connections

- Operator → CSI Capture: records sessions (evidence: `README.md`)
- ESP32 Transmitter → Dual ESP32 Receivers: transmits CSI (evidence: `README.md`)
- Dual ESP32 Receivers → CSI Capture: streams serial CSI (evidence: `1_capture.py`)
- Webcam Ground Truth → CSI Capture: provides video (evidence: `1_capture.py`)
- CSI Capture → CSI and Video Recordings: writes recordings (evidence: `1_capture.py`)
- Operator → CSI Synchronization: runs extraction (evidence: `README.md`)
- CSI and Video Recordings → CSI Synchronization: reads CSI CSV (evidence: `3_extraction.py`)
- Pose Ground Truth → CSI Synchronization: provides pose labels (evidence: `3_extraction.py`)
- CSI Synchronization → Training Tensors: writes tensors (evidence: `3_extraction.py`)
- Operator → TEDNet Training: starts training (evidence: `README.md`)
- TEDNet Training → CSI Dataset: loads samples (evidence: `train.py`)
- Training Tensors → CSI Dataset: loads arrays (evidence: `train.py`)
- TEDNet Training → Model Weights: saves best weights (evidence: `train.py`)
- Operator → Port Launcher: selects ports (evidence: `launcher.py`)
- Port Launcher → Standalone Inference: launches script (evidence: `launcher.py`)
- Operator → Streamlit Dashboard: starts dashboard (evidence: `README.md`)
- Dual ESP32 Receivers → Dual CSI Stream Input: streams CSI (evidence: `6_test_live_v1.py`)
- Dual CSI Stream Input → Windowing and Calibration: buffers frames (evidence: `6_test_live_v1.py`)
- Windowing and Calibration → TEDNet Pose Regression: supplies CSI window (evidence: `6_test_live_v1.py`)
- Model Weights → TEDNet Pose Regression: loads model
- TEDNet Pose Regression → Posture Classification: predicts keypoints (evidence: `6_test_live_v1.py`)
- Posture Classification → 3D Pose Rendering: provides pose status (evidence: `6_test_live_v1.py`)
- Dual ESP32 Receivers → Dashboard Inference Engine: streams serial CSI (evidence: `dashboard.py`)
- Dashboard Inference Engine → TEDNet Pose Regression: runs TEDNet
- Streamlit Dashboard → Dashboard Inference Engine: hosts inference (evidence: `dashboard.py`)
- Operator → Standalone Inference V2: runs alternate UI (evidence: `README.md`)
