U-Net for cells in immunofluorescence
converting a biomedical model to safetensors
2 min readupdated
The model performs cell segmentation (foreground and boundary extraction) on immunofluorescence microscope images. The original "powerful-chipmunk" model by Constantin Pape (EMBL Heidelberg) was re-saved in the safetensors format without changing weights for use in EVAnalyzer and other third-party tools. The architecture is a standard 2D U-Net (UNet2d) with four depth levels and InstanceNorm normalization. The model is useful for researchers, biologists, and medical image software developers without Python dependencies.
Key features
- Precise separation: predicts the probability of a pixel belonging to a cell and to a cell boundary.
- Safetensors format: original f32 weights converted losslessly, the difference from the original is less than 3.3 × 10⁻⁵.
- Biomedical training: the model is trained on Vero E6 cells for COVID-19 antibody analysis tasks.
- Metadata: layer and preprocessing configuration are embedded directly into the model file.
What you can do
- Run cell segmentation on fluorescence microscopy images in Python using the torch-em library.
- Integrate the model into Rust applications or third-party software that supports loading safetensors via an .evanet file.
- Separate coalescing cells by combining the obtained boundaries with nuclear segmentation (for example, via StarDist).
Example
Example of loading and running the model using Python and torch-em:
from safetensors.torch import load_file
from torch_em.model import UNet2d
net = UNet2d(in_channels=1, out_channels=2, depth=4, initial_features=64, gain=2,
final_activation="Sigmoid")
net.load_state_dict(load_file("powerful-chipmunk.evanet"))
net.eval()Read more
DetailsWeight file: about 116 MB, f32 format (safetensors).
Input data: 1 channel, side size a multiple of 16 (minimum 64), zero_mean_unit_variance normalization.
License: CC-BY-4.0.
Training: torch-em (Dice loss, Adam, LR 1e-4, 1243 epochs).










Comments