SegFormer-B0 for Quantitative Microstructure Segmentation
Model Description
This repository contains seven dataset-specific SegFormer checkpoints trained with MMSegmentation. The architecture uses a MiT-B0 backbone and SegFormer decode head with 512 x 512 inputs.
Source code and dataset-specific configs: https://github.com/WUT-AI-AI4Mat/Segmentation-methods-evaluation-for-quantitative-microstructure-analysis
Checkpoints
| Dataset | Classes | File |
|---|---|---|
| Aachen-Heerlen | 2 | checkpoints/Aachen-Heerlen/best_mIoU_epoch_76.pth |
| EMPS | 2 | checkpoints/EMPS/best_mIoU_epoch_153.pth |
| Grain | 2 | checkpoints/Grain/best_mIoU_epoch_63.pth |
| EBC | 3 | checkpoints/EBC/best_mIoU_epoch_128.pth |
| Super | 3 | checkpoints/Super/best_mIoU_epoch_170.pth |
| MetalDAM | 5 | checkpoints/MetalDAM/best_mIoU_epoch_96.pth |
| UHCS | 7 | checkpoints/UHCS/best_mIoU_epoch_137.pth |
Class counts include background.
Training Details
- Backbone: MiT-B0
- Input size: 512 x 512
- Training batch size: 32
- Validation and test batch size: 16
- Epochs: 200
- Optimizer: AdamW
- Learning rate: 0.00006
- Adam betas: 0.9 and 0.999
- Weight decay: 0.01
- Scheduler: five-epoch linear warm-up followed by polynomial decay
- Initialization:
mit_b0_20220624-7e0fe6dd.pth
Usage
Install the MMSegmentation environment described in the source repository. Example for EBC:
hf download NAMESPACE/microstructure-segformer-b0 checkpoints/EBC/best_mIoU_epoch_128.pth --local-dir weights/segformer-b0
cd mmsegmentation
export DATASET_ROOT=/path/to/EBC
python tools/test_ebc_segformer.py \
--dataset-root /path/to/EBC \
--checkpoint ../weights/segformer-b0/checkpoints/EBC/best_mIoU_epoch_128.pth \
--result-root ../results/segformer_ebc
Use the corresponding dataset config and tools/test_*_segformer.py wrapper
for the other checkpoints.
Evaluation
The shared testing code calls Myutils.metrics.Metric.compute_all, saves raw
prediction masks, and exports an Excel report. Reported metrics include mIoU,
Dice, precision, recall, accuracy, HD95, Hausdorff distance, NSD, MAE, MBSS,
and MBSS_add. Numerical benchmark results will be linked after the associated
paper becomes publicly available.
Intended Use and Limitations
The checkpoints are intended for reproducing segmentation experiments on the named datasets. Performance may not transfer to unseen materials, imaging modalities, magnifications, or annotation conventions. The models are not validated for safety-critical or industrial quality-control decisions.
License and Citation
The released experiment files are provided under the MIT license. MMSegmentation and the SegFormer initialization remain subject to their upstream licenses. A paper citation will be added after publication.