This is the official pyTorch implementation of the paper A Convolutional-Transformer Network for Crack Segmentation with Boundary Awareness.
The Crack500 dataset contains 500 images of size around 2000 × 1500 pixels taken by cell phones on main campus of Temple University. And each image was cropped into 16 non-overlapped image regions and only the region containing more than 1000 pixels of crack is kept. Through this way, the training data consists of 1,896 images, validation data contains 348 images, test data contains 1124 images. Download the Crack500 dataset from this link.
|-- Crack500
|-- train
|-- images
| |-- 20160222_081011_1_361.jpg
......
|-- masks
| |-- 20160222_081011_1_361.png
......
|-- test
|-- images
| |-- 20160222_080933_361_1.jpg
......
|-- masks
| |-- 20160222_080933_361_1.png
......
|-- val
|-- images
| |-- 20160222_080850_1_361.jpg
......
|-- masks
| |-- 20160222_080850_1_361.png
......
The DeepCrack dataset is consist of 537 RGB color images with manually annotated segmentations. The images were divided into two main subsets: a training set with 300 images and a testing set with 237 ones. You can download the Deepcrack dataset from this link.
|-- DeepCrack
|-- train
|-- images
| |-- 7Q3A9060-1.jpg
......
|-- masks
| |-- 7Q3A9060-1.png
......
|-- test
|-- images
| |-- 11125-1.jpg
......
|-- masks
| |-- 11125-1.png
......
python train_crack.py
It will run training for model and save the best weights for the validation set.
python evaluate_crack.py --output <path_to_dir>
It will represent performance measures and save related results in results
folder.
Visual comparison of the segmentation results:
Evaluation metrics of competing methods:
You can download the learned weights for each dataset in the following table.
Dataset | Google Drive | Baidu Yun |
---|---|---|
Crack500 | link | link |
Deepcrack | link | link |
CT-CrackSeg is based on following repos. We thanks for their great works:
If you find our code or paper useful, please consider citing:
@inproceedings{CTCrackSeg,
title={A Convolutional-Transformer Network for Crack Segmentation with Boundary Awareness},
author={Tao, Huaqi and Liu, Bingxi and Cui, Jinqiang and Zhang, Hong},
booktitle={2023 IEEE International Conference on Image Processing (ICIP)},
pages={86-90},
year={2023},
organization={IEEE}
}