File size: 2,749 Bytes
00d0881
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
---
license: cc-by-4.0
tags:
  - mesh-segmentation
  - part-segmentation
  - point-cloud
  - building
  - architecture
  - onnx
  - 3d
  - qtmesheditor
library_name: onnx
pipeline_tag: other
---

# QtMeshEditor — Building Part Segmentation

A point-cloud part-segmentation network (PointNet++-style) that labels each
point of a **building** mesh as `wall`, `roof`, `window`, `door`, `chimney`,
or `foundation`, exported to **ONNX** for local inference via ONNX Runtime.

One of the category-specialised segmentation models built for
**[QtMeshEditor](https://github.com/fernandotonon/QtMeshEditor)** (epic #818,
Track B2) — a free, open-source 3D mesh & animation editor. The app
auto-detects the mesh category with a companion
[point-cloud classifier](https://huggingface.co/fernandotonon/QtMeshEditor-mesh-segmentation-category)
and dispatches to this model for buildings; siblings:
[body](https://huggingface.co/fernandotonon/QtMeshEditor-mesh-segmentation),
[vegetation](https://huggingface.co/fernandotonon/QtMeshEditor-mesh-segmentation-vegetation),
[vehicle](https://huggingface.co/fernandotonon/QtMeshEditor-mesh-segmentation-vehicle).
Aggregate download source used by the app:
[QtMeshEditor-models](https://huggingface.co/fernandotonon/QtMeshEditor-models)
(`segment/meshseg_building.onnx`).

## Model

- **Input:** a sampled point cloud `float32 [1, N, 3]` (normalised to a centred
  unit box; +Y up).
- **Output:** per-point class logits over 7 channels
  (`unknown, wall, roof, window, door, chimney, foundation`); argmax → label,
  scattered back to mesh vertices/faces by nearest sampled point.
- **Architecture:** shared per-point MLP + two kNN local-aggregation blocks
  (in-graph `cdist`+`topk`, ONNX-exportable) + a global max-pooled feature;
  ~0.78 MB. Trained at the app's inference sample size (4096 points).

## Training data & license

Trained **from scratch, 100% on procedurally generated synthetic buildings we
own** (no third-party data at all): parametric houses / towers / huts with
gable, pyramid, and flat roofs (triangle/quad surface patches), proud window
panes in rows, doors, chimneys, and foundation slabs — labels are exact by
construction. Weights released under **CC-BY-4.0**; please credit
*QtMeshEditor*.

## Evaluation

- Held-out synthetic validation accuracy: **86.9%** (per-point, unknown
  masked). Real-world CC0 building kits are the planned next data slice
  (mined via submesh/material-name labels).

## Reproducing

`scripts/export-meshseg-onnx.py --category building` in the QtMeshEditor repo
(one-time, offline; the app never runs Python). Strategy + roadmap:
`docs/MESH_SEGMENTATION_STRATEGY.md`.

## Versions

- **v1.0.0** (current) — initial synthetic-only release (#818 Track B2).