CoolFace
Modelpublic

tbhugging/singleview_cnn_fourier

sourceHugging Faceapache-2.0updated 29d agoView on Hugging Face
0likes64downloads
Model Card

tbhugging/singleview_cnn_fourier

What this model does

Given a single 128×128 projection image from the M8 GummyBear Tomography dataset, the model predicts

  • —particle_x
  • —particle_y
  • —particle_z

coordinates of the embedded particle.

Architecture

The model uses Fourier pooling in place of conventional max-pooling layers as described in the M8 study (see https://github.com/tbgitoo/gummybear-tomography).

Single-view CNN + Fourier pooling particle localiser from the gummybear-tomography Final Report M8 Step 3 (train → validation/test on (particle_x, particle_y, particle_z)).

Training configuration

  • —Input field: anomaly_ref
  • —Normalisation: per_image_zscore
  • —Camera: 180.0° (single view)
  • —Targets: particle_x, particle_y, particle_z
  • —Library class: LocalizerSingleViewFourier
  • —Trainable parameters: 31811
  • —Stage learning rate: 0.03

Evaluation Results

Structured scores for the Hub widget are declared in the YAML model-index / metrics metadata (Model Cards — Evaluation Results).

Testing Data

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). This matches the Final Report M8 Step 3 bars (not element-wise MSE). Hub metric id: rmse (display name RMSE_total (Euclidean xyz)).

Results

SplitMetricValue
validationRMSE_total (Euclidean xyz)2.275541
testRMSE_total (Euclidean xyz)1.491224

Source: Final Report M8 Step 3.

Load

python
import torch
# libraries from https://github.com/tbgitoo/gummybear-tomography
from tomography_ml.studies.single_view_m8 import make_m8_single_view_model
from tomography_ml.localization.builders import materialize_lazy_modules

model = make_m8_single_view_model('fourier', n_outputs=3, device='cpu')
materialize_lazy_modules(model, torch.zeros(1, 1, 128, 128))
state = torch.load('pytorch_model.bin', map_location='cpu', weights_only=True)
model.load_state_dict(state)
model.eval()

Do not treat this checkpoint as multi-view (M9) or multi-illumination (M10).

Inference

For an example with worked download, model instanciation and inference, see: 11_1_test_singleview_cnn_fourier.ipynb in the gummybear-tomography repository.