RuView icon indicating copy to clipboard operation
RuView copied to clipboard

Is there a ready-model that can be used just for a demo case?

Open JackLeeHal opened this issue 8 months ago • 9 comments

I have completed the process from ESP32 data collection to service launch, but I do not have a usable model now.

JackLeeHal avatar Mar 10 '26 12:03 JackLeeHal

Detailed Instructions for Demo Mode

Great progress on getting ESP32 data collection working! Here's how to see the system in action:


Option 1: WiFi Sensing Features (Works Now, No Model Needed)

The sensing pipeline works without any neural network model. It uses signal processing to detect:

  • ✅ Presence detection - Is someone in the room?
  • ✅ Motion level - How much movement?
  • ✅ Breathing rate - BPM estimation from micro-movements
  • ✅ Signal quality - CSI coherence metrics

How to Use

  1. Start the sensing server with your ESP32:

    sensing-server --source esp32 --udp-port 5005 --http-port 3000 --ws-port 3001 --ui-path ./ui
    
  2. Open the UI: http://localhost:3000/ui/index.html

  3. View real-time sensing data:

    • The signal field visualization shows CSI amplitude patterns
    • Presence/motion indicators update in real-time
    • Breathing rate appears when subject is stationary
  4. API endpoint for sensing data:

    curl http://localhost:3000/api/v1/sensing/latest
    

    Returns:

    {
      "presence_detected": true,
      "motion_level": 0.42,
      "breathing_rate": 16.2,
      "signal_quality": 0.85,
      "timestamp": "2026-03-10T12:00:00Z"
    }
    

Option 2: Mock Skeleton Demo (Simulated Pose Data)

To see the skeleton visualization without trained weights, enable mock mode:

Using Docker:

docker run -p 3000:3000 -p 3001:3001 \
  -e MOCK_POSE_DATA=true \
  -e CSI_SOURCE=simulated \
  ruvnet/wifi-densepose:latest

Using Python server:

cd v1
MOCK_POSE_DATA=true python -m src.api.server

This renders a simulated 17-keypoint skeleton that moves realistically. It demonstrates:

  • How the UI displays pose data
  • The skeleton overlay visualization
  • Multi-person tracking (when enabled)

Note: The skeleton movements are synthetic, not derived from your WiFi signals.


Option 3: Hybrid Demo (Real Sensing + Mock Skeleton)

Combine real ESP32 sensing with mock skeleton overlay:

docker run -p 3000:3000 -p 3001:3001 -p 5005:5005/udp \
  -e CSI_SOURCE=esp32 \
  -e MOCK_POSE_DATA=true \
  ruvnet/wifi-densepose:latest

This shows:

  • Real presence/motion/breathing from your ESP32 CSI data
  • Simulated skeleton that responds to detected motion level

What's Missing for Real Pose Estimation

Full WiFi → Skeleton inference requires:

Component Status Notes
CSI Frame Parser ✅ Done ADR-018 format, 64 subcarriers
Signal Processing ✅ Done Phase unwrapping, amplitude filtering
Sensing Features ✅ Done Presence, motion, breathing
DensePose Model Architecture ✅ Done DensePoseHead in PyTorch
Trained Model Weights ❌ Missing Requires paired CSI+pose dataset

Why No Pre-Trained Weights?

  1. No public paired dataset exists matching our ADR-018 CSI format
  2. Domain specificity - WiFi CSI is highly environment-dependent
  3. Training requires hardware - Synchronized ESP32 mesh + camera ground truth

Training Your Own Model

If you have access to a motion capture system or pose estimation camera:

  1. Collect paired data:

    # Record CSI frames while running pose estimation camera
    python scripts/record_paired_data.py \
      --csi-port 5005 \
      --camera 0 \
      --output data/paired/session1/
    
  2. Format as training dataset:

    python scripts/prepare_dataset.py \
      --input data/paired/ \
      --output data/mmfi_format/
    
  3. Train the model:

    cd v1
    python -m src.training.train_pose \
      --dataset ../data/mmfi_format/ \
      --epochs 100 \
      --output models/my_trained_model.pt
    
  4. Use trained weights:

    POSE_MODEL_PATH=models/my_trained_model.pt python -m src.api.server
    

Quick Demo Checklist

Goal Command
See real WiFi sensing sensing-server --source esp32 --ui-path ./ui
See mock skeleton UI docker run -e MOCK_POSE_DATA=true ruvnet/wifi-densepose:latest
Test API endpoints curl http://localhost:3000/api/v1/health
View WebSocket stream Connect to ws://localhost:3001/ws/sensing

Let me know if you need help with any specific step!

ruvnet avatar Mar 10 '26 12:03 ruvnet

So without a customized model, even if I have the data, the rendered interface would just be some meaningless, chaotic, and disordered images?

JackLeeHal avatar Mar 10 '26 13:03 JackLeeHal

Pretty much yes

dlopez-create avatar Mar 10 '26 13:03 dlopez-create

Without a model it's just noise.

ruvnet avatar Mar 10 '26 13:03 ruvnet

Has anyone reproduced the whole process? Including the model train.

JackLeeHal avatar Mar 11 '26 00:03 JackLeeHal

@ruvnet can you please go into more detail about "Training Your Own Model". With some widely available "motion capture system or pose estimation camera" like an iPhone with ARBodyTrackingConfiguration it seems not too far away to try this at home.

For me it seems that you can break it down to the following steps:

  1. write an iPhone app that can export the mmfi data format
  2. have a setup for collecting csi data in parallel
  3. sync both datasets and train the model

sebbu avatar Mar 15 '26 07:03 sebbu

Short answer: There is no pre-trained DensePose model included in the release yet.

The ESP32 firmware (v0.4.3.1) performs on-device signal processing — presence detection, breathing rate, heart rate, and fall detection — without any model. This works out of the box.

The DensePose visualization (body outline rendering) requires a trained model that maps CSI features to UV coordinates. Training requires:

  1. CSI recordings from your specific environment
  2. The training pipeline (wifi-densepose-train crate)
  3. Reference ground-truth data

The system is designed to learn from each deployment environment, so a universal pre-trained model wouldn't generalize well across different room layouts and AP placements.

See #189 for discussion on model weights. The user guide has training instructions under 'Training a Model'.

ruvnet avatar Mar 15 '26 16:03 ruvnet

The system works for presence/vitals/motion detection without a trained model. For demo: flash ESP32, start sensing server, open UI. See #320 for details.

ruvnet avatar Mar 30 '26 16:03 ruvnet

I cannot find these files in the repo nor anywhere on the internet:

  • scripts/record_paired_data.py
  • scripts/prepare_dataset.py

@ruvnet please if you give cli instructions don't leave out such important detail.

EDIT: I've realized this is just outdated so I opened a new issue on this topic: https://github.com/ruvnet/RuView/issues/1322

jl2035 avatar Jul 10 '26 04:07 jl2035