CoolFace
Datasetpublic

bayang/shape

Shape Geometry Dataset Synthetic graph-based centerline representations of 3D geometric motifs (pipe-like structures). JSON Schema 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 category string Shape class label (e.g. straight, arc_90, corner)… See the full description on the dataset page: https://huggingface.co/datasets/bayang/shape.

sourceHugging Facemitupdated 8mo agoView on Hugging Face
2likes207downloads
Dataset Card

Shape Geometry Dataset

Synthetic graph-based centerline representations of 3D geometric motifs (pipe-like structures).

JSON Schema

dataset.json is an array of shape records. Each record:

json
{
  "category": "arc_90",
  "nodes": [[x, y, z], ...],
  "edges": [[i, j], ...],
  "features": {
    "curvature": [0.0, 0.1, ...],
    "segment_angle": [0.0, 160.5, ...]
  }
}
FieldTypeDescription
categorystringShape class label (e.g. straight, arc_90, corner)
nodesfloat[][] (N×3)3D points with ~1-unit spacing between neighbors
edgesint[][] (E×2)Index pairs connecting nodes
features.curvaturefloat[] (N)Menger curvature per node (0 at endpoints/hubs)
features.segment_anglefloat[] (N)Angle in degrees between edges at each node

Categories

CategoryWhat it isSamples
straightRandom-length line segment (5–20 units)[image]
arc_1010° gentle arc, R=10[image]
arc_2020° arc[image]
arc_3030° arc[image]
arc_4040° arc[image]
arc_5050° arc[image]
arc_6060° arc[image]
arc_7070° arc[image]
arc_8080° arc[image]
arc_9090° quarter-circle bend[image]
arc_100100° arc[image]
arc_110110° arc[image]
arc_120120° wide arc[image]
arc_130130° arc[image]
arc_140140° arc[image]
arc_150150° near-semicircle[image]
arc_160160° arc[image]
arc_170170° near-full semicircle[image]
cornerTwo straight arms at a sharp 90° angle[image]
junction_TThrough-pipe with perpendicular branch (T-shape)[image]
junction_YTrunk splitting into two splayed arms (Y-shape)[image]

Why this structure?

  • Nodes + edges = graph — directly loadable into GNN frameworks (PyTorch Geometric, DGL).
  • Unit spacing — standardises graph density across shapes; a 15-unit straight and a 90° arc at R=10 both have proportional node counts.
  • Random rigid pose — every sample gets a random 3D rotation + translation so the model can't memorise orientation.
  • Per-node features — curvature and segment angle give the network local geometric cues beyond raw xyz, helping distinguish arcs from straights even when node counts overlap.
  • Junctions share a hub node — T and Y shapes have one node connected to 3 edges, matching real pipe topology and giving the GNN a clear topological signal.

Regenerate

bash
python generate_geometry_dataset.py

Generates 10000 samples per category (17 arc classes + straight + corner + junctionT + junctionY = 21 categories, 21k samples total).