1. Introduction
Cracks are among the most commonly observed defects in civil engineering structures [
1], and they are an important indicator of structural deterioration [
2]. If they are left unaddressed, crack propagation can ultimately lead to severe structural damage or catastrophic collapse [
3]. Therefore, early crack detection through regular inspection and timely maintenance is essential for predicting deterioration trends and extending the service life of structures [
2,
4]. Traditionally, manual inspection has been employed for periodic structural assessments [
2]. However, these inspections require trained experts and specialized equipment, making the process time-consuming, labor-intensive, and costly [
5]. Moreover, the reliability of inspection outcomes is often influenced by the inspector’s expertise and experience [
3,
5]. To overcome these limitations, automated crack detection methods have attracted increasing attention, including image processing techniques [
6] and machine learning-based approaches [
7,
8]. However, their performance is often affected by changes in image illumination conditions, and they may have difficulty extracting complex and discriminative features from crack images [
6,
7,
9].
Recently, Convolutional Neural Network (CNN)-based deep learning methods have been increasingly applied to crack detection. Bui et al. reported that deep learning-based methods, including CNN and recurrent neural networks, achieved superior object recognition performance compared with conventional machine learning-based methods such as random forest, support vector machine and SP-HPM [
10]. Liu et al. adopted a U-Net-based approach [
11] for concrete crack detection, demonstrating high efficiency, strong robustness and higher accuracy than conventional fully convolutional networks (FCNs) [
12]. In particular, U-Net effectively preserves detailed spatial information through its encoder–decoder structure and skip connections, and it has been widely used in the field of biomedical image segmentation, where it shows excellent performance. Thus, CNN-based methods have shown excellent performance in pixel-level image segmentation tasks such as crack detection. Khan et al. utilized a model based on Nested U-Net (U-Net++) [
13], an extended variant of U-Net, to improve fine crack detection performance in images captured by drones and handheld cameras. In particular, by incorporating an efficient encoder, residual blocks [
14], and a convolutional block attention module (CBAM) [
15] into an Efficient Nested Res-U-Net structure, they achieved both high crack segmentation performance and computational efficiency [
2]. However, existing crack detection studies have mainly focused on asphalt [
16] or concrete structures [
5,
11,
17,
18], using either a single dataset or a combined dataset of these two materials [
19]. Unlike asphalt and concrete structures, tunnel environments [
20] present challenging conditions, such as low illumination and non-uniform lighting, and have therefore been treated as separate research. For these reasons, studies that integrate asphalt, concrete, and tunnel environments for unified training and analysis remain limited.
In addition, drone-based approaches for efficiently capturing large structural areas and detecting cracks have recently attracted increasing research attention [
2,
18]. Drone-based imaging enables the safe and efficient acquisition of crack images from structures that are difficult to access; however, crack segmentation performance can be degraded by variations in imaging distance, illumination, shadows, and complex backgrounds [
18]. Therefore, in this study, we train the proposed model using an integrated drone-captured crack dataset consisting of asphalt, concrete, and tunnel environments, and propose a Dense U-Net++-based model that achieves stable crack segmentation performance across diverse environments and imaging conditions.
The main contributions of this study are summarized as follows:
We constructed a comprehensive dataset by integrating crack images captured from asphalt, concrete, and tunnel environments.
We propose a Dense U-Net++-based crack segmentation network that integrates nested skip connections with dense blocks to enhance feature representation.
The proposed model effectively fuses encoder and decoder features, enabling accurate restoration of crack shapes and boundary details.
The proposed model achieves stable crack segmentation performance across various structural surfaces, complex backgrounds, illumination changes, and imaging conditions.
The remainder of this paper is organized as follows.
Section 2 describes the proposed Dense U-Net++-based crack segmentation framework and the integrated dataset used in this study.
Section 3 presents the experimental setup, evaluation metrics, and comparative results.
Section 4 discusses the experimental findings and provides further analysis. Finally,
Section 5 concludes the paper and discusses potential directions for future research.
2. Proposed Methodology
In this study, we introduce a crack detection model for drone-captured images acquired from asphalt, concrete, and tunnel environments. The main objective of the proposed method is to achieve stable crack segmentation across various structural surfaces, complex backgrounds, illumination variations, and imaging conditions.
Figure 1 illustrates the overall workflow of the proposed method, including drone-based image acquisition, crack image collection from different environments, model-based crack segmentation, and crack mask generation.
2.1. Preprocessing
Image preprocessing is a crucial step in applying deep learning models to image analysis tasks [
21]. To improve the efficiency and performance of model training, we performed a three-stage preprocessing technique. Drone-acquired images are typically high-resolution to capture detailed crack morphology. Therefore, without appropriate preprocessing, the computational load of the model can increase substantially. To address this issue, (1) we first cropped the original images into patches of 1024 × 1024 pixels. (2) The extracted patches were then resized to 256 × 256 pixels to match the model input size and improve computational efficiency. Directly cropping the original drone images to 256 × 256 would generate an excessive number of patches per image, increasing the computational burden, and would fragment individual cracks across multiple patches, hindering the learning of their continuous morphology. The resized patches preserved the overall crack patterns, allowing them to be classified into crack-containing and non-crack patches. Many of the generated patches contain only background without visible cracks. As a result, using all generated patches for training may lead to a class imbalance problem. (3) Therefore, crack-containing patches were selected to construct the final training dataset.
2.2. Focal Loss
Crack segmentation aims to identify crack regions within an image at the pixel level. In general, crack pixels occupy only a small proportion of the entire image. Therefore, when cross-entropy loss is used, the model tends to be biased toward the dominant background class, resulting in a severe class imbalance problem between background and crack pixels. To alleviate this issue, focal loss was adopted as the loss function. As shown in Equation (1), focal loss extends cross-entropy loss by assigning greater importance to hard-to-classify samples, which is particularly effective for detecting thin and boundary-ambiguous cracks.
Here, is the probability predicted by the model for the crack class, and is the focusing parameter that reduces the loss contribution of easily classified background pixels. As the predicted crack probability increases, the term becomes small, thereby reducing the loss contribution of easily classified pixels. In contrast, when the predicted crack probability is low, this term remains large, allowing the model to focus more on difficult crack pixels. In this way, the model reduces the influence of easily classified pixels and focuses more on crack regions that are prone to misclassification.
In addition, is a weighting factor used to address class imbalance. A larger weight is assigned to the crack class, which contains fewer pixels, whereas a smaller weight is assigned to the background class. This balances the loss contribution between the two classes. As a result, focal loss accounts for both classification difficulty and class imbalance, rather than treating all pixels equally. This improves the detection of crack regions, which occupy only a small portion of the image.
2.3. Dense U-Net++ Architecture
The proposed model is a crack segmentation network that integrates the nested skip-pathways design of U-Net++ with dense convolutional blocks inspired by DenseNet [
22]. This architecture connects the encoder and decoder through nested skip pathways to enhance feature propagation. Unlike conventional skip connections that directly transfer encoder features to the decoder, U-Net++ uses nested and dense skip pathways to reduce the semantic gap between encoder and decoder features and to improve multi-scale feature learning. From the perspective of crack segmentation, cracks appear at varying scales and often exhibit low contrast against the background, where both multi-scale feature fusion and a reduced semantic gap are effective for accurate detection. Building upon this U-Net++ backbone, we introduce dense connections into the convolutional blocks within the skip pathways, allowing features from previous stages to be reused. This strengthens feature propagation, improves representation capability, and helps preserve fine crack details.
Figure 2 illustrates the architecture of the proposed Dense U-Net++ model, including the nested encoder–decoder structure, dense skip pathways, and dense convolutional blocks used for feature refinement.
2.3.1. U-Net++-Based Crack Detection Algorithm
This dataset consists of crack images collected from different surface materials and imaging environments. Surface texture, image contrast, and crack size and morphology vary across different environments. In particular, drone-captured images often include variations in acquisition distance and viewing angle, resulting in cracks appearing at different scales. To address variations in environments and scales, U-Net++ adopts nested skip connections instead of the single skip connections used in the conventional U-Net. Each node receives encoder features from the same depth and up-sampled decoder features from lower levels. This nested structure progressively fuses multi-depth features between the encoder and decoder. Compared with single-scale feature representations, this design captures crack information across different environments and spatial scales more effectively. By learning multi-scale features during training, the model achieves more stable crack segmentation under challenging conditions, including rough asphalt textures and low-contrast cracks in concrete and tunnel environments.
2.3.2. Dense Blocks in the Skip Pathways
Dense blocks were originally introduced in DenseNet. They are configured such that each layer receives and concatenates the feature maps from all preceding layers [
22]. By accumulating and reusing features from preceding layers, dense blocks improve parameter efficiency and alleviate the vanishing-gradient problem in deep networks. This helps maintain stable gradient propagation during training. In this study, dense connections were incorporated into the skip pathways of U-Net++. The original skip pathways, which consist of standard convolutional layers, are replaced with dense convolutional blocks. These dense skip pathways help reduce the semantic gap between encoder and decoder features. Encoder features preserve spatial details but contain limited semantic information. Decoder features, in contrast, are semantically rich but often lose fine details because of their low spatial resolution. The dense convolutional blocks progressively integrate skip features with up-sampled decoder features instead of relying only on simple concatenation. Repeated feature fusion and refinement enhance crack boundary reconstruction. As a result, fine crack boundaries can be reconstructed more accurately, enabling crack regions to be distinguished even in noisy or low-contrast environments.
2.4. Postprocessing with Connected Components
During crack segmentation, the model may detect not only actual crack regions but also surrounding noise caused by the imaging environment. Such noise can result from illumination non-uniformity, surface contamination, and shadows, and it appears in the detection results as small point-shaped objects unrelated to actual cracks, becoming a major cause of false positives (FP). To alleviate this, we performed a postprocessing technique. Connected component analysis was performed on the output mask of the model to compute the area of each object. Objects with an area of 10 pixels or less were judged to be noise and removed. The threshold was determined experimentally and set conservatively so that point-shaped noise could be suppressed without reducing the recall of the model. Because cracks have a thin, long, continuous shape with an area above a certain level, whereas noise appears as independent point shapes with a very small area, area-based filtering can effectively distinguish cracks from noise. Through this postprocessing technique, FP were reduced and detection performance was improved.
2.5. Evaluation Metrics
To evaluate the proposed method, the segmentation results were quantitatively assessed using several metrics. After all models were trained on the same dataset and computing environment, the performance of Mask R-CNN, the proposed Dense U-Net++, and Dense U-Net++ with postprocessing was compared.
The confusion matrix is a tool for evaluating the performance of segmentation models and shows the relationship between predicted values and actual observed values. It provides valuable insights into model performance across various categories and helps identify potential types of errors. In this evaluation, precision, recall, F1-score, and IoU were used to compare the results of the models. Each metric was calculated for the crack and background classes separately, as defined in Equations (2)–(5), and then averaged over the two classes to obtain the macro-averaged value. The metrics were computed for each of the 200 test images and averaged over all test images. Therefore, the values reported correspond to the macro-averaged metrics across the two classes and the 200 test images. Precision represents the proportion of samples that are actually positive among all cases predicted as positive, as shown in Equation (2). A higher value indicates that the model more effectively suppressed FP, thereby reducing the misclassification of background regions and noise as cracks.
Recall quantifies the proportion of actual positive samples that the model correctly identified, as shown in Equation (3). A higher value indicates that the model detected more actual crack regions with fewer missed detections.
The F1-score is the harmonic mean of precision and recall, and it was used to consider the performance of both metrics simultaneously, as shown in Equation (4). A high value indicates that the model achieved a balanced performance between suppressing false positives and detecting crack regions.
The IoU measures the overlap between the predicted crack region and the ground-truth region relative to their union, as shown in Equation (5). A high value indicates that the predicted mask closely matches the ground truth in both extent and position, since IoU simultaneously penalizes false positives and false negatives.
For all evaluation metrics, 1 denotes the highest score, and values closer to 0 denote lower performance. Here, true positives (TP) denote samples correctly predicted as positive, FP denote negative samples incorrectly predicted as positive, and false negatives (FN) denote positive samples incorrectly predicted as negative [
18,
23,
24].
4. Discussion
To analyze the performance of the proposed method in detail, the box plot distributions in
Figure 3 and the quantitative results in
Table 3 were compared.
4.1. Performance Analysis of Individual Methods
As shown in
Figure 3a, the proposed method showed the highest precision and the narrowest distribution. These results indicate that the method with postprocessing consistently maintained low false positives across most test samples. These results further suggest that area-based filtering can stably remove noise regardless of variability between samples. As shown in
Figure 3b, the recall distributions of Dense U-Net++ and Dense U-Net++ with postprocessing appeared similar. This finding suggests that removing objects with an area of 10 pixels or less during postprocessing suppressed background false positives while preserving actual crack regions, so that the macro-averaged recall was maintained. In other words, postprocessing achieved an efficient trade-off that increases precision without sacrificing recall. As shown in
Figure 3c, the highest F1-score and the narrowest distribution confirm that precision and recall improved in a balanced manner. This indicates that, on the evaluated test images, the proposed method is not biased toward any particular metric and achieved the highest overall detection performance among the compared methods. As shown in
Figure 3d, the proposed method also achieved the highest IoU, indicating that the predicted crack masks overlap more closely with the ground truth in both extent and position. Since IoU penalizes false positives and false negatives simultaneously, this result confirms that the improvement is not limited to a single aspect of the prediction but reflects a more accurate reconstruction of the overall crack regions. In contrast, Mask R-CNN showed the lowest performance and the widest distribution across all four metrics. This observation suggests that the instance segmentation-based Mask R-CNN is relatively weak at precisely capturing, at the pixel level, the boundaries of cracks that have thin and irregular shapes. This limitation is considered to arise from the fact that Mask R-CNN is optimized for instance-level bounding box-based detection and is structurally unsuited to handling thin, continuous linear structures.
4.2. Comparison Results Among Different Methods
The fact that Dense U-Net++ showed higher performance than Mask R-CNN demonstrates that the U-Net++-based structure, which effectively fuses multi-scale features through nested skip pathways and dense connections, is more suitable for precisely segmenting thin and irregularly shaped cracks at the pixel level than Mask R-CNN, which detects objects on an instance basis. In addition, the fact that the model with postprocessing applied showed the highest performance means that area-based filtering effectively removed noise-induced FP in the background class while preserving the correctly detected crack regions, thereby improving the macro-averaged performance. As a result, the proposed method also recorded the highest F1-score, which considers precision and recall simultaneously, confirming that it possesses a balanced ability to reduce misclassification and to detect cracks without omission.
4.3. Limitations and Future Work
The postprocessing technique used in this study adopts a fixed threshold approach that uniformly removes objects with an area of 10 pixels or less. Such a fixed threshold can effectively remove most point-shaped noise, but there is a risk that fine cracks at an early stage or some regions of actual cracks that start very thin may be removed together if they have an area similar to noise. This can act as a limitation that degrades detection accuracy at the early stage before a crack has sufficiently progressed. To address this, future research will introduce an adaptive postprocessing technique that, instead of an area-based fixed threshold, also considers the morphological features of cracks (e.g., length, curvature, continuity), or a learning-based noise classification module, to more precisely distinguish noise from actual early-stage cracks. In addition, this study relies on a single self-constructed dataset. As a result, there is a limitation that the generalization performance of the model on external data has not been verified. In future research, cross-dataset validation using publicly available crack datasets or external datasets collected by other institutions will be performed to secure the robustness of the model against various data distributions. In addition, the scope of the experimental evaluation was limited. The primary objective of this study was to construct a crack detection system that operates consistently on a unified dataset spanning asphalt, concrete, and tunnel environments, rather than to identify the optimal segmentation architecture. Accordingly, performance comparison with various models and exploration of the optimal model configuration were beyond the scope of this study. The model was also evaluated only on crack-containing patches under nominal imaging conditions, so its false-alarm behavior on crack-free surfaces and its resilience to perturbations such as motion blur and exposure changes remain to be verified. These aspects will be addressed in future work.
5. Conclusions
In this study, we proposed a Dense U-Net++-based model trained on an integrated crack dataset containing asphalt, concrete, and tunnel images. By combining dense connections with the nested skip connections of U-Net++, the model reduced the semantic gap between the encoder and decoder and improved multi-scale feature fusion. Focal loss was used to address class imbalance, and area-based postprocessing was applied to remove detection noise.
Experimental results showed that the proposed method achieved a precision of 95.47%, a recall of 92.35%, an F1-score of 93.91%, and an IoU of 88.58%, outperforming the evaluated comparison models across all evaluation metrics. Compared with Mask R-CNN, the F1-score and IoU improved by 4.56% and 7.75%, respectively. Postprocessing substantially improved precision with little effect on recall, indicating effective suppression of false positives. Visual evaluation on the test images also showed reliable crack detection under the evaluated conditions, including rough asphalt textures, striped concrete surfaces, and low-illumination tunnel images. A limitation of this study is that the postprocessing step relies on a fixed area threshold, which may remove small early-stage cracks. In addition, the scope of the experimental evaluation was limited. The primary objective of this work was to construct a crack detection system that operates consistently on a unified dataset spanning asphalt, concrete, and tunnel environments, which have conventionally been studied separately, rather than to identify the optimal segmentation architecture for this task. Accordingly, performance comparison with various models, exploration of the optimal model configuration, and validation on publicly available crack datasets were beyond the scope of the present study. The model was also evaluated only on crack-containing patches under nominal imaging conditions, so its false-alarm behavior on crack-free surfaces and its resilience to perturbations such as motion blur, exposure changes, and altitude variations remain to be verified. Reliable detection of early-stage cracks and generalization across diverse structural environments therefore remain key challenges.
Future work will address these issues through adaptive postprocessing that incorporates crack morphology, comparative evaluation against recent architectures with systematic ablation studies, cross-dataset validation using publicly available crack datasets, assessment on crack-free surfaces, and controlled robustness analyses under synthetic perturbations.
Overall, the proposed Dense U-Net++ model achieved promising crack segmentation performance across different structural surfaces and imaging conditions, demonstrating its potential for automated structural inspection and maintenance applications.