Classification-based Method for Wall Crack Detection System

It is imperative to ensure that building inspectors have adequate resources and tools to conduct their inspections efficiently and effectively. Relying solely on manual labour to check for wall cracks is inconvenient and may prove inefficient and poor use of time and financial recourses. Besides, there are concerns regarding the need for skilled inspectors due to their limited accessibility and the subjective nature of their evaluations. Previously, image processing and artificial intelligence have been independently utilized to identify wall cracks and estimate their width. However, more can be done when integrating these two approaches to produce a comprehensive solution. This study presented a technique to indicate wall cracks utilizing a pre-trained Convolutional Neural Network (CNN) model called Squeezenet. Then, the following image processing can precisely estimate the width of the cracks in pixels. Based on the total models studied, 78% were successfully detected and classified into their respective crack groups. Although 22% of the remaining models were mistakenly classified, the system still managed to detect the presence of cracks in them accurately. This study only considers analyzing projected cracks categorized as minor, moderate and major. Nevertheless, the discussion does not address the translation of pixel approximations into their respective physical measurements.


Introduction
Wall crack detection in concrete structures is pivotal to ensure the construction's safety, sturdiness and durability.The emergence of cracks at a microscopic level on the wall surface indicates the discontinuities of material which increases distress on the concrete structures [1] [2].These cracks weaken the structure's component, adversely affecting that area's load-bearing capacity.Therefore, earlier detection of cracks may allow any preventive actions to be taken, which can avoid potential failures such as the collapse of the structure, physical injuries or financial loss.
Nevertheless, detecting cracks in wall can be challenging and laborious due to the unpredictable formation caused by various factors, including moisture and thermal movement, movement due to creep and chemical reactions, elastic deformation and settlement of soil [3].Traditionally, onsite structural conditions are evaluated visually by experts based on their experience and proficiency.However, this approach requires specialized skills, is time-consuming, inefficient in terms of cost, and is vulnerable to human error due to the subjective nature of expert evaluations [4] [5].
Since the human-based approach relies entirely on the knowledge and experience of the expert, the quantitative analysis often results in low accuracy.This scenario leads to the extensive development of image-based crack detection [6].While there are many potential applications for image-based analysis, there is necessary to consider investing in high-quality cameras since the captured images are exposed to shadows, inconsistent lighting and uneven wall surfaces [7] [8].Over time, the learning-based method has improved the ability to detect cracks in structures more efficiently [4] [6], along with less processing time than manual approaches and other techniques [5].
This study proposed a wall-crack detecting system that combines a neural network scheme and image processing algorithm to detect, extract and estimate width at a particular point in time.The deep learning part is utilized for crack detection, while the image processing element is employed for crack extraction and width estimation.An Android application has also been developed for crack inspection and database storage on mobile devices.

Literature Review
Infrastructures are paramount in modern civilization, and their longevity and safety are essential for timely maintenance, as they can have severe consequences for the well-being of humankind and properties.However, their structural health can deteriorate over time due to various factors, including natural calamities and external forces, leading to the emergence of cracks [9].This review highlights the composition of crack detection and analysis techniques that can be used to assess the health of buildings, specifically the implementation of image processing and the potential application of learning-based techniques.

Crack detection using image-based technique.
The most significant benefit of image-based crack detection is that the evaluation offers a notable accuracy over traditional manual methods [4] [5]. Figure 1 shows the established general architecture of an image processing method for detecting cracks [4]- [6].The image-based crack detection technique involved: (1) Collect the image datasets by capturing the targeted areas using any highresolution imaging tool.(2) Preprocess the image compilation using appropriate methodologies for image quality enhancement [6] since the cracked images may contain unwanted noises such as shadows, improper illumination, surface scratches and other imperfections.(3) Utilize the crack detection procedures like classification, quantification, object tracking, and edge detection [7] to highlight or segment the cracked part in the image.(4) Crack feature extraction is the step in which the detected cracks are separated based on specific parameters such as length, width and depth, which help determine the severity of the crack and make precise decisions.

Crack detection using learning-based technique.
According to [8], varying conditions in the real world, like stains, shadow and illumination, can result in the difficulty of single-handedly adopting image-based techniques.Hence, a robust decision-making tool is essential to facilitate efficient analysis of the crack conditions, which fills in the gap between crack detection and experts' decisions regarding the situation.Researchers are moving towards neural network algorithms to enhance the performance of image-based crack detection techniques.The review by [6]

Methodology
The following methodology provides a detailed framework to address the structure of the proposed solution for wall crack detection.These include building and organizing the dataset used to train the model, training the model, and utilizing the model's output to estimate the width of cracks.

Crack modelling.
To initially analyze the significance of the proposed solution, two testing models were built to differentiate between cracked and non-cracked walls, as shown in Figure 3 below.The non-cracked model was marked by a line to confirm that the proposed method was accurately detected.The testing models are a wall-like structure to make a model with different types of backgrounds, such as noise and rough surfaces, to mimic a natural wall condition when testing is done.Squeezenet is a deep learning architecture specifically designed to provide high accuracy with significantly fewer parameters than what is typically required for traditional Convolutional Neural Networks (CNNs) [10].The leading motivation behind Squeezenet is to reduce the model size, making it more suitable for resource-constrained environments without compromising the system's accuracy.In this study, it is used to construct the CNN Image Classifier.
Next, performing subsequent operations on images using MATLAB software is the most straightforward tool for image processing and analysis.With its extensive features and functions, MATLAB software provides an accessible approach to image operations, such as image enhancement, filtering, segmentation, object detection, and more, making it easier to explore and understand.

Crack detection process.
Figure 4 illustrates the crack detection process using a personal computer.Upon starting the program, a preview window will appear showing the webcam prompt, and the trained Squeezenet model will be loaded from a file to classify the image.Once the image is loaded (from the personal computer webcam), Squeezenet will be utilized to detect the cracks.
If a crack is detected, the image will be converted to grayscale using a global thresholding technique to facilitate the process of image analysis.Then, the next step involves converting the image into a black-and-white representation to construct a binary image, leaving the cracks pixel values assigned to 1 (white) and the background pixel values to the value of 0 (black).Following this, a morphological opening operation is performed.The morphological opening procedure moves small items in the often represented by bright pixels, to the background.After applying morphological opening, the program can calculate the crack's area and width, enabling the display of its severity in the graphical user interface (GUI).If no crack is detected, the program will indicate "no crack detected" and be ready to load another image.

Crack detection process using Android smartphone.
The procedures of crack detection using an Android application differ primarily in the input data loading, where integration with PostgreSQL is required for storing captured images in the employment system.Once a cracked image is classified, the detected image is converted into a black-and-white (binary) image using the global thresholding technique.This approach selects a threshold value that separates the values of the image's pixels into 0 or 1 [11].After binarization, a morphological operation is applied to the binary image."Area opening" is performed, which removes objects (or connected components) in the image that are smaller than a specific pre-defined size, making it cleaner and easier to work with.The binarization and morphological operation helped to maintain the crack line's continuity while eliminating minor artifacts that might interfere with the width measurement.In this study, the severity of the cracked wall is concluded based on the width area (pixels, ), where: minor is  < 10, moderate is  < 15, and major is  ≫ 15.

Results and Discussions
The study aims to develop a technique for identifying wall cracks by integrating crack width calculation and severity evaluation.This learning-based method allows for the early elimination of non-cracked walls during image processing and analysis.Following this approach will accelerate the time consumed during the inspection procedure, thus improving the efficiency of wall crack detection.
All three input models for non-cracked conditions have been successfully identified.In this case, it is necessary to acknowledge that these models were determined to be in good condition despite having a mark on them.The presence of a mark or any visible indicator does not imply that the wall is cracked.These results assured the accuracy and reliability of the proposed method in characterizing non-cracked walls are indeed performing well.Figure 6 shows an example of the display result for a non-cracked wall.   1 presents the number of cracked models and the performance of the crack wall detection and classification results.Based on the total models studied, 78% were successfully detected and accurately classified into their respective crack groups.Unfortunately, there is a concern as the remaining 22% were inaccurately classified despite the system correctly identifying the presence of cracks in them.
During the development of a wall crack detection system, there might be challenges to overcome, such as the direction of lighting conditions for data collection, wall textures, and the complexity of cracks' orientation.However, in many cases, the image preprocessing technique plays a crucial role in determining the overall outcome of the analysis, as the measurements and subsequent analysis stages rely specifically on the identified segmented areas [12].In this study, while the global thresholding technique can achieve fast and precise detection of wall cracks, it is essential to consider the presence of various noisy pixels caused by rough background textures and varying lighting conditions during the data acquisition process.
Furthermore, the performance of any learning-based model heavily relies on the quantity and diversity of the training data sets [13].If the training data does not sufficiently represent all possible variations of crack widths and their corresponding severity categories, the system may struggle to categorize the cracks model studied.In this study, large data sets and a long-term data collection phase are unfeasible due to the time frame.Consequently, it has contributed to these misclassifications results.

Conclusion
By leveraging both image and learning-based techniques, the proposed system can swiftly identify non-cracked and cracked walls, proceed to calculate crack width and classify them into their pretrained categories.This approach can bring about a more efficient wall crack detection solution, potentially offering significant advantages regarding structural vulnerabilities, which enhances building safety.
To further ensure a system's robustness in the future, it is suggested that resourceful data augmentation and advanced model architectures should be utilized to handle such challenges effectively.

Figure 1 .
Figure 1.The architecture of image-based crack detection concluded that learning-based techniques provide better accuracy with less processing time than pure image-based crack detection approaches.Machine learning and deep learning algorithms depend heavily on the architecture of their training layers to perform feature extraction, which consequently decides which attributes are relevant for characterizing crack detection [4][6].This prior feature extraction functionality required big input datasets to train the learning model in advance.Figure2shows the general stages of a learning-based crack detection system framework [4][6].

Figure 2 .
Figure 2. The general stages of a learning-based crack detection system framework

Figure 3 .
Figure 3. Crack modelling for testing 3.1.1.Dataset preparation and classification.The availability of the open-source data set played an essential role in generating the learning-based method.A variation of images in the Cracked Class with varied cracks' width and diverse background noises like smudges and uneven surfaces are used to train the learning-based model.This training and validation data set of images is divided into two new datastore consisting of 4017 non-cracked and cracked wall images each.Squeezenet is a deep learning architecture specifically designed to provide high accuracy with significantly fewer parameters than what is typically required for traditional Convolutional Neural Networks (CNNs)[10].The leading motivation behind Squeezenet is to reduce the model size, making it more suitable for resource-constrained environments without compromising the system's accuracy.In this study, it is used to construct the CNN Image Classifier.Next, performing subsequent operations on images using MATLAB software is the most straightforward tool for image processing and analysis.With its extensive features and functions, MATLAB software provides an accessible approach to image operations, such as image enhancement, filtering, segmentation, object detection, and more, making it easier to explore and understand.

Figure 4 .
Figure 4. Crack detection process using a personal computer

Figure 5
Figure5explains the block diagram of the Android application, showcasing the process of sending images to the PostgreSQL database and giving feedback on crack detection from the MATLAB analysis.The results will be communicated with PostgreSQL, enabling them to be displayed in the GUI.

Figure 5 .
Figure 5. Block diagram of input data in the Android application 3.3.Width calculation and crack severity detection.Each tested model (non-cracked, minor, moderate and major cracked modelling) has three representative input sets to ensure the model's generality and robustness.The repetition of testing with different inputs is essential because the nature of cracks can be unique, and the proposed technique needs to demonstrate its ability to detect cracks under different conditions, such as cracked pattern, width and background surfaces.Once a cracked image is classified, the detected image is converted into a black-and-white (binary) image using the global thresholding technique.This approach selects a threshold value that separates the values of the image's pixels into 0 or 1[11].After binarization, a morphological operation is applied to the binary image."Area opening" is performed, which removes objects (or connected components) in the image that are smaller than a specific pre-defined size, making it cleaner and easier to work with.The binarization and morphological operation helped to maintain the crack line's continuity while eliminating minor artifacts that might interfere with the width measurement.In this study, the severity of the cracked wall is concluded based on the width area (pixels, ), where: minor is  < 10, moderate is  < 15, and major is  ≫ 15.

Figure 6 .
Figure 6.Display result for a non-cracked wall model

Table 1 .
In general, the proposed technique successfully estimates crack width and classifies them as minor, moderate and major cracks.Nevertheless, some models have experienced misclassification into different severity classes due to inaccuracies in the width calculation, as depicted in Table1.Result of cracked walls model