Skip to main content

SAGE — Superquadric-based Adaptive Geometric Explainability

Explainable, non-neural object vocabulary and grasping via superquadric concept memory. Objects are represented as superquadric primitives — geometric shapes defined by a small number of physically interpretable parameters (size, roundness, taper) — fit directly to real depth-camera point clouds. A growing vocabulary of object categories is learned online from confirmed examples, with no gradient descent and no neural network weights anywhere in the pipeline. Every classification decision is traceable back to real, named physical measurements.

On YCB-Video (5 categories: box, mug, bowl, can, bottle), the current locked model reaches 78.4% top-1 accuracy on a stratified, video-level held-out split. Full ablations and methodology are in the accompanying paper draft.

Install

From PyPI (once published):

pip install sage-superquadric

For local development (editable install, changes take effect immediately):

git clone <repo-url>
cd sage_superquadric_release
pip install -e .

For retraining/evaluation on YCB-Video (optional, adds tqdm):

pip install "sage-superquadric[training]"

Quick start

from sage_superquadric import SAGEModel

model = SAGEModel('trained_ycbv_FINAL.json')

# point_cloud: (N,3) numpy array of real depth points for ONE
# already-segmented object (e.g. from a depth camera + a mask)
result = model.predict(point_cloud, with_grasp=True)

print(result.label)                # e.g. 'mug'
print(result.confidence)           # membership score, argmax-consistent
print(result.top_k)                # [(word, score), ...] ranked alternatives
print(result.fitted_shape)         # the actual fitted superquadric parameters
print(result.grasp_candidates)     # antipodal grasp points, computed directly from geometry

What's in the package

sage_superquadric/
  registry.py          -- the vocabulary: online-learned category prototypes
                           (Welford mean/variance, no gradients)
  superquadric.py       -- core shape fitting (nonlinear least-squares)
  graph.py               -- multi-part object representation (e.g. mug body+handle)
  pipeline.py            -- segmentation + fitting -> graph, end to end
  segmentation.py        -- residual-based multi-part clustering
  iterative_segment.py   -- iterative two-part fit refinement
  compute_grasp.py       -- antipodal grasp candidates directly from fitted shape
  color_features.py      -- hue/saturation extraction (optional signal)
  radius_profile.py      -- 5-point radial profile (captures taper/necks)

  ycbv_training/         -- optional: YCB-Video training + evaluation tooling
                             (not needed for basic SAGEModel usage)

Design principles

  • No neural network components. Every learned "weight" is a real physical measurement (a radius in meters, a hue angle in degrees) — not an opaque embedding dimension.
  • Online vocabulary growth. New categories are learned from a single confirmed example via closed-form statistical updates, not batch retraining.
  • Same representation for recognition and grasping. No separate grasp-prediction network — grasps are computed directly from the fitted geometry.
  • Traceable decisions. Any classification can be decomposed into per-dimension distances from the learned prototype (see sage_superquadric/ycbv_training/find_and_explain_errors.py for the diagnostic tool used throughout development).

Known limitations

  • Single-frame inference is subject to partial-view occlusion bias for round objects (mitigated for training via multi-view aggregation; training requires multiple frames with known relative pose).
  • The bottle category currently spans multiple real sub-products (e.g. mustard bottle, bleach cleanser) under one learned word; see the paper's ablation on vocabulary splitting for why this is a deliberate choice, not an oversight.
  • Confidence scores are not well-calibrated probabilities out of the box (sage_superquadric.ycbv_training.metrics.calibrated_confidence provides a display-only, ranking-preserving correction).

Status

Vocabulary architecture is locked as of the current version. Active development is now focused on physical grasping validation.

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

sage_superquadric-0.1.0.tar.gz (43.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

sage_superquadric-0.1.0-py3-none-any.whl (52.1 kB view details)

Uploaded Python 3

File details

Details for the file sage_superquadric-0.1.0.tar.gz.

File metadata

  • Download URL: sage_superquadric-0.1.0.tar.gz
  • Upload date:
  • Size: 43.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.4

File hashes

Hashes for sage_superquadric-0.1.0.tar.gz
Algorithm Hash digest
SHA256 7cea5b805f6cce6a5d91cb916e3931327b3a31cfee83bf1fc4b1719f1faa04b9
MD5 d1d48287c0f82e0933b01b758784d7ed
BLAKE2b-256 0f17798d7076f55d616d66e171e8a8f255af3dd6674a24ba94478ba3874a0db8

See more details on using hashes here.

File details

Details for the file sage_superquadric-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for sage_superquadric-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 756633f34cc9873a26adeaab01854c147fa44dd12bf892ab35479bbd78b12428
MD5 549da3cde38caad72808ab2a123de28f
BLAKE2b-256 212445eb20fa266c6d48b10ee328577be3d22d2ccea5a6f8b7b70c1330e6fa2e

See more details on using hashes here.

Release history Release notifications | RSS feed

1.0.0

2 files

0.3.1

2 files

0.3.0

2 files

This release

0.1.0 This release

2 files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page