| --- |
| license: mit |
| library_name: segmentation_models_pytorch |
| pipeline_tag: image-segmentation |
| tags: |
| - semantic-segmentation |
| - microstructure |
| - materials-science |
| - pytorch |
| - deeplabv3plus |
| --- |
| |
| # DeepLabV3+ for Quantitative Microstructure Segmentation |
|
|
| ## Model Description |
|
|
| This repository contains seven dataset-specific DeepLabV3+ checkpoints used |
| in a benchmark of microstructure segmentation methods. The implementation is |
| from `segmentation_models_pytorch` with a ResNet-50 encoder initialized from |
| ImageNet weights. Inputs are resized to 512 x 512 pixels and predictions are |
| restored to the original image size with nearest-neighbor interpolation. |
|
|
| Source code: |
| https://github.com/WUT-AI-AI4Mat/Segmentation-methods-evaluation-for-quantitative-microstructure-analysis |
|
|
| ## Checkpoints |
|
|
| | Dataset | Task | Output channels | File | |
| | --- | --- | ---: | --- | |
| | Aachen-Heerlen | Binary segmentation | 1 | `checkpoints/Aachen-Heerlen/DeepLabV3P_Best_Model.pth` | |
| | EMPS | Binary segmentation | 1 | `checkpoints/EMPS/DeepLabV3P_Best_Model.pth` | |
| | Grain | Binary segmentation | 1 | `checkpoints/Grain/DeepLabV3P_Best_Model.pth` | |
| | EBC | 3-class segmentation | 3 | `checkpoints/EBC/DeepLabV3P_Best_Model.pth` | |
| | Super | 3-class segmentation | 3 | `checkpoints/Super/DeepLabV3P_Best_Model.pth` | |
| | MetalDAM | 5-class segmentation | 5 | `checkpoints/MetalDAM/DeepLabV3P_Best_Model.pth` | |
| | UHCS | 7-class segmentation | 7 | `checkpoints/UHCS/DeepLabV3P_Best_Model.pth` | |
|
|
| Binary checkpoints produce one foreground logit; background is represented by |
| the complementary binary label. Multiclass counts include background. |
|
|
| ## Training Details |
|
|
| - Input size: 512 x 512 |
| - Batch size: 32 |
| - Epochs: 500 |
| - Optimizer: AdamW |
| - Learning rate: 0.0003 |
| - Weight decay: 0.001 |
| - Scheduler: CosineAnnealingLR with minimum learning rate 0.000001 |
| - Early-stopping patience: 50 |
| - Binary objective: Dice and BCEWithLogits |
| - Multiclass objective: Dice and cross-entropy |
|
|
| ## Usage |
|
|
| Example for binary EMPS segmentation: |
|
|
| ```bash |
| hf download NAMESPACE/microstructure-deeplabv3plus checkpoints/EMPS/DeepLabV3P_Best_Model.pth --local-dir weights/deeplabv3plus |
| python "CNN/DeepLabV3+/test.py" \ |
| --dataset-root /path/to/EMPS \ |
| --checkpoint weights/deeplabv3plus/checkpoints/EMPS/DeepLabV3P_Best_Model.pth \ |
| --output-dir results/deeplabv3plus_emps |
| ``` |
|
|
| For EBC, Super, MetalDAM, and UHCS, use |
| `CNN/DeepLabV3+/test_multi.py` and pass the matching `--num-classes` value. |
|
|
| ## Evaluation |
|
|
| The evaluation scripts save original-resolution masks and report mIoU, Dice, |
| precision, recall, accuracy, HD95, Hausdorff distance, NSD, MAE, MBSS, and |
| MBSS_add through `Myutils/metrics.py`. Numerical benchmark results will be |
| linked after the associated paper becomes publicly available. |
| |
| ## Intended Use and Limitations |
| |
| These checkpoints are intended for research reproduction and comparison on |
| the named microstructure datasets. They are not general-purpose segmentation |
| models. Domain shift in imaging, magnification, materials, or annotation |
| policy may reduce accuracy. They are not validated for safety-critical or |
| industrial quality-control decisions. |
| |
| ## License and Citation |
| |
| The released experiment files are provided under the MIT license. The model |
| implementation and ImageNet initialization remain subject to upstream terms. |
| A paper citation will be added after publication. |
| |