UniEM3M-Seg

πŸ“˜ Model Summary

This is the microstructural segmentation model trained on the complete UniEM-3M dataset. It is designed for electron microscopy (EM) instance segmentation, enabling:

  • Automated particle and microstructure delineation
  • Scientific image analysis in materials science
  • Downstream characterization workflows (size, morphology, distribution)

Trained with EM3M (cellpose_sam, ViT-B backbone + flow-prob head). Checkpoint includes full SAM ViT-B weights.

File Description
config.yaml Inference config
model_final.pth Model checkpoint

πŸš€ Usage Example

Install EM3M and its dependencies (PyTorch, Detectron2, CUDA extensions), then:

Folder inference (recommended)

export HF_ENDPOINT=https://hf-mirror.com  # optional, for users in China

git clone https://github.com/homura1213/EM3M.git
cd EM3M

python inference_folder.py \
  --hf-repo UniParser/EM3M-Seg \
  --input-dir /path/to/images \
  --output-dir /path/to/output \
  --output-mode both

Outputs:

  • vis/ β€” overlay visualizations (PNG)
  • json/ β€” Labelme-format polygon annotations

Python API

import os
os.environ.setdefault("HF_ENDPOINT", "https://hf-mirror.com")  # optional

from semantic_sam.hub import load_em3m_model

model, cfg = load_em3m_model("UniParser/EM3M-Seg")
# model is ready for inference; see EM3M repo for input format

Local checkpoint

If you already downloaded the repo:

python inference_folder.py \
  --config-file /path/to/config.yaml \
  --weights /path/to/model_final.pth \
  --input-dir /path/to/images \
  --output-dir /path/to/output \
  --output-mode both

πŸ“– Citation

If you use this model, please cite:

@misc{wang2025uniem3muniversalelectronmicrograph,
      title={UniEM-3M: A Universal Electron Micrograph Dataset for Microstructural Segmentation and Generation}, 
      author={Nan wang and Zhiyi Xia and Yiming Li and Shi Tang and Zuxin Fan and Xi Fang and Haoyi Tao and Xiaochen Cai and Guolin Ke and Linfeng Zhang and Yanhui Hong},
      year={2025},
      eprint={2508.16239},
      archivePrefix={arXiv},
      primaryClass={cs.CV},
      url={https://arxiv.org/abs/2508.16239}, 
}
Downloads last month
-
Inference Providers NEW
This model isn't deployed by any Inference Provider. πŸ™‹ Ask for provider support

Dataset used to train UniParser/EM3M-Seg

Collection including UniParser/EM3M-Seg

Paper for UniParser/EM3M-Seg