Upload README.md with huggingface_hub
Browse files
README.md
CHANGED
|
@@ -1,52 +1,83 @@
|
|
| 1 |
# S23DR 2026 β WireframeDETR
|
| 2 |
|
| 3 |
-
|
| 4 |
|
| 5 |
-
|
| 6 |
-
|
| 7 |
-
Classical 3D structured reconstruction methods ([PolyFit](https://doi.org/10.1109/ICCV.2017.258), [City3D](https://doi.org/10.3390/rs14092254)) detect planar primitives via RANSAC then intersect them to find edges/vertices β multi-stage pipelines with handcrafted priors. 2D wireframe parsing ([WireframeParser](https://arxiv.org/abs/1905.03246), [L-CNN](https://arxiv.org/abs/1905.03246), [HAWP](https://arxiv.org/abs/2005.03246)) works on images, not 3D. [RoomFormer](https://arxiv.org/abs/2301.09051) is the closest precedent: DETR-style transformer predicting room polygons from 3D scan density maps. We extend this to outdoor building wireframes on raw sparse semantic point clouds, replacing density projection with direct point encoding.
|
| 8 |
|
| 9 |
## Approach
|
| 10 |
|
| 11 |
-
|
|
|
|
|
|
|
| 12 |
|
| 13 |
**Our contributions:**
|
| 14 |
-
- Contrastive Denoising Training (CDN) adapted from [DN-DETR](https://arxiv.org/abs/2203.01305) to stabilise Hungarian matching
|
| 15 |
-
- Multi-scale encoder
|
| 16 |
-
-
|
| 17 |
-
-
|
|
|
|
| 18 |
|
| 19 |
-
**
|
| 20 |
-
- Gestalt-weighted point sampling (vertex classes 100x, edge classes 10x)
|
| 21 |
-
- 183-d semantic feature encoding (Gestalt one-hot + ADE20K one-hot + RGB)
|
| 22 |
-
- Post-processing pipeline (confidence filtering, intersection-based vertex merging)
|
| 23 |
|
| 24 |
-
|
|
|
|
|
|
|
| 25 |
|
| 26 |
## Results
|
| 27 |
|
| 28 |
-
| Approach |
|
| 29 |
-
|---|---|
|
| 30 |
-
| Perceiver baseline | 0.350 |
|
| 31 |
-
|
|
| 32 |
-
|
|
|
|
|
| 33 |
|
| 34 |
-
##
|
| 35 |
|
| 36 |
-
|
|
|
|
|
|
|
|
|
|
| 37 |
|
| 38 |
-
|
| 39 |
-
|
| 40 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 41 |
|
| 42 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 43 |
modal run pipeline.py --step train --name my-run
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 44 |
```
|
| 45 |
|
| 46 |
## Credits
|
| 47 |
|
| 48 |
-
- [jastermark/S23DR2026](https://huggingface.co/jastermark/S23DR2026) β
|
| 49 |
-
- [DN-DETR](https://arxiv.org/abs/2203.01305) β contrastive denoising training
|
| 50 |
-
- [DINO-DETR](https://arxiv.org/abs/2203.03605) β progressive auxiliary loss weighting
|
| 51 |
- [S23DR 2026 organisers](https://huggingface.co/spaces/usm3d/S23DR2026) β challenge and baseline
|
| 52 |
- [Modal Labs](https://modal.com) β GPU compute
|
|
|
|
| 1 |
# S23DR 2026 β WireframeDETR
|
| 2 |
|
| 3 |
+
Submission to the [S23DR 2026 Challenge](https://huggingface.co/spaces/usm3d/S23DR2026).
|
| 4 |
|
| 5 |
+
**Public test HSS: 0.575** (F1=0.664, IoU=0.516)
|
|
|
|
|
|
|
| 6 |
|
| 7 |
## Approach
|
| 8 |
|
| 9 |
+
End-to-end 3D wireframe prediction via DETR-style set prediction over COLMAP point clouds.
|
| 10 |
+
Each predicted edge is a 6D coordinate pair `(x1,y1,z1,x2,y2,z2)` regressed by a learned query.
|
| 11 |
+
Hungarian matching assigns predictions to ground-truth edges at training time.
|
| 12 |
|
| 13 |
**Our contributions:**
|
| 14 |
+
- **Contrastive Denoising Training (CDN)** β adapted from [DN-DETR](https://arxiv.org/abs/2203.01305); injects GT-aligned denoising queries alongside learned queries to stabilise Hungarian matching in early epochs
|
| 15 |
+
- **Multi-scale encoder** β learned softmax-weighted average of last K=3 encoder layer outputs, giving the decoder access to both fine-grained and abstract representations
|
| 16 |
+
- **Gestalt-guided point sampling** β vertex-class points (apex, eave end, flashing end) sampled at 100Γ, edge-class points at 10Γ, background at 1Γ; concentrates samples on structural features without encoding semantics as model features
|
| 17 |
+
- **Progressive auxiliary loss weighting** β decoder layer i weighted at 0.5 + 0.5Β·(i+1)/N
|
| 18 |
+
- **Test-time augmentation** β four Y-axis rotations (0Β°/90Β°/180Β°/270Β°), predictions merged via vertex deduplication
|
| 19 |
|
| 20 |
+
**Model input:** plain 3-channel RGB per point. No semantic feature encoding.
|
|
|
|
|
|
|
|
|
|
| 21 |
|
| 22 |
+
**Adopted from [jastermark/S23DR2026](https://huggingface.co/jastermark/S23DR2026):**
|
| 23 |
+
- COLMAP point projection pipeline (assign Gestalt label per point by majority vote across views)
|
| 24 |
+
- Post-processing (confidence filtering, intersection-based vertex merging, gap filling)
|
| 25 |
|
| 26 |
## Results
|
| 27 |
|
| 28 |
+
| Approach | Split | F1 | IoU | HSS |
|
| 29 |
+
|---|---|---|---|---|
|
| 30 |
+
| Perceiver baseline | cleaned val | β | β | 0.350 |
|
| 31 |
+
| PointNet two-stage (Path B) | public test | 0.497 | 0.409 | 0.442 |
|
| 32 |
+
| WireframeDETR (ours) | cleaned val | 0.603 | 0.471 | 0.534 |
|
| 33 |
+
| WireframeDETR (ours, best) | public test | **0.664** | **0.516** | **0.575** |
|
| 34 |
|
| 35 |
+
## Architecture
|
| 36 |
|
| 37 |
+
- Embedding dim: 384, Queries: 128, Encoder layers: 4, Decoder layers: 5
|
| 38 |
+
- ~22.7M parameters
|
| 39 |
+
- CDN groups: 5, Ξ»_pos=0.4, Ξ»_neg=0.8
|
| 40 |
+
- Training: AdamW lr=1e-4, OneCycle schedule, batch=14, 200 epochs, A100 80GB (~27h)
|
| 41 |
|
| 42 |
+
## Checkpoint
|
| 43 |
+
|
| 44 |
+
`wireframe_detr_cdn_multiscale_384d_128q.pth` β plain RGB, feature_dim=3
|
| 45 |
+
|
| 46 |
+
## Inference
|
| 47 |
+
|
| 48 |
+
```python
|
| 49 |
+
from s23dr_2026.model import get_model, load_checkpoint_compat
|
| 50 |
+
from s23dr_2026.inference import predict_wireframe_v2
|
| 51 |
+
|
| 52 |
+
import torch
|
| 53 |
+
ckpt = torch.load("wireframe_detr_cdn_multiscale_384d_128q.pth", map_location="cpu")
|
| 54 |
+
model = get_model(ckpt)
|
| 55 |
+
load_checkpoint_compat(model, ckpt)
|
| 56 |
+
model.eval().to("cuda")
|
| 57 |
|
| 58 |
+
verts, edges = predict_wireframe_v2(scene, model, "cuda")
|
| 59 |
+
```
|
| 60 |
+
|
| 61 |
+
## Training
|
| 62 |
+
|
| 63 |
+
```bash
|
| 64 |
+
# via Modal
|
| 65 |
modal run pipeline.py --step train --name my-run
|
| 66 |
+
|
| 67 |
+
# local
|
| 68 |
+
python -m s23dr_2026.train \
|
| 69 |
+
--name my-run \
|
| 70 |
+
--ply_dir /path/to/ply_data \
|
| 71 |
+
--embed_dim 384 --num_queries 128 \
|
| 72 |
+
--num_encoder_layers 4 --num_decoder_layers 5 \
|
| 73 |
+
--use_cdn --cdn_groups 5 \
|
| 74 |
+
--scheduler onecycle --num_epochs 200 \
|
| 75 |
+
--batch_size 14 --device cuda
|
| 76 |
```
|
| 77 |
|
| 78 |
## Credits
|
| 79 |
|
| 80 |
+
- [jastermark/S23DR2026](https://huggingface.co/jastermark/S23DR2026) β COLMAP projection pipeline and post-processing
|
| 81 |
+
- [DN-DETR](https://arxiv.org/abs/2203.01305) β contrastive denoising training
|
|
|
|
| 82 |
- [S23DR 2026 organisers](https://huggingface.co/spaces/usm3d/S23DR2026) β challenge and baseline
|
| 83 |
- [Modal Labs](https://modal.com) β GPU compute
|