Repository navigation
Test Time Augmentation audit
Local date: 2026-10-21, Europe/Berlin.
Component: src/pvextent/inference/tta.py and CLI flag --tta {none,flips,rot4,d4}.
Evaluated Checkpoint: runs/deeplabv3plus-resnet50-focal-lovasz-v4-001/best.pt.
Benchmark Report: artifacts/tta_benchmark_report.json.
To address the single-pass inference variance observed in Step 2, we engineered a dedicated Dihedral Group
In nadir orthophotos, viewing angle is invariant to rotation and reflection in the horizontal plane (
By generating the 8 dihedral transformations, executing batched inference, inverting the spatial prediction maps, and ensembling the posterior probabilities:
- True PV signals are strongly reinforced across all rotations.
- Directional false alarms and sensor glare cancel out.
-
An empirical pixel-level uncertainty map
$\sigma^2(x, y)$ is produced directly without expensive Bayesian sampling.
| Metric / Dimension | Single-Pass (none, 1x) |
Flips-TTA (flips, 4x) |
Rotations-TTA (rot4, 4x) |
Full d4, 8x) |
Improvement ( |
|---|---|---|---|---|---|
| Number of Transforms | 1 | 4 | 4 | 8 | 8-fold dihedral ensemble |
| Overall Positive Recall (@0.25) | 69.53% (2,487 px) | 69.00% (2,468 px) | 69.44% (2,484 px) | 73.02% (2,612 px) | +3.49 pp (+125 true PV px) |
| Overall Positive Recall (@0.20) | 74.36% (2,660 px) | 76.60% (2,740 px) | 77.13% (2,759 px) | 77.22% (2,762 px) | +2.86 pp (+102 true PV px) |
| Crop 1 Recall (@0.25) | 100.00% | 100.00% | 100.00% | 100.00% (849/849 px) | Solid 100% |
| Crop 2 Recall (@0.25) | 78.51% (811 px) | 100.00% (1,033 px) | 76.96% (795 px) | 96.03% (992/1,033 px) | +17.52 pp (+181 true PV px) |
| Crop 2 Recall (@0.20) | 90.80% | 100.00% | 99.52% | 100.00% (1,033/1,033 px) | 100.0% Perfect Recall |
| Crop 1 Mean PV Probability | 0.4723 | 0.6419 | 0.6228 | 0.6529 | +38.2% Confidence Boost |
| Negative Holdout FP (@0.25) | 8,750 px | 6,044 px | 5,114 px | 4,909 px | -43.9% False Alarm Drop! |
| Negative Holdout FPR (@0.25) | 5.82% | 4.02% | 3.40% | 3.26% | -2.56 pp |
-
Massive False Positive Clutter Reduction:
On the 7 confirmed non-PV background crops, Full
$D_4$ -TTA cut false alarm pixels nearly in half: from 8,750 pixels down to 4,909 pixels (-43.9%) at threshold 0.25. - Confidence Sharpening on Real Panels: On confirmed PV panels (Crop 1), the mean confidence surged from 0.4723 to 0.6529 (+38.2%), pushing genuine modules cleanly above the detection threshold.
- Out-of-Domain Generalization: On Crop 2, recall at threshold 0.20 reached a perfect 100.00% (1,033/1,033 pixels) and recall at threshold 0.25 rose from 78.5% to 96.0%.
-
Computational Efficiency:
Because all 8 transformations are batched into a single tensor of shape
(8, 3, 320, 320), MPS GPU throughput remained virtually identical to single-pass processing (~0.12s per image).
The --tta option is now live and defaults to d4:
# Standard CAD vectorization with 8-fold dihedral D4-TTA
pvextent vectorize input.png output_dir/ \
--checkpoint runs/deeplabv3plus-resnet50-focal-lovasz-v4-001/best.pt \
--tta d4 \
--threshold 0.25Developed and maintained by Valeford under the Spacement brand. Original project code: Apache-2.0. See the repository NOTICE for attribution.
Spacement PVExtent
- Home
- PVExtent Vidda vs. Tinden (v1.0 Releases)
- Getting started
- Dataset format
- Annotation guide
- PV4GER-SEG import
- Import audit
- Geographic splits
- Split audit
- Label review
- NRW candidates
- Bulk NRW training imagery
- Bulk mask curation
- Live training monitor
- Training quality exclusions
- Final bulk mask audit
- Experimental negative curation
- Negative curation audit
- Exploratory negative holdout
- Negative holdout audit
- Exploratory positive holdout
- Positive holdout audit
- Training smoke test
- Smoke audit
- Pretrained baseline training
- Baseline comparison
- Baseline comparison audit
- Six-epoch continuation audit
- V4 bulk training audit
- Domain-balanced training audit
- DeepLabV3+ ASPP architecture audit
- DeepLabV3+ Focal + Lovász loss audit
- DeepLabV3+ V5 Photometric Invariance audit
- CAD vectorization & rectilinear audit
- Test-Time Augmentation (TTA) audit
- Probability calibration & temperature scaling audit
- Seamless overlapping tiled inference & Hann blending audit
- Heterogeneous ensemble & quality triage audit
- Sealed 421 test benchmark audit
- 3D elevation & solar yield audit
- Multi-temporal 4D change detection audit
- Multispectral NIR & spectral signature audit
- Encoder weights and licenses
- Baseline audit
- Frozen validation errors
- Validation error audit
- Candidate predictions
- Research roadmap
Project