Synthetic graph-based centerline representations of 3D geometric motifs (pipe-like structures).
🚀 Backend API & Gemini 3 integration: see
deploy/README.mdfor the full server documentation, endpoints, and how we use Gemini 3 Flash.📐 Architecture deep-dive: see
deploy/ARCHITECTURE.mdfor system diagrams, data flows, and the Gemini function-calling pipeline.
Available at https://github.com/tihiera/shape-frontend Datasets is available at https://huggingface.co/datasets/bayang/shape
Pre-built Gmsh .msh pipe network samples are available in deploy/samples/ for testing and demonstration:
| File | Description | Size |
|---|---|---|
simple_bend.msh |
Single 90° pipe bend | 258 KB |
u_bend.msh |
U-shaped 180° return bend | 343 KB |
s_curve.msh |
S-shaped double bend | 359 KB |
t_junction.msh |
T-junction (3-way split) | 401 KB |
complex_network.msh |
Multi-branch pipe network with junctions, bends, and straights | 1.4 MB |
These can be uploaded directly through the API or frontend to test the full segmentation pipeline.
dataset.json is an array of shape records. Each record:
{
"category": "arc_90",
"nodes": [[x, y, z], ...],
"edges": [[i, j], ...],
"features": {
"curvature": [0.0, 0.1, ...],
"segment_angle": [0.0, 160.5, ...]
}
}| Field | Type | Description |
|---|---|---|
| git fi | category |
string |
nodes |
float[][] (N x 3) | 3D points with ~1-unit spacing between neighbors |
edges |
int[][] (E x 2) | Index pairs connecting nodes |
features.curvature |
float[] (N) | Menger curvature per node (0 at endpoints/hubs) |
features.segment_angle |
float[] (N) | Angle in degrees between edges at each node |
After preprocessing, categories are mapped to 4 motif types:
| motif_type | categories |
|---|---|
arc |
arc_10 .. arc_170 |
straight |
straight |
corner |
corner |
junction |
junction (merged from junction_T + junction_Y) |
- Nodes + edges = graph -- directly loadable into GNN frameworks (PyTorch Geometric, DGL).
- Unit spacing -- standardises graph density across shapes.
- Random rigid pose -- every sample gets a random 3D rotation + translation so the model can't memorise orientation.
- Per-node features -- curvature and degree give the network local geometric + topological cues.
- Junctions share a hub node -- one node connected to 3 edges, matching real pipe topology.
python generate_geometry_dataset.pyGenerates 10000 samples per category (17 arc classes + straight + corner + junction_T + junction_Y = 21 raw categories, merged to 20 for training).



















