Downloads · 30 days
0
biohub/octopi
octopi is a image segmentation model from biohub. Use it for the image segmentation task on the model card, and read the license before you ship it in a product. It is set up for octopi. The card lists the license as mit.
Pretrained model weights for Octopi, a deep learning framework for automated 3D particle picking in cryo-electron tomography (cryo-ET).
Downloads · 30 days
0
Access
Public
Updated Jul 14, 2026
Repo size
12.9 MB
Likes
0
Public
Click a slice to open those files.
.pth12.9 MB · 100%
From the Hugging Face model README
Pretrained model weights for Octopi, a deep learning framework for automated 3D particle picking in cryo-electron tomography (cryo-ET).
Cryo-electron tomograms typically contain large regions of vacuum or embedding medium surrounding the biological specimen. These regions carry no useful signal and can introduce false positives during downstream particle picking. The checkpoints in this repo are 3D segmentation models trained with Octopi to identify the specimen region within a tomogram, so it can be masked out before particle picking runs.
Each checkpoint is a 3D convolutional segmentation network (architecture and training hyperparameters vary by checkpoint) trained on the tomogram/segmentation-mask pairs described in the config bundled with it. Every checkpoint's own config.yaml records its exact architecture (e.g. U-Net, SegResNet, DynUNet, SwinUNETR), input dimensions, and training configuration.
Repo layout. each checkpoint lives in its own subfolder containing both the trained weights and the model config needed to rebuild the architecture:
<checkpoint-name>/
├── weights.pth # trained model state_dict
└── config.yaml # architecture + training config used to build the model
This table will grow as new models are added.
| Model | Target | Description |
|---|---|---|
| tomogram-boundary | Vacuum vs. specimen | Segments a tomogram into vacuum vs. specimen, useful for masking before downstream particle picking. |
octopi CLIPass the checkpoint name directly as --model-weights — no --model-config needed, it's bundled
and downloaded automatically. The first run downloads and caches the checkpoint; subsequent runs
reuse the local cache.
octopi segment \
--config config.json \
--tomo-uri [email protected] \
--model-weights tomogram-boundary \
--seg-uri predict:octopi/1
from octopi.workflows import segment
segment(
config="config.json",
model_weights="tomogram-boundary",
tomo_uri="[email protected]",
seg_uri="predict:octopi/1",
)
huggingface_hubProvide just the checkpoint name and download the whole subfolder — weights and config together — in a single call:
from huggingface_hub import snapshot_download
checkpoint = "tomogram-boundary"
local_dir = snapshot_download(repo_id="biohub/octopi", allow_patterns=f"{checkpoint}/*")
weights_path = f"{local_dir}/{checkpoint}/weights.pth"
config_path = f"{local_dir}/{checkpoint}/config.yaml"
Or with the hf CLI:
hf download biohub/octopi --include "tomogram-boundary/*" --local-dir ./tomogram-boundary
Predicts both sample and vacuum regions, useful for masking before downstream particle picking. For post-processing after inference, refer to copick's sample_boundaries
tutorial. Trained on 300 tomograms (77 held out for validation) spanning 21 datasets (see details below).
Ground-truth masks were built by annotating the top/bottom sample-boundary surfaces as picks, then fitting and rasterizing the sample slab (interior) and its vacuum complement (exterior) into a 3-class mask. All tomograms were Fourier-downsampled to 20 Å before training.
| Dataset | Organism | Domain | Prep | Sample | Train | Val | Total |
|---|---|---|---|---|---|---|---|
| 10001 | S. pombe | Eukaryota | FIB-milled | lamellae, Volta phase plate | 8 | 2 | 10 |
| 10007 | S. cerevisiae | Eukaryota | FIB-milled | lamellae | 30 | 7 | 37 |
| 10301 | C. reinhardtii | Eukaryota | FIB-milled | lamellae | 14 | 4 | 18 |
| 10302 | C. reinhardtii | Eukaryota | FIB-milled | lamellae | 26 | 6 | 32 |
| internal | H. sapiens | Eukaryota | Plunge-frozen | unroofed cells | 8 | 2 | 10 |
| internal | H. sapiens | Eukaryota | Plunge-frozen | unroofed cells | 8 | 2 | 10 |
| internal | H. sapiens | Eukaryota | Plunge-frozen | unroofed cells | 8 | 2 | 10 |
| internal | H. sapiens | Eukaryota | Plunge-frozen | unroofed cells | 8 | 2 | 10 |
| 10430 | H. sapiens | Eukaryota | Plunge-frozen | unroofed cells | 8 | 2 | 10 |
| 10458 | H. sapiens | Eukaryota | Plunge-frozen | affinity-captured organelles | 24 | 7 | 31 |
| 10461 | H. sapiens | Eukaryota | Plunge-frozen | affinity-captured organelles | 23 | 6 | 29 |
| 10473 | S. cerevisiae | Eukaryota | FIB-milled | lamellae | 3 | 1 | 4 |
| 10474 | S. cerevisiae | Eukaryota | FIB-milled | lamellae | 6 | 2 | 8 |
| 10475 | H. sapiens | Eukaryota | FIB-milled | lamellae | 12 | 3 | 15 |
| 10476 | H. sapiens | Eukaryota | FIB-milled | lamellae | 12 | 3 | 15 |
| 10477 | C. elegans | Eukaryota | FIB-milled | lamellae | 8 | 2 | 10 |
| 10479 | A. thaliana | Eukaryota | FIB-milled | lamellae | 12 | 3 | 15 |
| internal | E. coli | Bacteria | FIB-milled | lamellae | 24 | 6 | 30 |
| 10498 | E. coli | Bacteria | Plunge-frozen | purified 70S ribosomes (EMPIAR-10985) | 20 | 5 | 25 |
| 10510 | M. musculus | Eukaryota | FIB-milled | brain, lamellae | 18 | 5 | 23 |
| 10511 | H. sapiens | Eukaryota | FIB-milled | lamellae (labeled from EMPIAR-12894) | 20 | 5 | 25 |
| Total | 21 datasets | 300 | 77 | 377 |
Training configuration: octopi train with SegResNet architecture and
FocalLoss AdamW (lr = 3.21×10⁻⁴) for 1000 epochs, checkpoint selected on validation avg_f1 (evaluated every 100 epochs).
Performance metrics: avg_f1 on the 77-run validation split was used only to select the best checkpoint during training, not as a reported benchmark.
These models perform segmentation of cryo-ET tomograms, distinguishing specimen from vacuum/embedding medium, and do not generate, design, or predict biological sequences, structures, or novel compounds. They have no capability that could be used to create or enhance harmful biological agents, and we are not aware of a dual-use risk associated with their release. We are releasing the source code, training configuration, and model weights for these checkpoints in that context.
This model was trained exclusively on cryo-ET tomograms and learned signal characteristics specific to that modality (contrast, noise, reconstruction artifacts). It carries no guarantee of working on other volumetric imaging domains — other electron microscopy modalities, medical CT/MRI, or light microscopy volumes — since those have fundamentally different signal properties. Within cryo-ET, segmentation quality may still degrade on unusual preparations or reconstruction methods not resembling the training distribution.
As with any learned segmentation model, predictions can fail silently without any indication that the output is wrong. Treat predicted masks as a proposal to mask/filter downstream particle picking, not as ground truth; incorrectly discarding sample-adjacent regions as "vacuum" could bias subsequent analysis.
The training dataset for the tomogram-boundary checkpoint was annotated by Utz Ermel, who also trained this model.