Coal Maceral SegFormer-B3
Model summary
This repository distributes the project checkpoint for four-class semantic segmentation of reflected-light coal microscopy images.
| Field | Value |
|---|---|
| Task | Four-class semantic segmentation of reflected-light coal microscopy |
| Architecture | SegFormer-B3 backbone with a project decoder, coordinate attention, and auxiliary edge branches |
| Input | RGB image, letterboxed to 512 x 512 |
| Checkpoint | best_model.pth |
| Format | PyTorch tensor state dictionary |
| SHA-256 | aa66247e0a0db628ee32ee2730fab4da6aba6edac12bd975506bd30aea82926b |
| Source code | Javis-101/coal-maceral-recognition-system |
Classes
| ID | Class |
|---|---|
| 0 | background |
| 1 | INERTINITE |
| 2 | LIPTINITE |
| 3 | VITRINITE |
Preprocessing
The production implementation converts the image to RGB, preserves aspect ratio using a 512 x 512 letterbox,
fills padding with RGB [128, 128, 128], converts pixels to float32, then applies:
- mean:
[123.675, 116.28, 103.53] - standard deviation:
[58.395, 57.12, 57.375] - tensor layout: NCHW
The project does not divide pixels by 255 before applying these values. See preprocessor_config.json and the
source repository's backend/app/utils/image_utils.py.
Loading and inference
This is a project-specific PyTorch checkpoint, not a drop-in Transformers AutoModel package. Use the audited
model implementation from the source repository:
git clone https://github.com/Javis-101/coal-maceral-recognition-system.git
Set-Location coal-maceral-recognition-system
uv sync --locked
uv run python scripts/download_model.py
The production loader uses torch.load(..., weights_only=True), requires every current model key, and permits
only the 28 known legacy unexpected keys under decode_head.fdconv.*.
Intended use
- Non-commercial research and evaluation on images the operator is authorized to process.
- Expert-supervised study of coal-maceral semantic segmentation.
- Reproducible use with the linked source release.
License and data boundary
The checkpoint is publicly distributed by the project owner for non-commercial research and evaluation. The
SegFormer-derived architecture remains subject to the NVIDIA Source Code License for SegFormer in LICENSE.
No commercial-use permission is granted.
The training data, annotations, microscopy source images, database, and knowledge corpus are not distributed.
This model repository grants no rights to those materials. The Apache-2.0 license at the root of the source
repository does not override the checkpoint or SegFormer third-party license boundary. See MODEL_NOTICE.md.
Limitations
- No public accuracy, mIoU, F1, Dice, calibration, robustness, or cross-site generalization claim is made.
- The training dataset and split artifacts are not public, so the training run cannot be independently reproduced from this repository.
- Outputs require qualified petrographic review and must not be used as autonomous certification or safety-critical decisions.
- The linked application is local-first and is not hardened for public-network or multi-tenant deployment.