File size: 3,177 Bytes
f716beb
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
5391485
 
 
 
 
 
f716beb
 
 
 
 
 
 
 
 
 
5391485
 
 
 
 
 
 
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
71
72
73
74
75
---
license: cc-by-4.0
tags:
  - point-cloud
  - classification
  - mesh-segmentation
  - onnx
  - 3d
  - qtmesheditor
library_name: onnx
pipeline_tag: other
---

# QtMeshEditor — Mesh Category Classifier

A tiny point-cloud **category classifier** (PointNet: per-point MLP +
max-pool + linear head, ~0.1 MB) that decides whether a mesh is a **body**
(character/creature), **vegetation**, **vehicle**, or **building** — exported
to **ONNX** for local inference via ONNX Runtime.

This is the **Auto dispatcher** for QtMeshEditor's category-specialised mesh
part-segmentation family (epic #818, Track B2): the editor samples the mesh
into a point cloud, runs this classifier, then dispatches to the matching
specialist —
[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),
[building](https://huggingface.co/fernandotonon/QtMeshEditor-mesh-segmentation-building).
When this model is unavailable the editor falls back to the body model
(its pre-#818 behaviour). Aggregate download source used by the app:
[QtMeshEditor-models](https://huggingface.co/fernandotonon/QtMeshEditor-models)
(`segment/meshseg_category.onnx`).

## Model

- **Input:** a sampled point cloud `float32 [1, N, 3]` (normalised to a centred
  unit box; +Y up).
- **Output:** logits `float32 [1, 4]` over
  (`body, vegetation, vehicle, building`); argmax → category.

## Training data & license

Trained **from scratch** on the same permissive corpus as the segmentation
family: procedurally generated synthetic bodies / trees / vehicles /
buildings we own (category labels are free — they come from which generator
produced the cloud), plus CC0 rigged characters (Quaternius packs) mined as
extra real `body` samples. Weights released under **CC-BY-4.0**; please
credit *QtMeshEditor*.

## Evaluation

- Held-out validation accuracy: **97.5%** (4-way, on the v1.1 hardened data:
  full-random yaw + detached-part augmentation — a strictly harder task than
  v1.0's 99.1% near-canonical set).
- Robustness probe (20 trials each, synthetic cars): detached wheels
  20/20 (v1.0: 18), detached + 45° yaw 19/20 (v1.0: 5), detached + 90° yaw
  20/20 (v1.0: 3); no regression on any category at random yaw.

## Reproducing

`scripts/export-meshseg-onnx.py --category classifier --real-data <mined/>`
in the QtMeshEditor repo (one-time, offline; the app never runs Python).
Strategy + decision record (why several specialists + a classifier instead
of one multi-category softmax): `docs/MESH_SEGMENTATION_STRATEGY.md`.

## Versions

- **v1.1.0** (current) — yaw-invariance + detached-part robustness: every
  training cloud is spun by a full random yaw (category is a yaw-invariant
  question; v1.0 inherited the segmenters' near-canonical augmentation), and
  minority-part clusters are randomly offset (real exports drop wheels/parts
  as separate nodes — the verified real-world failure: a car with detached
  wheels classified as `body`).
- **v1.0.0** — initial release (#818 Track B2).