--- license: mit --- # geolip scene classifier proto Disposing of the old concept we now have a robust factory to test and utilize for synthetic scene construction. This will be expanded as training continues, and will start at less shapes first to increase model complexity training to more. In this repo has a simple colab testing script that will activate the repo and test the baseline shape structures. Not bad for a day. ``` """ try: !pip uninstall -qy geolip except: pass !pip install "git+https://github.com/AbstractEyes/glip-autoencoder.git" -q """ ``` Looks like claude took some shortcuts, I'll fix them tomorrow. ``` ✓ All imports resolved ====================================================================== FORWARD PASS TESTS — Device: cuda ====================================================================== ── SimplexFactory ── ✓ numpy regular (shape=(5, 10)) ✓ torch regular (dtype=torch.float32) ✓ numpy random (shape=(5, 10)) ✓ torch random (dtype=torch.float32) ✓ numpy uniform (shape=(5, 10)) ✓ torch uniform (dtype=torch.float32) ✓ regular edge uniformity (edge_std=0.00000000) ✓ reproducibility ✓ CUDA build (device=cuda:0) ── CayleyMengerFormula ── ✓ volume > 0 (vol=0.023292) ✓ is_valid ✓ regularity ~1.0 (reg=1.000000) ✓ edge_lengths shape ✓ degenerate detected (vol=-0.00e+00) ✓ batched volume shape ✓ batched edge_lengths ✓ gradient through volume ✓ numpy backend ── CayleyMengerValidator ── ✓ gram_volume_sq shape ✓ validity_loss scalar (val=0.000000) ✓ consistency_loss scalar (val=1728.068359) ✓ regularity_loss scalar (val=0.928428) ✓ combined_loss scalar ✓ validate bool tensor ✓ analyze returns dict ── KSimplexLinear ── ✓ forward init=regular (out=torch.Size([4, 256])) ✓ forward init=random (out=torch.Size([4, 256])) ✓ forward init=uniform (out=torch.Size([4, 256])) ✓ input!=output forward ✓ batched (2,16,64) ✓ gradient flow ✓ per-channel differentiation (diff=1.856000) ✓ simplex template shape (shape=torch.Size([5, 5])) ✓ param ratio < 0.2 (ratio=0.1490) ── CrystalSuperpositionHead ── ✓ scores shape (no gates) ✓ proj shape ✓ scores shape (with gates) ✓ zero-fill fallback ✓ diagnostics has keys ✓ no collapsed crystals (collapsed=0) ✓ edge regularity (edge_std=0.0000) ✓ crystal reproducibility ✓ forward init=regular ✓ forward init=random ✓ forward init=uniform ── RoseLoss ── ✓ loss scalar (loss=5.6436) ✓ info has rose (rose=5.6436) ✓ info has collapse (collapse=0.0000) ✓ info has f1 (f1=0.1091) ✓ CM passthrough ✓ CM=None works ✓ crystal grad from loss ── ShapeFormulas ── ✓ volume: sphere ≈ 4π/3 (vol=4.0610 expected≈4.1888) ✓ volume: convex_hull > 0 (vol=5.6000) ✓ volume: voxel > 0 (vol=7.2721) ✓ volume: monte_carlo > 0 (vol=1.3512) ✓ surface_area: sphere ≈ 4π (area=12.3096 expected≈12.5664) ✓ quality: sphere > 0.7 (q=0.8856) ✓ quality: cube > 0.7 (q=0.9100) ✓ quality: line < 0.7 (q=0.6990) ✓ quality: outliers < 0.5 (q=0.3772) ✓ quality: all keys ✓ quality: batch (2,N,3) ✓ classifier: sphere->sphere (got=sphere) ✓ classifier: cube->cube (got=cube) ✓ classifier: cyl->cylinder (got=cylinder) ✓ validator: sphere valid (score=1.0000) ✓ validator: all check keys ✓ transform: rotation preserves distances ✓ transform: scale fails rotation check ── SimpleShapeFactory ── ✓ factory cube: classifies correctly (got=cube) ✓ factory cube: quality > 0.7 (q=0.9100) ✓ factory sphere: classifies correctly (got=sphere) ✓ factory sphere: quality > 0.7 (q=0.8856) ✓ factory cylinder: classifies correctly (got=cylinder) ✓ factory cylinder: quality > 0.7 (q=0.8964) ✓ factory pyramid: classifies correctly (got=pyramid) ✓ factory pyramid: quality > 0.7 (q=0.8278) ✓ factory cone: classifies correctly (got=cone) ✓ factory cone: quality > 0.7 (q=0.7873) ✓ sphere embed_dim=5 ✓ 5d sphere: unit norms (mean=1.0000) ✓ cylinder 5d: dims 3-4 zero ✓ shape reproducibility ✓ scale=3.0 range (max=2.99) ✓ metrics: volume key ✓ metrics: quality key ✓ metrics: classification key ✓ CUDA shape build ── ShapeDeformer ── ✓ deform stretch: changes points (mean_diff=0.028808) ✓ deform stretch: preserves shape ✓ deform twist: changes points (mean_diff=0.134114) ✓ deform twist: preserves shape ✓ deform taper: changes points (mean_diff=0.038202) ✓ deform taper: preserves shape ✓ deform noise: changes points (mean_diff=0.023275) ✓ deform noise: preserves shape ✓ deform shear: changes points (mean_diff=0.026289) ✓ deform shear: preserves shape ✓ deform bend: changes points (mean_diff=0.040808) ✓ deform bend: preserves shape ✓ random deform: has meta (type=stretch) ✓ deform invariance: 26/30 correct (acc=86.67%) ✓ deform stretch mag=0.8: finite ✓ deform twist mag=0.8: finite ✓ deform taper mag=0.8: finite ✓ deform noise mag=0.8: finite ✓ deform shear mag=0.8: finite ✓ deform bend mag=0.8: finite ✓ deform 5D twist ── SO(5) Rotation ── ✓ SO(5) det=1 (det=1.000000) ✓ SO(5) orthogonal (err=1.19e-07) ✓ SO(5) torch det=1 (det=1.000000) ✓ SO(5) torch orthogonal (err=2.38e-07) ✓ SO(5) preserves norms ── SceneBuilder ── ✓ scene: points shape ✓ scene: labels shape ✓ scene: point_labels shape ✓ scene: overlap shape ✓ scene: n_shapes in range (n=2) ✓ scene: meta count ✓ scene: all finite ✓ scene: points in [-1,1] (max=0.8141) ✓ scene: labels match meta (meta={2, 4} labels={2, 4}) ✓ scene: no orphan point labels (orphans=0) ✓ scene: cylinder has labeled points (n=263) ✓ scene: cone has labeled points (n=249) ✓ scene: overlap >= membership (violations=0) ✓ scene: meta keys ✓ scene: rotation is 5x5 ✓ scene: rotation is SO(5) (det=1.000000) ✓ scene: reproducibility ✓ scene: different seeds differ ✓ scene: different label combos possible ✓ batch: points shape ✓ batch: labels shape ✓ batch: point_labels shape ✓ batch: overlap shape ✓ batch: label diversity (unique_combos=7/8) ✓ batch: all finite ✓ batch: all in [-1,1] ✓ scene torch: type ✓ scene torch: shape ✓ batch torch: points ✓ stream: count ✓ 1-shape: n_shapes ✓ 1-shape: exactly 1 label ✓ 5-shape: n_shapes ✓ 5-shape: labels match unique types (labels=3 unique=3) ✓ scene validate() ✓ scene CUDA ── End-to-End Pipeline ── ✓ factory->formula valid ✓ gradient -> KSimplexLinear ✓ gradient -> crystals ✓ e2e < 5s (elapsed=0.01s) ====================================================================== Results: 155 passed, 0 failed out of 155 tests All forward passes operational. ====================================================================== ```