Downloads · 30 days
0
3x6dll9ff/diplom
diplom is a machine learning model from 3x6dll9ff. Use it for the machine learning task on the model card, and read the license before you ship it in a product.
Reconstruction of 3D cell morphology from 3 orthogonal projections (top, bottom, side).
Downloads · 30 days
0
Access
Public
Updated Apr 12, 2026
Repo size
106 MB
Likes
0
Public
Click a slice to open those files.
.pt106 MB · 100%
From the Hugging Face model README
Reconstruction of 3D cell morphology from 3 orthogonal projections (top, bottom, side).
best_autoencoder.pt)best_refiner.pt)best_vae.pt)best_classifier.pt)Note: Models uploaded before the pipeline overhaul may have lower quality. Retrained models with skip connections, TTA, augmentation, and bug fixes are expected to achieve significantly higher Dice.
import torch
from src.autoencoder import TriViewAutoencoder
from src.reconstruction_utils import infer_in_channels_from_state_dict, infer_skip_channels_from_state_dict
state_dict = torch.load("best_autoencoder.pt", map_location="cpu")
if "model_state_dict" in state_dict:
state_dict = state_dict["model_state_dict"]
in_channels = infer_in_channels_from_state_dict(state_dict)
skip_channels = infer_skip_channels_from_state_dict(state_dict)
latent_dim = int(state_dict["encoder.fc.1.weight"].shape[0])
model = TriViewAutoencoder(latent_dim=latent_dim, in_channels=in_channels, skip_channels=skip_channels)
model.load_state_dict(state_dict)
model.eval()
# Inference with TTA
import torch.nn.functional as F
x = ... # [batch, 3, 64, 64] projections
pred = model(x)
pred_flipped = model(x.flip(-1)).flip(-1)
pred_avg = (pred + pred_flipped) / 2.0
volume = torch.sigmoid(pred_avg) # [batch, 1, 64, 64, 64]
train_colab.ipynb → best_autoencoder.pttrain_refiner_colab.ipynb → best_refiner.pt (needs stage 1)train_vae_colab.ipynb → best_vae.pt (independent)train_classifier_colab.ipynb → best_classifier.pt (needs stage 1)