diff --git a/README.md b/README.md index 691e30a0..807789f6 100644 --- a/README.md +++ b/README.md @@ -58,7 +58,7 @@ RuView turns ordinary WiFi into a contactless sensor. A $9 ESP32 board reads the > | ๐Ÿ’“ **Heart rate** | Bandpass 0.8โ€“2.0 Hz, zero-crossing BPM | 40โ€“120 BPM, real-time | > | ๐Ÿ‘ค **Presence detection** | Trained head on Hugging Face ([`ruvnet/wifi-densepose-pretrained`](https://huggingface.co/ruvnet/wifi-densepose-pretrained); v2 encoder = 82.3% held-out temporal-triplet acc, honestly re-benchmarked) + a phase-variance fallback that needs no model | < 1 ms, ~30 s ambient calibration | > | ๐Ÿงฌ **CSI embeddings** | 128-dim contrastive encoder shipped on Hugging Face, 4-bit quantised variant fits in 8 KB | **164,183 emb/s** on M4 Pro | -> | ๐Ÿฆด **17-keypoint pose estimation** | `cog-pose-estimation` Cog v0.0.1 โ€” signed aarch64 + x86_64 binaries on GCS, loads `pose_v1.safetensors` via Candle. Train your own from paired data in 2.1 s on an RTX 5080 ([ADR-101](docs/adr/ADR-101-pose-estimation-cog.md), [benchmarks](docs/benchmarks/pose-estimation-cog.md)). **SOTA on MM-Fi:** [`ruvnet/wifi-densepose-mmfi-pose`](https://huggingface.co/ruvnet/wifi-densepose-mmfi-pose) hits **82.69% torso-PCK@20** (ensemble 83.59%), beating MultiFormer (72.25%) and CSI2Pose (68.41%) on the matched MM-Fi `random_split` protocol โ€” self-corrected and auditable on [AetherArena](https://huggingface.co/spaces/ruvnet/aether-arena) | 8.4 ms cold-start on a Pi 5 | +> | ๐Ÿฆด **17-keypoint pose estimation** | `cog-pose-estimation` Cog v0.0.1 โ€” signed aarch64 + x86_64 binaries on GCS, loads `pose_v1.safetensors` via Candle (the committed `pose_v1` is a **first-cut** on-device model: PCK@20 = 3.0%, below the ADR-079 โ‰ฅ35% target, and its runtime path is still a `confidence=0` stub โ€” see [Model weights: what's real, what's not](#model-weights-whats-real-whats-not); the **82.69%** figure below is the separate published MM-Fi benchmark, not this live cog). Train your own from paired data in 2.1 s on an RTX 5080 ([ADR-101](docs/adr/ADR-101-pose-estimation-cog.md), [benchmarks](docs/benchmarks/pose-estimation-cog.md)). **SOTA on MM-Fi:** [`ruvnet/wifi-densepose-mmfi-pose`](https://huggingface.co/ruvnet/wifi-densepose-mmfi-pose) hits **82.69% torso-PCK@20** (ensemble 83.59%), beating MultiFormer (72.25%) and CSI2Pose (68.41%) on the matched MM-Fi `random_split` protocol โ€” self-corrected and auditable on [AetherArena](https://huggingface.co/spaces/ruvnet/aether-arena) | 8.4 ms cold-start on a Pi 5 | > | ๐Ÿšถ **Motion / activity** | Motion-band power + phase acceleration | Real-time | > | ๐Ÿคธ **Fall detection** | Phase-acceleration threshold + 3-frame debounce + 5 s cooldown ([#263](https://github.com/ruvnet/RuView/issues/263)) | < 200 ms | > | ๐Ÿงฎ **Multi-person count** | Adaptive P95 normalisation + runtime-tunable dedup factor (`/api/v1/config/dedup-factor`, [#491](https://github.com/ruvnet/RuView/pull/491)). Six specialised learned counters available as Cogs: `occupancy-zones`, `elevator-count`, `queue-length`, `customer-flow`, `clean-room`, `person-matching` | Real-time, self-calibrating | @@ -204,7 +204,26 @@ The separate **17-keypoint pose-estimation model** is now published at [`ruvnet/ python archive/v1/data/proof/verify.py ``` -Tracked in [#509](https://github.com/ruvnet/RuView/issues/509); see [ADR-079](docs/adr/ADR-079-camera-supervised-pose-finetune.md) phases P7โ€“P9 for the camera-supervised fine-tune path. +Tracked in [#509](https://github.com/ruvnet/RuView/issues/509); see [ADR-079](docs/adr/ADR-079-camera-ground-truth-training.md) phases P7โ€“P9 for the camera-supervised fine-tune path. + +### Model weights: what's real, what's not + +"WiFi โ†’ pose" means three different things in this repo, at three different maturity +levels. Read the label, not the headline ([ADR-187](docs/adr/ADR-187-archive-v1-deprecation-honest-labeling.md)): + +| Tier | Checkpoint(s) | Honest status | +|------|---------------|---------------| +| **Real & validated** | [`ruvnet/wifi-densepose-pretrained`](https://huggingface.co/ruvnet/wifi-densepose-pretrained) (CSI encoder + presence head) ยท [`ruvnet/wifi-densepose-mmfi-pose`](https://huggingface.co/ruvnet/wifi-densepose-mmfi-pose) (17-keypoint pose) ยท `cog-person-count/count_v1` | **MEASURED / published.** Presence = 82.3% held-out temporal-triplet accuracy (the old "100% presence" figure was retracted); MM-Fi pose = 82.69% torso-PCK@20 on the `random_split` protocol. These are the pose/presence numbers the project stands behind today. | +| **Real but weak (honestly labeled)** | committed `v2/crates/cog-pose-estimation/cog/artifacts/pose_v1.safetensors` | First-cut on-device model. **PCK@20 = 3.0% / PCK@50 = 18.5%** on a 217-sample holdout โ€” **below the ADR-079 target of โ‰ฅ 35%.** Learns coarse structure (`r_hip` 77% PCK@50); distal/face joints near-random. Its runtime path in `cog-pose-estimation/src/inference.rs` is still a centred-skeleton **stub returning `confidence=0`** โ€” the weights are not yet wired in. Full disclosure in the [cog README](v2/crates/cog-pose-estimation/cog/README.md). | +| **Architecture only, no weights** | `archive/v1` `DensePoseHead` | Random `kaiming_normal_` init, **no checkpoint of any kind** (zero `.pth`/`.onnx`/`.safetensors` files under `archive/v1/`). Deprecated and superseded โ€” see [`archive/v1/DEPRECATED.md`](archive/v1/DEPRECATED.md). Do not expect real pose output from it. | + +**On the ESP32-SISO question ([#509](https://github.com/ruvnet/RuView/issues/509)):** a +single-antenna, 56-subcarrier CSI stream at a 20-frame window does *not* carry the +fine-grained spatial information the multi-antenna NIC research relies on โ€” the cog +measurements above show distal/face joints near-random. The shippable pose accuracy the +project can stand behind today is the **MM-Fi benchmark number**, not a live single-ESP32 +number. The path to a first *reproducible* on-device baseline (PCK@20 โ‰ฅ 35%) is tracked in +[ADR-079](docs/adr/ADR-079-camera-ground-truth-training.md) / [#645](https://github.com/ruvnet/RuView/issues/645) โ€” do not advertise the live single-ESP32 17-keypoint feature without the "first-cut, below-target, runtime-stub" caveat until that baseline is measured. ## ๐Ÿงฉ Edge Module Catalog diff --git a/archive/v1/DEPRECATED.md b/archive/v1/DEPRECATED.md new file mode 100644 index 00000000..2bc8ed66 --- /dev/null +++ b/archive/v1/DEPRECATED.md @@ -0,0 +1,49 @@ +# โš ๏ธ DEPRECATED โ€” `archive/v1` is unmaintained and superseded + +**Do not build new work on this tree.** `archive/v1` is the original pure-Python +implementation of WiFi-DensePose. It is kept only as a research archive +(per [ADR-117 ยง1.3](../../docs/adr/ADR-117-pip-wifi-densepose-modernization.md)) and +as the host of one still-live deterministic proof (see "What still lives here" below). +Everything else in this directory is frozen and receives no fixes, reviews, or support. + +Governed by [ADR-187](../../docs/adr/ADR-187-archive-v1-deprecation-honest-labeling.md). + +## The one honest fact that trips people up + +`archive/v1/src/models/densepose_head.py` defines a `DensePoseHead` neural-network +architecture (segmentation + UV-regression heads). **It ships no trained weights.** Its +`_initialize_weights()` uses `kaiming_normal_` **random initialization only** โ€” there is +no checkpoint-loading path in the class, and there are **zero** `.pth` / `.onnx` / +`.safetensors` / `.pt` / `.ckpt` / `.bin` files anywhere under `archive/v1/`. + +So: the architecture is *defined*, but it is **architecture-only**. Running it produces +random output, not real pose accuracy. This matches the technical review in +[#509](https://github.com/ruvnet/RuView/issues/509) โ€” for *this tree*, the "network +defined, no pre-trained weights" observation is TRUE. + +Real, trained, benchmarked weights **do** exist โ€” just not here. They live in the +maintained `v2/` workspace and on Hugging Face (see next section). + +## Use the maintained path instead + +| You wantโ€ฆ | Go here | +|-----------|---------| +| The maintained implementation | The **`v2/` Rust workspace** (repo root `../../v2/`) | +| A pip install | `pip install ruview` **or** `pip install wifi-densepose` (2.x) โ€” the compiled PyO3 wheel ([ADR-117](../../docs/adr/ADR-117-pip-wifi-densepose-modernization.md)). The `wifi-densepose` **1.x** line is tombstoned on PyPI: `1.99.0` raises an `ImportError` telling you to migrate. | +| Real trained presence/encoder weights | [`ruvnet/wifi-densepose-pretrained`](https://huggingface.co/ruvnet/wifi-densepose-pretrained) โ€” 82.3% held-out temporal-triplet accuracy | +| A real 17-keypoint pose model | [`ruvnet/wifi-densepose-mmfi-pose`](https://huggingface.co/ruvnet/wifi-densepose-mmfi-pose) โ€” 82.69% torso-PCK@20 on MM-Fi `random_split` | +| The honest three-tier weights picture | The "Model weights: what's real, what's not" table in the root [`README.md`](../../README.md) and [`docs/user-guide.md`](../../docs/user-guide.md) | + +## What still lives here (intentionally) + +Only one thing under `archive/v1/` is still a live, cited signal: the deterministic +reference-pipeline proof โ€” + +```bash +python archive/v1/data/proof/verify.py # must print VERDICT: PASS +``` + +This is the ADR-028 "Trust Kill Switch": it feeds a fixed reference signal through the +signal-processing pipeline and checks the SHA-256 of the output against a published hash. +It is a legitimate reproducibility witness and is **not** deprecated. Everything else in +this tree is. diff --git a/archive/v1/README.md b/archive/v1/README.md index 15e7f685..a5898250 100644 --- a/archive/v1/README.md +++ b/archive/v1/README.md @@ -1,3 +1,19 @@ +> ## โš ๏ธ DEPRECATED โ€” unmaintained and superseded +> +> This tree is the **original pure-Python implementation** and is kept only as a research +> archive. It receives no fixes, reviews, or support. **Read [`DEPRECATED.md`](DEPRECATED.md) before using anything below.** +> +> - Its `DensePoseHead` is **architecture-only with random-initialized weights and ships no +> trained checkpoint** โ€” running it produces random output, not real pose accuracy. +> - The maintained path is the **`v2/` Rust workspace** and the `wifi-densepose 2.x` / `ruview` +> pip wheel ([ADR-117](../../docs/adr/ADR-117-pip-wifi-densepose-modernization.md)). The +> `wifi-densepose` 1.x line is tombstoned on PyPI (1.99.0 raises `ImportError`). +> - Real trained weights live elsewhere: [`ruvnet/wifi-densepose-pretrained`](https://huggingface.co/ruvnet/wifi-densepose-pretrained) +> (presence, 82.3%) and [`ruvnet/wifi-densepose-mmfi-pose`](https://huggingface.co/ruvnet/wifi-densepose-mmfi-pose) +> (17-keypoint pose, 82.69% torso-PCK@20). +> - The only still-live artifact here is the deterministic proof `data/proof/verify.py` +> (ADR-028), which stays. See [ADR-187](../../docs/adr/ADR-187-archive-v1-deprecation-honest-labeling.md). + # WiFi-DensePose v1 (Python Implementation) This directory contains the original Python implementation of WiFi-DensePose. diff --git a/docs/user-guide.md b/docs/user-guide.md index d9542a6e..c8ca06ab 100644 --- a/docs/user-guide.md +++ b/docs/user-guide.md @@ -1141,7 +1141,20 @@ What it ships (and what it does not): | Presence detection (occupied / empty) | โœ… Trained head โ€” v2 encoder reports 82.3% held-out temporal-triplet acc (v1's "100% on validation" was a single-class recording โ€” retracted, [#882](https://github.com/ruvnet/RuView/issues/882)) | | 128-dim CSI embeddings (re-ID, similarity, downstream training) | โœ… Trained encoder | | Single-person breathing / heart-rate | โš ๏ธ Server still uses heuristic DSP โ€” model does not replace this yet | -| 17-keypoint full-body pose | ๐Ÿ”ฌ No keypoint weights shipped yet โ€” pose pipeline runs but without a learned head | +| 17-keypoint full-body pose | ๐Ÿ”ฌ This HF bundle ships no keypoint head โ€” but real pose weights exist elsewhere; see the tier table below | + +### Model weights: what's real, what's not + +"WiFi โ†’ pose" means three different things in this repo, at three different maturity +levels. Read the label, not the headline ([ADR-187](adr/ADR-187-archive-v1-deprecation-honest-labeling.md)): + +| Tier | Checkpoint(s) | Honest status | +|------|---------------|---------------| +| **Real & validated** | [`ruvnet/wifi-densepose-pretrained`](https://huggingface.co/ruvnet/wifi-densepose-pretrained) (encoder + presence head) ยท [`ruvnet/wifi-densepose-mmfi-pose`](https://huggingface.co/ruvnet/wifi-densepose-mmfi-pose) (17-keypoint pose) ยท `cog-person-count/count_v1` | **MEASURED / published.** Presence = 82.3% held-out temporal-triplet accuracy (the old "100% presence" figure was retracted); MM-Fi pose = 82.69% torso-PCK@20 on the `random_split` protocol. | +| **Real but weak (honestly labeled)** | committed `v2/crates/cog-pose-estimation/cog/artifacts/pose_v1.safetensors` | First-cut on-device model. **PCK@20 = 3.0% / PCK@50 = 18.5%** on a 217-sample holdout โ€” **below the ADR-079 target of โ‰ฅ 35%.** Learns coarse structure (`r_hip` 77% PCK@50); distal/face joints near-random. Its runtime path in `cog-pose-estimation/src/inference.rs` is still a centred-skeleton **stub returning `confidence=0`**. Full disclosure in the [cog README](../v2/crates/cog-pose-estimation/cog/README.md). Do not advertise the live single-ESP32 17-keypoint feature without this caveat. | +| **Architecture only, no weights** | `archive/v1` `DensePoseHead` | Random `kaiming_normal_` init, **no checkpoint of any kind** (zero `.pth`/`.onnx`/`.safetensors` files under `archive/v1/`). Deprecated and superseded โ€” see [`archive/v1/DEPRECATED.md`](../archive/v1/DEPRECATED.md). Do not expect real pose output from it. | + +**Does it actually run, and can a single ESP32 do pose? ([#509](https://github.com/ruvnet/RuView/issues/509), [#1125](https://github.com/ruvnet/RuView/issues/1125))** Yes, it runs, and the results are reproducible: the deterministic signal-pipeline proof (`python archive/v1/data/proof/verify.py`, must print `VERDICT: PASS`), the committed pose training dump (`v2/crates/cog-pose-estimation/cog/artifacts/train_results.json`), and the auditable MM-Fi arena all back specific numbers. But a single-antenna, 56-subcarrier CSI stream at a 20-frame window does *not* carry the fine-grained spatial information the multi-antenna NIC research relies on โ€” so the shippable pose accuracy the project stands behind today is the **MM-Fi benchmark number**, not a live single-ESP32 number. The path to a first reproducible on-device baseline (PCK@20 โ‰ฅ 35%) is tracked in [ADR-079](adr/ADR-079-camera-ground-truth-training.md) / [#645](https://github.com/ruvnet/RuView/issues/645). ### Download