--- datasets: - tbhugging/gummybear-tomography library_name: pytorch license: apache-2.0 metrics: - rmse pipeline_tag: image-feature-extraction tags: - tomography - particle-localization - cnn - pooled - gap - multiview - geometry-fusion model-index: - name: tbhugging/camera_orbit_compact_09_2b results: - task: type: image-feature-extraction name: Multi-view camera-orbit particle localisation (xyz) dataset: name: GummyBear Tomography (M8 catalog, M9 multi-view) type: tbhugging/gummybear-tomography config: m8_1 split: validation metrics: - type: rmse value: 1.320252 name: RMSE_total (Euclidean xyz) source: url: https://github.com/tbgitoo/gummybear-tomography/blob/master/GummyBearTomography_Final_Report.ipynb name: Final Report M9 Step 2 / 09_2B (pooled GAP) - task: type: image-feature-extraction name: Multi-view camera-orbit particle localisation (xyz) dataset: name: GummyBear Tomography (M8 catalog, M9 multi-view) type: tbhugging/gummybear-tomography config: m8_1 split: test metrics: - type: rmse value: 0.860746 name: RMSE_total (Euclidean xyz) source: url: https://github.com/tbgitoo/gummybear-tomography/blob/master/GummyBearTomography_Final_Report.ipynb name: Final Report M9 Step 2 / 09_2B (pooled GAP) --- # `tbhugging/camera_orbit_compact_09_2b` ## What this model does Given **6** camera-orbit views (0°, 60°, 120°, 180°, 240°, 300°) of 128×128 projections from the GummyBear Tomography dataset, the model predicts - particle_x - particle_y - particle_z coordinates of the embedded particle. ## Architecture Per-view **GAP (pooled) CNN trunk** → camera **sin/cos geometry tokens** → **compact fusion MLP** (`e2e_pooled_geometry_fusion`). Final Report **M9 Step 2 / 09_2B** — compact head (`f2_state`). - Hub: [tbhugging/camera_orbit_compact_09_2b](https://huggingface.co/tbhugging/camera_orbit_compact_09_2b) - Companion dataset: [tbhugging/gummybear-tomography](https://huggingface.co/datasets/tbhugging/gummybear-tomography) - Runnable report: [GummyBearTomography_Final_Report.ipynb](https://github.com/tbgitoo/gummybear-tomography/blob/master/GummyBearTomography_Final_Report.ipynb) (M9 Step 2 — 09_2B pooled ladder) - Source study checkpoint: [checkpoints/m9/m09_e2e_pooled_geometry_fusion.pt](https://huggingface.co/datasets/tbhugging/gummybear-tomography/blob/main/checkpoints/m9/m09_e2e_pooled_geometry_fusion.pt) (`f2_state` / `m09_2_e2e_pooled_geometry_fusion`) ## Training configuration - Protocol: `09_2B` (pooled GAP; excludes 09_2A Fourier) - Backbone: `pooled_gap` (`pooled` trunk) - Input field: `anomaly_ref` - Normalisation: `per_image_zscore` - Camera orbit: `0°, 60°, 120°, 180°, 240°, 300°` (6 views) - Geometry: `sin_theta, cos_theta` (concat) - Fusion: hidden `128`, depth `1` - Targets: `particle_x, particle_y, particle_z` - Builder: `GeometryAwareFourierFusionLocalizer.for_09_2_pooled()` - Variant: `m09_2_e2e_pooled_geometry_fusion` - Trainable parameters: `132358` - Stage-A learning rate: `0.001` ## Evaluation Results Structured scores for the Hub widget are declared in the YAML `model-index` / `metrics` metadata ([Model Cards — Evaluation Results](https://huggingface.co/docs/hub/model-cards#evaluation-results)). ### Testing Data - Dataset: [tbhugging/gummybear-tomography](https://huggingface.co/datasets/tbhugging/gummybear-tomography) (config `m8_1`) - Splits: `validation`, `test` - Protocol: Final Report **M9 Step 2 / 09_2B** (camera orbit 0°, 60°, 120°, 180°, 240°, 300°, `anomaly_ref`, `per_image_zscore`, **GAP pooled trunk only**, compact geometry fusion; excludes 09_2A Fourier) - Source checkpoint: [checkpoints/m9/m09_e2e_pooled_geometry_fusion.pt](https://huggingface.co/datasets/tbhugging/gummybear-tomography/blob/main/checkpoints/m9/m09_e2e_pooled_geometry_fusion.pt) (`f2_state` only) ### Metrics 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)`). ### Results Scores match the Final Report M9 Step 2 **09_2B pooled GAP** bar (not 09_2A Fourier; not element-wise MSE). | Split | Metric | Value | | --- | --- | ---: | | `validation` | RMSE_total (Euclidean xyz) | `1.320252` | | `test` | RMSE_total (Euclidean xyz) | `0.860746` | Source: [Final Report M9 Step 2 / 09_2B](https://github.com/tbgitoo/gummybear-tomography/blob/master/GummyBearTomography_Final_Report.ipynb). ## Load ```python import torch # libraries from https://github.com/tbgitoo/gummybear-tomography # Historical class name — use .for_09_2_pooled() for this GAP checkpoint only. from tomography_ml.localization.localize_multiview import ( GeometryAwareFourierFusionLocalizer, ) n_views = 6 view_angles_deg = [0.0, 60.0, 120.0, 180.0, 240.0, 300.0] model = GeometryAwareFourierFusionLocalizer.for_09_2_pooled( n_views=n_views, view_angles_deg=view_angles_deg, ) views = torch.zeros(1, n_views, 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_views, channels, height, width]`. Do **not** load with `.for_09_2()` (that builds the 09_2A Fourier trunk). Also excludes single-view M8, 09_3 large fusion, and M10 illumination stacks. ## Inference For an example with worked download, model instanciation and inference, see: [11_2_test_camera_orbit_compact_09_2b.ipynb](https://github.com/tbgitoo/gummybear-tomography/blob/master/notebooks/milestone_11/11_2_test_camera_orbit_compact_09_2b.ipynb) in the [github.com/tbgitoo/gummybear-tomography](https://github.com/tbgitoo/gummybear-tomography) repository.