CrackVarious: A Multi-Domain Dataset and Crack-Aware Hybrid CNN-Transformer Framework for Robust Crack Segmentation
This repo contain the PyTorch implementation of CrackAwareFusionNet for pixel-wise crack segmentation in civil infrastructure images.
2026-01-01
- Initial public release of CrackAwareFusionNet (CAFNet) code and CrackVarious dataset. The trained model parameters will be published soon.
- Trained Model: weight
- Data organized as:
<CRACKVARIOUS_ROOT>/
train/
IMG/
GT/
val/
IMG/
GT/
test/
IMG/
GT/
- Configure the root path in
CrackAwareFusionNet/config.py:
# CrackAwareFusionNet/config.py
dataset = "./data/CRACKVARIOUS/" # update to your local pathDownload link: CrackVarious | Pavement | Masonry | Steel
Please note that the use of our dataset is RESTRICTED to non-commercial research and educational purposes. To download the dataset from the link, please cite as below.
git clone https://github.com/ankthuw/CAFNet.git
cd CAFNet
pip install -r requirements.txtCrackAwareFusionNet/model.py– CAFNet architectureCrackAwareFusionNet/trainer.py– training loopCrackAwareFusionNet/test.py– testing / evaluationCrackAwareFusionNet/dataloader.py,dataset.py– data loading utilitiesCrackAwareFusionNet/config.py– global configurationCrackAwareFusionNet/utils.py– helper functions
From the repo root:
python -m CrackAwareFusionNet.trainer
# or
python CrackAwareFusionNet/trainer.pyMain training configs (epochs, batch size, learning rate, etc.) are defined in CrackAwareFusionNet/config.py.
python CrackAwareFusionNet/test.pyMetrics and evaluation code are in CrackAwareFusionNet/metric.py.
| Model | mIoU (%) |
|---|---|
| UNet | 67.39 |
| SegFormer | 61.99 |
| HrSegNet-32 | 52.72 |
| HrSegNet-48 | 59.92 |
| Hybrid-Segmentor | 67.10 |
| CAFNet (Proposed) | 69.41 |
If you use this code or the CrackVarious dataset in your research, please cite our paper (BibTeX will be added after publication).
If you have any questions, please contact blathu22@fit.hcmus.edu.vn or hmdang22@fit.hcmus.edu.vn without hesitation.

