Downloads · 30 days
4
11% of all-time downloads
tbhugging/gummybear_hierarchical_fusion
gummybear_hierarchical_fusion is a image feature extraction model from tbhugging. Use it for the image feature extraction task on the model card, and read the license before you ship it in a product. It is set up for pytorch. The card lists the license as apache-2.0.
Given 6 illumination settings × 36 camera-orbit views of 128×128 projections from the GummyBear Tomography dataset, the model predicts
Downloads · 30 days
4
11% of all-time downloads
All-time downloads
35
Public
Repo size
3 MB
Likes
0
Public
Click a slice to open those files.
.bin3 MB · 100%
From the Hugging Face model README
tbhugging/gummybear_hierarchical_fusionGiven 6 illumination settings × 36 camera-orbit views of 128×128 projections from the GummyBear Tomography dataset, the model predicts
coordinates of the embedded particle.
Per-view GAP (pooled) CNN trunk → light sin/cos tokens fused within each camera →
camera sin/cos tokens fused across the orbit (hierarchical_pooled_light_then_camera_fusion).
Final Report M10 Step 3 / 10_2 — pooled hierarchical head (model_pooled).
model_pooled / m10_2_hierarchical_pooled_light_then_camera_fusion)10_2 (pooled GAP hierarchical; excludes Fourier 10_2)pooled_gap (pooled trunk)anomaly_refper_image_zscore0°, 60°, 120°, 180°, 240°, 300° (6 lights)36 views on 10° stride (0°–350°) (36 views)light_majorsin_light, cos_light, sin_camera, cos_camera128, depth 1, camera latent 128particle_x, particle_y, particle_zHierarchicalLightThenCameraFusionLocalizer.for_10_2_pooled()m10_2_hierarchical_pooled_light_then_camera_fusion7480380.0003Structured scores for the Hub widget are declared in the YAML model-index / metrics metadata (Model Cards — Evaluation Results).
m8_1)validation, testanomaly_ref, per_image_zscore, GAP pooled trunk only, hierarchical light-then-camera fusion; excludes Fourier 10_2)model_pooled only)Reported error is Euclidean RMSE over particle (x,y,z):
d_i = ||pred_i - y_i||_2, then RMSE_total = sqrt(mean_i d_i^2).
Hub metric id: rmse (display name RMSE_total (Euclidean xyz)).
Scores match the Final Report M10 Step 3 10_2 pooled GAP hierarchical bar.
| Split | Metric | Value |
|---|---|---|
validation | RMSE_total (Euclidean xyz) | 0.462427 |
test | RMSE_total (Euclidean xyz) | 0.422606 |
Source: Final Report M10 Step 3 / 10_2.
import torch
# libraries from https://github.com/tbgitoo/gummybear-tomography
# Historical class name — use .for_10_2_pooled() for this GAP checkpoint only.
from tomography_ml.localization.localize_multiview import (
HierarchicalLightThenCameraFusionLocalizer,
)
n_lights = 6
n_cameras = 36
light_angles_deg = [0.0, 60.0, 120.0, 180.0, 240.0, 300.0]
camera_angles_deg = [0.0, 10.0, 20.0, 30.0, 40.0, 50.0, 60.0, 70.0, 80.0, 90.0, 100.0, 110.0, 120.0, 130.0, 140.0, 150.0, 160.0, 170.0, 180.0, 190.0, 200.0, 210.0, 220.0, 230.0, 240.0, 250.0, 260.0, 270.0, 280.0, 290.0, 300.0, 310.0, 320.0, 330.0, 340.0, 350.0]
model = HierarchicalLightThenCameraFusionLocalizer.for_10_2_pooled(
n_cameras=n_cameras,
n_lights=n_lights,
camera_angles_deg=camera_angles_deg,
light_angles_deg=light_angles_deg,
flat_layout='light_major',
)
views = torch.zeros(1, n_lights, n_cameras, 1, 128, 128)
model(views) # materialise lazy layers
state = torch.load('pytorch_model.bin', map_location='cpu', weights_only=True)
model.load_state_dict(state)
model.eval()
xyz = model(views)
Input tensor shape: [batch, n_lights, n_cameras, channels, height, width] (flat light_major layout also supported).
Do not load with .for_10_2() (that builds the Fourier 10_2 trunk).
For an example with worked download, model instanciation and inference, see: 11_3_test_gummybear_hierarchical_fusion.ipynb in the github.com/tbgitoo/gummybear-tomography repository.