SurfaceGuard AI - MiT-B4 Two-Seed Model
This repository contains two trained SegFormer MiT-B4 checkpoints for detecting four types of industrial steel-surface defects.
Architecture
- Model: SegFormer
- Encoder: MiT-B4
- Library: Segmentation Models PyTorch
- Input: RGB image resized to 128 x 800
- Output classes:
- defect_a
- defect_b
- defect_c
- defect_d
Checkpoints
mit_b4_seed_42_best.pthmit_b4_seed_2026_best.pth
The two checkpoints were trained with different random seeds and can be averaged during inference to reduce prediction variance.
Inference
The recommended inference order is:
image preprocessing
β model prediction
β horizontal-flip TTA
β inverse flip
β average the two seed predictions
β threshold
β connected-component filtering
β RLE encoding
Preprocessing
- Resize to 128 x 800
- Convert to RGB
- Scale pixel values to [0, 1]
- Normalize using ImageNet statistics
Mean:
[0.485, 0.456, 0.406]
Standard deviation:
[0.229, 0.224, 0.225]
Post-processing settings
Class Threshold Minimum area
defect_a 0.225 64
defect_b 0.200 16
defect_c 0.225 32
defect_d 0.225 96
Intended use
This model is intended for educational experiments and industrial surface-defect
segmentation research. It should be validated further before being used in a
production quality-control system.
Limitations
The reported scores are local validation or audit measurements. They should not
be interpreted as official Kaggle leaderboard scores unless verified separately
on the competition platform.