百科.dev
全部条目在线工具AI 编程趋势榜开源项目技术资讯提交条目
登录
< 返回工具列表
C

crack_detection_CNN_masonry

> 编程语言
开源

本 GitHub 仓库旨在分享与《利用超声波检测技术自动识别和分割砌体表面裂缝》期刊论文相关的材料。

200 stars0 点赞3 次浏览
访问官网GitHub

工具介绍

本 GitHub 仓库旨在分享与《利用超声波检测技术自动识别和分割砌体表面裂缝》期刊论文相关的材料。

Crack detection for masonry surfaces

This GitHub Repository was produced to share material relevant to the Journal paper Automatic crack classification and segmentation on masonry surfaces using convolutional neural networks and transfer learning by D. Dais, İ. E. Bal, E. Smyrou, and V. Sarhosis published in Automation in Construction.

While in the paper models were trained both for patch classification and pixel segmentation, in the herein repository only the codes for crack segmentation are made available for the time being. Extra material regarding the patch classification will be added in the future.

A sub-set of the masonry dataset used in the paper is made available as well in the dataset folder.

Ιndicative examples of photos from our masonry dataset can be found in the folder dataset_sample.

The paper can be downloaded from the following links:

  • https://doi.org/10.1016/j.autcon.2021.103606
  • https://www.researchgate.net/publication/349645935_Automatic_crack_classification_and_segmentation_on_masonry_surfaces_using_convolutional_neural_networks_and_transfer_learning

In case you use or find interesting our work please cite the following Journal publication:

D. Dais, İ.E. Bal, E. Smyrou, V. Sarhosis, Automatic crack classification and segmentation on masonry surfaces using convolutional neural networks and transfer learning, Automation in Construction. 125 (2021), pp. 103606. https://doi.org/10.1016/j.autcon.2021.103606.

@article{Dais2021,  
  author = {Dais, Dimitris and Bal, İhsan Engin and Smyrou, Eleni and Sarhosis, Vasilis},  
  doi = {10.1016/j.autcon.2021.103606},  
  journal = {Automation in Construction},  
  pages = {103606},  
  title = {{Automatic crack classification and segmentation on masonry surfaces using convolutional neural networks and transfer learning}},  
  url = {https://linkinghub.elsevier.com/retrieve/pii/S0926580521000571},  
  volume = {125},  
  year = {2021}  
}  

Author and Moderator of the Repository: Dimitris Dais

For further information please follow me in the below links
LinkedIn: https://www.linkedin.com/in/dimitris-dais/
Email: [email protected]
ResearchGate: https://www.researchgate.net/profile/Dimitris_Dais2
Research Group Page: https://www.linkedin.com/company/earthquake-resistant-structures-promising-groningen
YouTube Channel: https://www.youtube.com/channel/UCuSdAarhISVQzV2GhxaErsg

Your feedback is welcome. Feel free to reach out to explore any options for collaboration.

Table of Contents

Crack detection for masonry surfaces
Table of Contents
Publication - Brief Preview
| --- Image patch classification for crack detection
| --- Crack segmentation on pixel level
How to download and run the code
Configuration file
Build data
Train
Evaluate
Acknowledgements
References

Publication - Brief Preview

The aim of this study is to examine deep learning techniques for crack detection on images from masonry walls. A dataset with photos from masonry structures is produced containing complex backgrounds and various crack types and sizes. Different deep learning networks are considered and by leveraging the effect of transfer learning crack detection on masonry surfaces is performed on patch level with 95.3% accuracy and on pixel level with 79.6% F1 score. This is the first implementation of deep learning for pixel-level crack segmentation on masonry surfaces.

Image patch classification for crack detection

Different state of the art CNNs pretrained on ImageNet are examined herein for their efficacy to classify images from masonry surfaces on patch level as crack or non-crack.

Crack segmentation on pixel level

U-net, a deep Fully Convolutional Network (FCN), and Feature Pyramid Networks (FPN), a generic pyramid representation, are considered herein and combined with different pretrained CNNs performing as the backbone of the encoder part of the network. Moreover, other networks found in the literature and performed well in crack segmentation are examined as well.

Schematic representation of the encoder-decoder architecture of Fully Convolutional Networks..
Schematic representation of Feature Pyramid Network.
Illustration of the architecture of U-net as implemented in the herein study.
The original image, the ground truth and the prediction with U-net-MobileNet.

How to download and run the code

Simply download the code and copy it your desired folder path.
In order to use the code you need to define the Configuration file (config_class.py) suitably. There are three modes:

  • Build data
  • Train
  • Evaluate

To use the Build data mode you need to run the build_data.py file while the Train and Evaluate modes are implemented with the train_evaluate.py file. See the documentation below for extra info.

Configuration file

In the Configuration file (config_class.py) you can define the parameters that will be used when running the code.
See below some examples of different parameters that can be defined:

python
        # Define the mode that will be used when running the code
        self.mode = 'evaluate' # 'train', 'evaluate' or 'build_data'
        # Info that will be used as prefix of any output files
        self.info = 'crack_detection'
        # Dimensions of the images that will be fed to the network
        self.IMAGE_DIMS = (224 , 224 , 3)
        # Batch size
        self.BS = 4
        # Number of epochs to train the model
        self.epochs = 10
        # Initial learning rate
        self.INIT_LR = 0.0005

When the Train mode is used, define which network to be used. The options are:

  • U-net
  • Deeplabv3
  • DeepCrack
  • Segmentation Models: Different models architectures for segmentation combined with pretrained CNNs performing as the backbone of the encoder part of the network
…

In order to use the Deeplabv3 network copy model.py to the networks folder.

In order to use the DeepCrack network copy edeepcrack_cls.py and indices_pooling.py to the networks folder.

In order to use the Segmentation Models use the pip install method as shown in in the corresponding GitHub repository.

Networks folder.

Is it possible to select among the following Loss Functions:

python
        # Define Loss Function
        # 'Focal_Loss'
        # 'WCE': Weighted Cross-Entropy
        # 'BCE': Binary Cross-Entropy
        # 'F1_score_Loss'
        # 'F1_score_Loss_dil': Background pixels predicted as cracks (FP) are considered as
        #                      TP if they are a few pixels apart from the annotated cracks
        #                      Refer to the Journal paper for extra clarification
        self.args['loss'] = 'WCE'

Build data

Under the folder dataset there are two sub-folders with the images and the corresponding masks.

Execute the build_data.py to split the dataset into train and validation set and create HDF5 files that can be easily accessed when in Train and Evaluate modes. The output folder will be created and the output files will be stored in the hdf5 sub-folder.

It is noted that the output folder will be created automatically after executing the code.

Use the Build data mode by suitably setting the **[config_class.py](https://github.com/dimitrisdais/crack_detection_CNN_masonry/blo

Issues· 9 开放

查看全部 Issues在 GitHub 打开

暂无开放 Issues,或尚未同步最近议题。

> 标签

Python

暂无评论,来聊聊你的看法吧

> 工具信息

发布日期2026年8月1日
最后更新2026年9月18日
分类编程语言
定价开源

> 相关工具

T
TypeScript
JavaScript 的超集,为前端与全栈提供静态类型
P
Python
通用编程语言,广泛用于 Web、数据与 AI
G
Go
Google 推出的简洁高效系统语言