Skip to content

Latest commit

 

History

19 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 

Repository files navigation

CrackVarious: A Multi-Domain Dataset and Crack-Aware Hybrid CNN-Transformer Framework for Robust Crack Segmentation

Static Badge  

This repo contain the PyTorch implementation of CrackAwareFusionNet for pixel-wise crack segmentation in civil infrastructure images.

Update

2026-01-01

  • Initial public release of CrackAwareFusionNet (CAFNet) code and CrackVarious dataset. The trained model parameters will be published soon.

1. Model Architecture

2. Dataset

  • 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 path

Download 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.

3. Installation

git clone https://github.com/ankthuw/CAFNet.git
cd CAFNet
pip install -r requirements.txt

4. Usage

File Structure

  • CrackAwareFusionNet/model.py – CAFNet architecture
  • CrackAwareFusionNet/trainer.py – training loop
  • CrackAwareFusionNet/test.py – testing / evaluation
  • CrackAwareFusionNet/dataloader.py, dataset.py – data loading utilities
  • CrackAwareFusionNet/config.py – global configuration
  • CrackAwareFusionNet/utils.py – helper functions

Train

From the repo root:

python -m CrackAwareFusionNet.trainer
# or
python CrackAwareFusionNet/trainer.py

Main training configs (epochs, batch size, learning rate, etc.) are defined in CrackAwareFusionNet/config.py.

Test / Evaluation

python CrackAwareFusionNet/test.py

Metrics and evaluation code are in CrackAwareFusionNet/metric.py.

5. Result

Result on our dataset

Model mIoU (%)
UNet 67.39
SegFormer 61.99
HrSegNet-32 52.72
HrSegNet-48 59.92
Hybrid-Segmentor 67.10
CAFNet (Proposed) 69.41

Comparisions with State-of-the-art

6. Citation

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.

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Used by

Contributors

Languages