UniParser/UniEM-3M
Viewer β’ Updated β’ 28.1k β’ 234 β’ 7
This is the microstructural segmentation model trained on the complete UniEM-3M dataset. It is designed for electron microscopy (EM) instance segmentation, enabling:
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 |
Install EM3M and its dependencies (PyTorch, Detectron2, CUDA extensions), then:
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 annotationsimport 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
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
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},
}