Motion Detection Performance

September 18, 2026 ยท View on GitHub

Last update: 2026-09-18 Source: data/dataset_info.json Evaluation view: HT20/HT-LTF Dataset revision: sha256:0c93c7c0f21ed7dab74209f8e7414069aa58c9472eadd93b74c33dc0a048127c Input revision: sha256:f4d95ae22924d090e4d488dc917304c74e927ffc4685b2c1f6ee81acb809fb10 Generated by: tools/generate_performance_report.py Run started: 2026-09-18T02:55:11+02:00 Run duration: 16.50s Inputs: 13 real paired datasets, 0 synthetic paired datasets, 5 long quiet datasets

This report shows how ESPectre's motion detectors perform on recorded data.

tools/generate_performance_report.py also verifies that the host-side C++ and Python implementations produce matching results when they replay the same recordings.

  • Lightweight Detection: Uses feature-fusion coefficients fitted offline on training recordings and calibrates its threshold for each recording without refitting those coefficients.
  • High-Accuracy Detection: Uses the ML neural implementation trained on recordings marked as motion or no motion. Published replay results use only recordings outside its training corpus.

See ALGORITHMS.md for the full detector design.


Current Host Resource Benchmark

The generator compiles the current production C++ sources once per source revision and executes the benchmark on every report run. Timings and CPU estimates therefore describe the report host, not an ESP device. Persistent memory is the detector object's sizeof plus live heap allocations after construction; allocator metadata is not included.

Nominal load: 100 packets/s and 4 inferences/s; window 100 packets.

Detection profilePersistent memoryPacket median / p90Inference median / p90Modeled detector CPUTransient heap
Lightweight1,792 B0.16 / 0.22 us1.37 / 1.48 us21.02 us/s0 B
High Accuracy5,068 B0.62 / 0.73 us3.55 / 3.65 us76.05 us/s0 B

Required Performance

MetricTarget
Recall>95%
FP Rate<5%

Recall is the percentage of motion correctly detected. FP Rate is the percentage of no-motion readings incorrectly reported as motion.


Tests Included

  • C++ test_motion_detection
  • C++ test_long_recordings
  • Python TestPerformanceMetrics
  • Python test_validation_long_recordings.py

Normal Wi-Fi Signal

Effective Alarms counts how many times the detector incorrectly switches to MOTION when no motion is present. It uses the same filtering as the firmware.

These recordings contain periods without motion followed by periods with motion, captured with a normal Wi-Fi signal. Both detectors are reported only on the combined selection + holdout corpus.

Lightweight Detection

MetricESP32-C3ESP32-C5ESP32-C6ESP32ESP32-S3
Recall99.7%100.0%100.0%N/A100.0%
Min Recall99.4%100.0%100.0%N/A100.0%
Precision99.4%94.6%98.9%N/A98.1%
FP Rate0.3%2.9%0.6%N/A1.0%
Max FP Rate0.4%2.9%0.6%N/A1.0%
F1-Score99.6%97.2%99.4%N/A99.0%
Effective Alarms041N/A1

High-Accuracy Detection

MetricESP32-C3ESP32-C5ESP32-C6ESP32ESP32-S3
Recall100.0%100.0%100.0%N/A100.0%
Min Recall100.0%100.0%100.0%N/A100.0%
Precision100.0%99.7%100.0%N/A100.0%
FP Rate0.0%0.1%0.0%N/A0.0%
Max FP Rate0.0%0.1%0.0%N/A0.0%
F1-Score100.0%99.9%100.0%N/A100.0%
Effective Alarms000N/A0

Reserved Augmentation Diagnostic

Lightweight and High Accuracy are evaluated on the same reserved selection + holdout pairs after deterministic base+drift+burst-loss packet augmentation. As in production ML training, the fixed views 20260807, 20260808 contribute alternating row positions. These combined reserved results are diagnostic, not an uncontaminated promotion gate.

Detection profileCorpusRecallFP RateF1
LightweightReserved, mixed two-seed augmentation (13 pairs)98.8%0.8%98.6%
High AccuracyReserved, mixed two-seed augmentation (13 pairs)99.4%0.1%99.5%

Weak Wi-Fi Signal

These reserved selection + holdout recordings show detector behavior when the Wi-Fi signal is weak. The High Accuracy requirements for this test are recall >90% and FP <10%; Lightweight results are included for information only.

Lightweight Detection

MetricESP32-C3ESP32-C5ESP32-C6ESP32ESP32-S3
Recall99.3%97.2%99.7%N/A99.3%
Min Recall98.5%94.4%99.7%N/A98.9%
Precision99.4%95.1%98.9%N/A97.4%
FP Rate0.3%2.5%0.6%N/A1.3%
Max FP Rate0.3%4.9%0.6%N/A2.1%
F1-Score99.3%96.1%99.3%N/A98.4%
Effective Alarms051N/A3

High-Accuracy Detection

MetricESP32-C3ESP32-C5ESP32-C6ESP32ESP32-S3
Recall99.0%98.6%99.7%N/A98.7%
Min Recall98.3%98.0%99.7%N/A96.3%
Precision100.0%100.0%100.0%N/A99.6%
FP Rate0.0%0.0%0.0%N/A0.2%
Max FP Rate0.0%0.0%0.0%N/A0.6%
F1-Score99.5%99.3%99.9%N/A99.1%
Effective Alarms000N/A0

Long Quiet Reserved Recordings

These selection + holdout recordings contain no motion. They show how often each detector reports motion during quiet periods.

Lightweight Detection

MetricC3C5C6ESP32S3
Avg FP Rate0.13%N/A3.65%N/A1.05%
Max FP Rate0.13%N/A4.93%N/A1.97%
Effective Alarms0N/A11N/A4

High-Accuracy Detection

MetricC3C5C6ESP32S3
Avg FP Rate0.00%N/A0.13%N/A0.02%
Max FP Rate0.00%N/A0.13%N/A0.04%
Effective Alarms0N/A0N/A0