webapps / microsam /models /README.md
sbollmann's picture
Add micro-sam vit_t_em_organelles ONNX encoder and decoder
9fbdabc verified
|
Raw History Blame Contribute Delete
2.42 kB

micro-sam ViT-T generalists (ONNX)

This folder holds ONNX (opset 17) exports of micro-sam's ViT-T models for the Neurodesk micro-sam web app:

Light-microscopy generalist (vit_t_lm)

microsam-vit-t-lm-encoder.onnx and microsam-vit-t-lm-decoder.onnx are the image encoder and the prompt decoder of micro-sam's vit_t_lm model.

Electron-microscopy organelle generalist (vit_t_em_organelles)

microsam-vit-t-em-organelles-encoder.onnx and microsam-vit-t-em-organelles-decoder.onnx are the image encoder and the prompt decoder of micro-sam's vit_t_em_organelles model.

Attribution, licence and modifications

  • Authors: Anwai Archit, Constantin Pape (University of Göttingen) and the micro-sam contributors.
  • Licence: CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/), as stated in each model's BioImage.IO manifest. Both models are fine-tuned from MobileSAM (Zhang et al. 2023, Apache-2.0), itself distilled from Segment Anything (Kirillov et al. 2023, Apache-2.0).
  • Cite: Archit, A. et al. Segment Anything for Microscopy. Nature Methods 22, 579-591 (2025). https://doi.org/10.1038/s41592-024-02580-4
  • Modifications (CC BY 4.0 section 3(a)(1)(B)): converted to ONNX with apps/microsam/validation/export_onnx.py in github.com/neurodesk/webapps (torch 2.5.1, MobileSAM), in the state micro_sam.util.get_sam_model returns the model. TinyViT's cached attention biases (Attention.ab) are the zero cache MobileSAM's builder computes before the checkpoint is loaded, and that cache is folded into the encoder, so the checkpoint's trained attention biases (attention_biases) are not used; every other weight is the checkpoint's. The decoder returns all four mask tokens.
  • The encoder and decoder graphs are traced from MobileSAM and Segment Anything code, licensed under the Apache License, Version 2.0; the full text is LICENSE-APACHE-2.0 in this folder.