Skip to Content
DronesDrones
  • Article
  • Open Access

23 December 2025

20 Pages

EMAFG-RTDETR: An Improved RTDETR Algorithm for UAV-Based Concrete Defect Detection

,
,
,
,
,
,
and
1
College of Traffic and Transportation, Chongqing Jiaotong University, Chongqing 400074, China
2
School of Mechantronics and Vehicle Engineering, Chongqing Jiaotong University, Chongqing 400074, China
3
Chongqing Huashu Robotics Co., Ltd., Chongqing 401147, China
*
Author to whom correspondence should be addressed.

Highlights

What are the main findings?
  • We propose and validate the efficient detection algorithm EMAFG-RTDETR: By incorporating the EMA-PRepFaster module and the Gather-and-Distribute feature fusion mechanism, this algorithm achieves an average accuracy (mAP@0.5) of 90% on concrete defect datasets while simultaneously reducing both model complexity and computational load.
  • The algorithm has been successfully deployed on an unmanned aerial vehicle platform for field operations: The optimized algorithm was implemented on an in-house developed high-payload octocopter drone. Field validation demonstrates that the system accurately identifies cracks and spalling defects on concrete surfaces, effectively balancing inspection precision with real-time performance requirements.
What is the implication of the main finding?
  • This study provides an effective “hardware–software co-optimization” solution to address the conflict between the limited computational resources of unmanned aerial platforms and the demand for high-precision detection algorithms, significantly enhancing the feasibility and reliability of automated infrastructure inspections.

Abstract

To address the challenges of varying scales of concrete defects, class imbalance, and hardware limitations, we propose EMAFG-RTDETR, a UAV-based concrete defect detection algorithm built upon RTDETR. In the feature extraction stage, a lightweight multi-scale attention feature extraction module (EMA-PRepFaster block) is designed, where PConv and RepConv are fused to improve the FasterNet block. At the same time, an Efficient Multi-scale Attention (EMA) module is introduced to enhance spatial feature extraction while reducing computational redundancy. For feature fusion, the Gather-and-Distribute mechanism of GOLD-YOLO is adopted to improve the fusion of multi-scale features. The introduction of Powerful-IoU v2 not only accelerates the training process but also enhances the model’s ability to capture defects of different sizes. To handle the issue of sample imbalance, a novel classification loss function, EMASVLoss, is proposed. This function adjusts classification loss values through piecewise weighting and integrates an exponential moving average mechanism for dynamic weight smoothing, improving model adaptability. Finally, the algorithm was deployed and validated on an octocopter UAV developed by our team. Experimental results demonstrate that EMAFG-RTDETR achieves a 2.5% improvement in mean Average Precision (mAP@0.5), reaching 90% on the concrete defect dataset, with reductions in both parameter size and computational cost. Moreover, the UAV equipped with the proposed algorithm can accurately detect cracks and spalling defects on concrete surfaces, validating the effectiveness of the improved model.

1. Introduction

China’s concrete construction ranks among the world’s largest in scale, yet long-term use often leads to defects that threaten structural safety. Therefore, early detection of concrete defects is crucial for ensuring durability and public safety. Traditional concrete inspection relies on manual labor, resulting in low efficiency and high subjectivity, which no longer meets current demands. Advancements in computer technology have given rise to machine vision-based inspection methods, offering superior solutions [1]. Concurrently, the rapid development of mobile platforms such as drones and intelligent vehicles provides more advanced alternatives to traditional manual inspection.
For instance, He et al. [2] proposed a UAV-based road crack detection algorithm (MUENet), where UAVs are used to collect road data, which are then processed on cloud servers, rather than in real time. Gao et al. [3] developed ARD-Unet for pixel-level crack detection in UAV remote sensing images and further integrated it with UAVs to build an IoT-based UAV road crack detection system. Owing to their flexibility and rapid mobility, UAVs have been widely applied in infrastructure inspection, enabling full-coverage monitoring of target structures.
Nevertheless, UAV platforms have limited payload capacity, making it challenging to directly deploy high-precision detection algorithms. At present, two main detection schemes are commonly adopted: (1) UAVs collect data and transmit them to high-performance devices for offline analysis, which compromises timeliness and fails to enable immediate localization and maintenance of defects; (2) lightweight detection algorithms are directly deployed on UAVs to improve real-time performance, but the limited onboard computational resources often lead to reduced detection accuracy. To address this issue, our team has developed an octocopter UAV with enhanced payload capacity, capable of carrying more powerful computing devices. This enables the selection and deployment of the most accurate real-time detection algorithms according to computational configurations, effectively balancing the trade-off between detection accuracy and real-time performance.
Mainstream object detection algorithms can be divided into two categories according to their detection pipeline. The first category is two-stage detection algorithms, which first generate region proposals and then perform classification and localization within candidate regions. Representative methods include R-CNN [4], Fast R-CNN [5], and Faster R-CNN [6]. However, the generation of a large number of bounding boxes reduces detection efficiency, and the models are typically heavy with slow inference speeds, making them unsuitable for deployment on edge devices or in resource-constrained environments.
The second category is single-stage detection algorithms, which directly perform classification and regression from feature maps without a region proposal stage. Representative methods include the YOLO series [7], SSD [8], EfficientDet [9], and RefineDet [10]. Compared with two-stage approaches, single-stage algorithms demonstrate significant advantages in computational efficiency and detection speed, making them more suitable for real-time applications. For example, Su et al. [7] proposed the Maintenance of Original Data Separable Convolution (MODSConv) to enhance channel interactions within YOLO’s feature layers, thereby improving crack detection performance. Xu et al. [11] introduced a lightweight YOLO model for crack segmentation and quantification in concrete structures using pruning and knowledge distillation, which maintained accuracy while reducing model complexity.
To further overcome the performance bottlenecks of existing algorithms in object detection tasks, researchers have begun to focus on the core advantage of the Transformer architecture—its ability to capture global contextual information—and have introduced it into the object detection domain to enhance detection performance. Baidu proposed the real-time object detection algorithm RTDETR (Real-Time Detection Transformer) [12], which integrates key innovations such as an efficient hybrid encoder and an IoU-aware query mechanism, effectively ensuring real-time performance in detection tasks. However, despite its notable success in improving real-time detection, RTDETR still faces challenges related to high computational cost and large parameter size, which hinder its deployment efficiency. Moreover, when applied to concrete defect detection, RTDETR exhibits limitations in detecting multi-scale defects with high accuracy and is easily affected by complex backgrounds, thereby constraining its effectiveness in this specific domain.
Therefore, considering the above factors, the use of drones for concrete defect detection tasks still presents significant potential for development alongside considerable challenges. These primarily include:
(1)
Limited payload capacity of drone platforms prevents the integration of high-performance algorithm boards, making it difficult to directly deploy high-precision detection algorithms.
(2)
The scale of concrete defects varies with severity; crack defects span widely with significant differences in aspect ratio; exposed reinforcement defects often co-occur with spalling defects, making differentiation challenging.
(3)
Drones conducting on-site inspections are susceptible to the influence of lighting conditions.
To address the limitation of UAV payload capacity, our team independently developed an octocopter UAV with enhanced load capacity, capable of carrying high-performance computing boards to provide a powerful hardware platform for deploying detection algorithms. To tackle the challenges in concrete defect detection, this paper proposes improvements to the real-time Transformer detector RTDETR. The main contributions are as follows:
  • Lightweight Multi-Scale Attention Feature Extraction Module (EMA-PRepFaster block): RepConv is used to improve FasterNet, achieving model lightweighting and enhancing inference speed. Meanwhile, the EMA module is introduced, which leverages cross-dimensional interactions to effectively preserve multi-scale feature information, thereby improving detection and recognition of multi-scale defects while further reducing computational overhead.
  • Improved Feature Fusion Module: Inspired by the Gather-and-Distribute mechanism in Gold-YOLO, the feature fusion module is optimized to strengthen multi-scale feature aggregation while enhancing intermediate-layer feature interactions.
  • Optimized Loss Functions: The EMASVLoss (EMA-Slide-VarifocalLoss) is adopted to replace the original classification loss (VFL), and PIoU v2 is used in place of the original GIoU loss, thereby improving classification accuracy and bounding box regression precision.

2. Methodology

2.1. Model Overview

RTDETR (Real-Time Detection Transformer) [12], proposed by Baidu’s research team, is the first real-time end-to-end object detection model. It overcomes the limitations of traditional detection models by addressing inference latency caused by the YOLO series’ reliance on non-maximum suppression (NMS) and resolving the slow convergence and high computational demands of the original DETR model. This results in a synergistic improvement in both detection accuracy and inference speed.
The RTDETR architecture primarily consists of three components: the backbone network, the Efficient Hybrid Encoder, and the Transformer Decoder equipped with auxiliary prediction heads. The backbone network extracts features from 640 × 640 input images via convolutional layers, pooling layers, and ResNet blocks, producing three levels of feature maps—80 × 80, 40 × 40, and 20 × 20—from shallow to deep. The hybrid encoder processes deep feature maps using Attention-Based Intra-Scale Feature Interaction (AIFI) and passes the resulting multi-scale feature information to the Cross-Scale Feature Fusion Module (CCFM) for integration. Finally, uncertainty-minimal query selection is applied to provide features that are more conducive to accurate classification and precise localization. The decoder then generates bounding boxes and class labels, completing the detection process.
Currently, RTDETR has released multiple variants, including R18, R34, R50, R101, L, and X. Due to the complex and variable environments in UAV-based concrete defect detection and the constraints of model scale, the RTDETR-R18 variant, with fewer parameters, was selected as the base network for optimization. Its model architecture is shown in Figure 1.
Figure 1. Overall Framework of the Original Model RTDETR-R18.

2.2. Improving the RTDETR Algorithm

To enhance the accuracy of concrete defect detection, this paper improves the RTDETR model in the following three aspects:
(1)
The lightweight multi-scale attention feature extraction module EMA-PRepFaster block replaces the ResNet block in the backbone network. This enhances the model’s detection and recognition capabilities for multi-scale objects while achieving a degree of lightweight optimization.
(2)
To further enhance the model’s detection capability for multi-scale defects, the feature fusion module is improved by integrating the Gather-and-Distribute mechanism from Gold-YOLO [13]. This not only strengthens the fusion of multi-scale features but also enhances the fusion capability of partial information in intermediate layers.
(3)
For the loss functions, the original model’s classification loss VFL is replaced with the EMASVFL loss function, and the original model’s GIOU is replaced with the PIoU v2 loss function to improve classification accuracy and bounding box regression accuracy. The improved model architecture is shown in Figure 2.
Figure 2. Overall Framework of the Improved Model.

2.2.1. PRepFasterNet Module Design

In practical applications, due to hardware limitations of drone deployment platforms, detection models must be lightweight and low-latency. While ensuring compactness, maximizing detection accuracy is essential. Therefore, RTDETR-R18 serves as the base model, offering high detection precision. However, the original model performs extensive redundant computations during feature extraction, increasing computational load.
To enable edge deployment, Chen et al. proposed the FasterNet architecture [14]. This approach replaces standard convolutions with partial convolutions (PConv). PConv performs conventional convolutions only on cp channels of the input feature map (dimension h × w × c), leaving the remaining channels unchanged. This reduces computational load without sacrificing accuracy, thereby accelerating processing speed.
To further enhance model performance, the PRepConv module is proposed, which integrates PConv and RepConv [15]. During training, it employs a multi-branch parallel structure to capture multi-scale features through branches with distinct receptive fields. By incorporating PConv’s partial-channel convolution mechanism, it performs regular convolution only on key channel subsets. This approach preserves feature expression capabilities while effectively reducing computational overhead, enabling the model to learn more optimal weight parameters. During inference, based on structural reparameterization theory, the multi-branch structure from training is equivalently converted into a single convolutional branch. This eliminates inference delays caused by multiple branches while fully preserving feature extraction capabilities, significantly improving model inference efficiency. Its structure is shown in Figure 3. After applying PRepConv to enhance FasterNet, the model achieves lightweight optimization without compromising accuracy. A comparison between the original and enhanced FasterNet is shown in Figure 4.
Figure 3. Schematic Diagram of PConv and P-RepConv Module: (a) PConv; (b) P-RepConv.
Figure 4. FasterNet block and PRepFasterNet block: (a) FasterNet block; (b) PRepFasterNet block.

2.2.2. Introducing the Multi-Scale Attention Module EMA

The primary defects in concrete include cracks, exposed reinforcement, and spalling. These defects commonly exhibit significant multiscale variations and morphological irregularities, and are easily affected by surface texture and environmental factors. Cracks span a wide range of scales with scattered patterns, exposed reinforcement exhibits multi-level features with unstable contrast, and spalling shows uneven spatial distribution and is easily confused with color variations. The complex characteristics of these three defect types collectively demand that detection models efficiently capture effective multi-scale features while suppressing interference. The PRepFasterNet module faces limitations when handling target scale variations and complex backgrounds. Therefore, an Efficient Multi-Scale Attention (EMA) [16] mechanism is introduced to enhance the ability to distinguish concrete defect features and adapt to detection demands in complex environments.
The EMA module, as shown in Figure 5, divides the input feature map into multiple sub-feature groups. Through parallel sub-network structures, it captures spatial information at different scales, enabling targeted extraction of multi-scale features. Within each sub-feature group, this mechanism further integrates global information encoding with cross-dimensional interactions. It dynamically recalibrates channel weights through learning, enabling the model to automatically focus on task-critical feature channels while suppressing contributions from redundant or distracting channels. This design leverages a multi-scale parallel architecture to cover feature requirements across different scales while enhancing the expression of effective features through attention-based calibration. By avoiding computationally intensive structures like multi-head self-attention, it significantly boosts feature extraction capabilities without substantially increasing model parameters or computational costs. This approach is particularly suited for accurately capturing small targets and fine-grained features in complex environments, enhancing the model’s adaptability to intricate scenarios. The optimized feature extraction module structure is illustrated in Figure 6.
Figure 5. EMA Module Schematic Diagram.
Figure 6. EMA-PRepFaster Module Schematic Diagram.

2.2.3. Feature Fusion at the Neck Using the GD Mechanism in Gold-YOLO

To achieve effective detection of targets at different scales, feature fusion is required to fully leverage feature information across different layers of the network [17]. For multi-scale detection scenarios, although RTDETR employs feature concatenation or summation for fusion, such simple operations fail to effectively uncover and utilize the intrinsic correlations between feature maps at different levels within the feature pyramid, resulting in limited fusion effectiveness. Particularly, the high-resolution P3 layer feature maps in the pyramid structure contain substantial detail information essential for small object detection, while deeper feature maps possess richer high-dimensional semantic information. Therefore, there is an urgent need to develop a more optimal fusion mechanism.
To achieve efficient integration of shallow-level detail features and deep-level semantic features, the Gather-and-Distribute (GD) mechanism from Gold-YOLO [13] is introduced. As illustrated in Figure 7, the GD mechanism overcomes the limitations of traditional feature fusion, which relies solely on adjacent layers or fixed intermediate layers, establishing an efficient “information aggregation and redistribution” interaction paradigm. This mechanism first employs a global aggregation module to fuse information across multi-level feature maps, generating a "Knowledge Graph" rich in global context. This graph simultaneously encodes fine-grained details from shallow layers and high-level semantics from deep layers. Subsequently, a distribution module injects this global information into higher-level features.
Figure 7. Gather-and-Distribute (GD) Mechanism Diagram.
The GD mechanism comprises two branches: Low-GD and High-GD. Shallow Layer (Low-GD): Emphasizes enhancing detail features critical for detecting small and medium-sized objects. Deep Layer (High-GD): Primarily strengthens semantic expression capabilities essential for recognizing large objects. This design significantly improves cross-scale information exchange efficiency in the Neck section without introducing additional inference latency. It effectively mitigates information loss during feature fusion, thereby comprehensively enhancing the model’s detection accuracy and robustness for objects of varying sizes.

2.2.4. Improvements to the Loss Function

(1)
PIoU v2 Loss Function
In object detection tasks, IoU-based loss functions effectively evaluate the localization performance of detection models. Existing common bounding box regression methods (including IoU, the original model GIOU [18], CIOU [19], and DIOU [20]) typically do not account for the impact of varying sample difficulty levels on regression results.
Additionally, in concrete defect detection scenarios, high accuracy is required for bounding box regression. Concrete defects exhibit diverse morphologies, and the scales of different defects vary significantly. The detection model must precisely locate defects of various shapes and sizes. However, the original model’s GIOU metric fails to account for how the shape and size variations of bounding boxes themselves impact regression results. Consequently, it performs poorly in detecting concrete defects across multiple scales.
To this end, this paper introduces the PIoU v2 (Powerful-IoU v2) loss function [21]. This loss function dynamically adjusts the magnitude and direction of gradients based on the quality difference between anchor boxes and target boxes (e.g., IoU values), guiding anchor boxes to regress along more optimal paths and thereby better adapting to damage of varying shapes. Furthermore, by incorporating an anti-interference mechanism, the PIoU v2 loss function significantly enhances the robustness of boundary matching and the stability of detection in complex scenarios. The definitions of the attention function and the PIoU v2 loss function are as follows:
q = e − P ,   q ∈ ( 0 , 1 ]
u ( x ) = 3 x ·   e − x 2
L PIoU 2 = u ( λ q ) ·   L PIoU
In the formula: u ( x ) represents the attention function; q denotes the anchor box quality score, with values ranging from (0, 1]; P represents the penalty factor; λ is the hyperparameter controlling the behavior of the attention function.
PIoU v2 employs a more sophisticated and comprehensive penalty term design to guide the model in optimizing bounding boxes from multiple perspectives. This enables the model to receive clearer gradient guidance during training, accelerating convergence to optimal localization states. By speeding up the training process while enhancing the ability to capture features of defects of varying sizes, the model achieves improved detection accuracy.
(2)
EMASVLoss
The original VarifocalLoss in RTDETR determines loss weights by combining predicted scores with actual IoU, yet these weights remain fixed throughout training. This static weighting strategy exhibits limited adaptability when handling the dynamic evolution of IoU distributions and imbalanced sample categories (e.g., wide crack size ranges, small-scale reinforcement bars prone to omission, and spalling easily confused with background). It struggles to fully extract information from critical samples. To overcome these limitations, this paper proposes a novel classification loss function: EMASVLoss (EMA-Slide-VarifocalLoss). EMASVLoss borrows the dynamic weighting concept from SlideLoss [22], dividing the loss into multiple intervals with differentiated weights based on the relationship between the sample’s actual score and the dynamic IoU threshold. This enables precise focus on difficult samples and appropriate suppression of easy samples. Second, it incorporates an exponential moving average (EMA) mechanism for smooth, dynamic weight updates. This enables better adaptation to changes in the IoU distribution during training, enhancing the model’s overall adaptability and robustness. Its core formula is as follows:
BCE ( u i , v i )   =   − [ v i ln ( σ ( u i ) )   + ( 1   −   v i ) ln ( 1 −   σ ( u i ) ) ]
L EMASVL = 1 N ∑ i = 1 N w i ·   BCE ( u i , v i )
In the formula: BCE ( u i , v i ) denotes the binary cross-entropy between the predicted score u i and the true score v i (IoU), N represents the number of samples in the batch, σ ( u i ) is the predicted sigmoid value, and the modulation weight w i dynamically weights the loss value through the segmented dynamic mechanism of SlideLoss.
The computation of the piecewise function for w i is as follows:
w i   = { 1 , v i   ≤   τ a − 0.1 e 1 − τ a , τ a − 0.1   < v i   <   τ a e 1 − v i , v i   ≥   τ a
In the formula:   τ a represents the average IoU across all samples.
The introduced EMA mechanism dynamically updates τ a according to the following formula:
τ a ( t ) = d ( t ) · τ a ( t − 1 ) + ( 1 − d   ( t ) ) ·   I o U c
d   ( t ) = d base   · ( 1 − e − t τ )
In the formula: τ a ( t ) is the updated threshold after EMA; d ( t ) is the decay factor of EMA, with a value range of [0, 1]; Io U c is the   τ a value computed for the current batch; d base is the base decay rate; and t is the update step.
As the number of training steps increases, the value of d ( t ) progressively converges toward d base , ensuring gradual stability while maintaining smooth updates. The EMASVLoss mechanism for smoothly updating weights effectively addresses the issue of sample imbalance in detection, enabling efficient learning of difficult samples within the training dataset and demonstrating superior adaptability in multi-scale concrete inspection.

3. Experiments and Discussion

3.1. Experimental Environment Setup

As shown in Table 1, this experiment was implemented using the PyTorch 3.11 framework on an NVIDIA 4090D GPU. Model training and testing were performed with torch version 2.2.0 + cu121 and torchvision version 0.17.2+cu121.
Table 1. Experimental equipment.
Hyperparameter Settings: To ensure research rigor and comparability of model training results, all models in this study were trained with identical parameters as shown in Table 2. No pre-trained weights were imported during training. All other model hyperparameters were set to default values.
Table 2. Model Training Parameters.

3.2. Datasets and Evaluation Metrics

The concrete surface defect images used in this paper were partially sourced from the internet and partially derived from the Nanyang Technological University open-source dataset Public Crack [23] (https://universe.roboflow.com/ntu-department-of-civil-engineering/public_crack (accessed on 10 June 2025)). A total of 7861 images containing three types of defects—cracks, spalling, and exposed reinforcement—were obtained. The dataset was divided into training, validation, and test sets in a 7:2:1 ratio for subsequent experiments. To reduce the learning difficulty for the deep learning model, enrich data features, and mitigate the “long-tail effect”—where sample counts vary significantly across categories (e.g., cracks dominate this dataset while spalling is scarce)—which could lead to insufficient feature learning for spalling defects and poor detection performance. The training set images were processed using Albumentations data augmentation tools. The augmentation methods primarily included image blurring, Gaussian noise addition, contrast modification, rotation, and flipping. The relevant parameters for these augmentations are shown in Table 3. After processing, the training set comprised 9376 images. The distribution of each category in the dataset is shown in Figure 8. The target dimensions are illustrated in Figure 9. The width and height values of all target categories are distributed within the range (0, 1), with no obvious single concentrated region. This indicates that concrete defect targets exhibit rich scale variations in real-world scenarios.
Table 3. Image Augmentation Parameters.
Figure 8. Target category distribution diagram.
Figure 9. Target size distribution.

3.3. Experimental Evaluation Criteria

To comprehensively evaluate the model’s performance in object detection tasks, this paper employs multiple commonly used metrics, including model precision, recall, mean average precision (mAP) at different IoU thresholds, number of parameters, computational complexity (GFLOPs), and frames per second (FPS). The calculation formulas are as follows:
mAP = 1 N ∑ i = 1 N A P i
P = TP TP + FP
R = TP TP + FN
In the formula: N denotes the number of detection categories; i represents the i-th detection target; mAP is the average precision across all targets; TP (True Positives) is the number of samples that are positive samples and correctly predicted; TN (True Negatives) denotes the number of samples that are inherently negative and correctly predicted; FP (False Positives) denotes the number of samples that are inherently negative but incorrectly predicted as positive; and FN (False Negatives) denotes the number of samples that are inherently positive but incorrectly predicted as negative.

3.4. Melting Experiment

To better analyze the effectiveness of each module in the EMAFG-RTDETR improved model for concrete defect detection, a series of ablation experiments were conducted. These experiments progressively integrated and compared different improved modules based on the RTDETR-R18 baseline model. The ablation experiment results are shown in Table 4.
Table 4. Results of ablation experiments.
As each proposed module was progressively integrated into the baseline model, the accuracy metrics Recall and mAP on the test set showed an overall upward trend. Compared to the baseline model in Group A, Group B demonstrated improvements across all accuracy metrics, with mAP50 increasing by 1.4% while reducing both the number of parameters and computational complexity. This indicates that the EMA-PRepFaster backbone enhances model accuracy while achieving lightweight performance. In Group C experiments, introducing the GD mechanism from GOLD-YOLO for feature fusion improved all accuracy metrics. While parameter count and computational complexity increased slightly, mAP50 rose by 1.3%. This demonstrates that incorporating the GD mechanism enhances feature fusion capabilities, thereby boosting model accuracy. In Experiment Group D, parameters across all groups showed modest improvements, demonstrating that the modified loss function enhances the baseline model, albeit to a limited extent.
Group H represents the improved model proposed in this paper, achieving optimal performance in mAP50, mAP50:95, and Recall metrics. Compared to the baseline model Group A, it demonstrates improvements of 2.5%, 3.3%, and 3.6%, respectively. Although Precision, Parameters, and Computational Cost (GFLOPs) are not optimal, they all show improvements over the baseline Model A: Precision increased by 1.8%, Parameters decreased by 0.6M, and Computational Cost decreased by 2.5. While the reductions in Parameters and Computational Cost are modest, the accuracy metrics demonstrate significant enhancement. The model achieves 86.14 FPS, representing a 12.2% reduction compared to the original model. Although the FPS is lower than the original model, it still meets the real-time detection requirements for drones.
Overall, the improvements proposed in this paper demonstrate varying degrees of enhancement over the baseline model. The modules exhibit good compatibility with each other, enabling the fulfillment of our fundamental requirements for drone-based detection of concrete defects.

3.5. Comparative Experiment

To evaluate the superiority of the proposed algorithm, we compare it with the latest mainstream object detection algorithms. To ensure fairness in the comparison, we selected models with similar parameter counts to balance accuracy and deployment difficulty (i.e., avoiding insufficient accuracy due to overly small parameters or excessive complexity hindering practical deployment). The selected baseline methods include YOLOV8m, YOLOv10m, YOLOv11m, YOLOv13s, and rtdetr-r34. Detailed experimental results are presented in Table 5.
Table 5. Comparison results of different object detection algorithms.
As shown in Table 5, our method achieves the best performance in terms of accuracy, recall, mAP50, and mAP50:95. It is noteworthy that the YOLO series achieves higher FPS than our method. Although our approach does not match the FPS of other real-time detection algorithms, it outperforms them in accuracy metrics. Moreover, our proposed method achieves an FPS of 86.14, which fundamentally satisfies detection requirements while significantly enhancing model precision. This result fully demonstrates the effectiveness and advanced nature of the proposed technical approach in the task of detecting defects in concrete.

3.6. Visual Analytics

To further analyze the detection performance of this method on the dataset, five representative images were selected for heatmap analysis, as shown in the figure.
As shown in Figure 10, the original image reveals crack defects with large spans, small-scale exposed reinforcement, and spalling defects occurring at both large and small scales. The heatmap clearly demonstrates the significant advantages of the proposed method. Among the approaches, the proposed method and YOLOv11m exhibit relatively concentrated attention on crack defects. For exposed reinforcement defects, the proposed method and YOLOv13s demonstrate the highest concentration of attention. The proposed method exhibits the strongest focus on spalling defects, while other methods show scattered attention, leading to poorer detection performance. Overall, the proposed method achieves more concentrated attention across all three defect categories, enabling more precise localization and stable identification of defects.
Figure 10. Example of a heat map.
A quantitative analysis of the detection performance on the test dataset is presented. The detection results on the test set are shown in Figure 11, where six representative images are selected for comparison. Orange boxes indicate detected crack defects, red boxes denote detected exposed reinforcement defects, and pink boxes represent detected spalling defects. The figure clearly shows that only the proposed method, YOLOv11m, and RTDETR-R34 can correctly detect all corresponding defects. Among them, the proposed method achieves the highest IoU score. YOLOv8m, YOLOv13s, and the baseline model RTDETR-R18 all exhibit misclassifications, identifying dark spalling defects as exposed reinforcement defects. Based on the detection results from the test set, the proposed method demonstrates the strongest overall detection capability.
Figure 11. Example of detection results.

3.7. Model Performance Under Different Lighting Conditions

To evaluate the model’s adaptability and robustness under varying lighting conditions, this study employed image enhancement techniques to augment the test dataset with multiple lighting scenarios. Four distinct subsets of images were generated based on the original test dataset, representing typical lighting variations: low light, high light, backlight, and shadow interference. Each lighting condition was achieved through a parameterized image processing algorithm, with specific parameter settings detailed in Table 6. This data augmentation approach enabled systematic analysis of the model’s performance across complex lighting environments.
Table 6. Illumination Transformation Parameters.
The detection results of the proposed method on data under varying lighting conditions are shown in Figure 12. The model successfully detected defects under different lighting conditions, demonstrating its adaptability and robustness across diverse illumination scenarios.
Figure 12. Detection Results for Different Light Models.

3.8. Field Testing and Validation of Octocopter UAVs

To validate the effectiveness of the proposed algorithm in practical applications, it was deployed on an octocopter UAV designed and developed by our team for experimental verification. Our UAV features an octocopter design, offering enhanced flight capabilities and expandability for detection equipment. It is equipped with a Skydroid c10 pro gimbal camera featuring 200 megapixel resolution and a Jetson Orin NX 16GB algorithm board with 100 TOPS computational power. The drone’s image data acquisition and processing system framework is illustrated in Figure 13. The gimbal camera captures high-definition image data and transmits it to the Jetson algorithm board. Upon receiving the image data, the Jetson board invokes the proposed algorithm for image recognition. The recognized video data and the original video data are then transmitted via the video transmission module to the controller for viewing and to the computer for storage.
Figure 13. Framework of the UAV Image Data Acquisition and Processing System.
To validate the effectiveness of algorithm-equipped drones in detecting concrete defects during actual engineering projects, Field tests were conducted on the campus of Chongqing Jiaotong University, where a drone inspected a concrete wall. To ensure both flight safety and high-resolution image acquisition, the drone maintained a distance of 0.3 to 1 m from the inspection surface. The camera focal length was adjusted to achieve a Ground Sampling Distance (GSD) of less than 0.5 mm/pixel, guaranteeing clear detection of concrete defects in the captured imagery. The primary defects detected included crack defects and spalling defects. The detection results are shown in Figure 14, demonstrating that the drone equipped with the algorithm developed in this paper can accurately identify both crack defects and spalling defects.
Figure 14. Drone-Based On-Site Defect Detection.

4. Conclusions

This paper addresses challenges in drone-based concrete defect detection, including the difficulty of acquiring high-altitude images, variable target scales, and complex background discrimination. We optimized the real-time end-to-end detector RTDETR-R18 by replacing the lightweight backbone network, implementing a GD feature fusion mechanism, and refining the loss function. These modifications enhanced the model’s accuracy in concrete defect detection. Experimental results demonstrate that employing the lightweight backbone EMA-PRepFaster block and the GD feature fusion mechanism from GOLD-YOLO, respectively, boosts the model’s mAP50 by 1.4% and 1.3%. When both the lightweight backbone and GD fusion mechanism are combined, the model’s mAP50 improves by 1.8%. Subsequently, employing bounding box regression PIoU v2 and the classification loss function EMASVL accelerated model convergence and enhanced feature learning for challenging samples, further improving accuracy. This approach achieved a 2.5% mAP50 improvement while maintaining minimal lightweighting. Future work may focus on:
(1)
Explore extreme lightweight optimization to reduce computational overhead on drones, freeing resources for subsequent algorithms like autonomous drone inspections and image segmentation.
(2)
Investigate joint optimization of image enhancement and detection models.

Author Contributions

Methodology, J.Y.; Investigation, J.Y., S.S., J.L. (Jiayuan Luo), K.Y., C.C. and X.Z.; Writing—original draft, J.Y.; Writing—review & editing, S.D.; Visualization, J.Y.; Supervision, J.L. (Jun Luo). All authors have read and agreed to the published version of the manuscript.

Funding

This work was supported by the following projects: Chongqing Technology Innovation and Application Development Special Major Project (CSTB2025TIAD-STX0023), Chongqing Natural Science Foundation Innovation and Development Joint Fund (CSTB2024NSCQ-LZX0024), Chongqing Municipal Education Commission Science and Technology Research Project (KJZD-K202300711), Chongqing Technology Innovation and Application Development Special Key Project (CSTB2024TIAD-KPX0081).

Data Availability Statement

The original contributions presented in this study are included in the article. Further inquiries can be directed to the corresponding author.

Conflicts of Interest

Author Cai Chen was employed by the company Chongqing Huashu Robotics Co., Ltd. The remaining authors declare that the research was conducted in the absence of any commercial or financial relationships that could be construed as a potential conflict of interest.

References

  1. Yang, Q.N.; Ji, X.D. Automatic Pixel-Level Crack Detection for Civil Infrastructure Using Unet Plus and Deep Transfer Learning. IEEE Sens. J. 2021, 21, 19165–19175. [Google Scholar] [CrossRef] [Scilit]
  2. He, X.; Tang, Z.; Deng, Y.; Zhou, G.; Wang, Y.; Li, L. UAV-based road crack object-detection algorithm. Autom. Constr. 2023, 154, 105014. [Google Scholar] [CrossRef] [Scilit]
  3. Gao, Y.; Cao, H.; Cai, W.; Zhou, G. Pixel-level road crack detection in UAV remote sensing images based on ARD-Unet. Measurement 2023, 219, 113252. [Google Scholar] [CrossRef] [Scilit]
  4. Girshick, R.; Donahue, J.; Darrell, T.; Malik, J. Rich feature hierarchies for accurate object detection and semantic segmentation. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, Columbus, OH, USA, 23–28 June 2014; pp. 580–587. [Google Scholar]
  5. Girshick, R. Fast r-cnn. In Proceedings of the IEEE International Conference on Computer Vision, Santiago, Chile, 7–13 December 2015; pp. 1440–1448. [Google Scholar]
  6. Xu, X.; Zhao, M.; Shi, P.; Ren, R.; He, X.; Wei, X.; Yang, H. Crack detection and comparison study based on faster R-CNN and mask R-CNN. Sensors 2022, 22, 1215. [Google Scholar] [CrossRef] [Scilit] [PubMed]
  7. Su, P.; Han, H.; Liu, M.; Yang, T.; Liu, S. MOD-YOLO: Rethinking the YOLO architecture at the level of feature information and applying it to crack detection. Expert Syst. Appl. 2024, 237, 121346. [Google Scholar] [CrossRef] [Scilit]
  8. Arwidiyarti, D. Single Shot Multibox Detector (SSD) in Object Detection: A Review. IJACI Int. J. Adv. Comput. Inform. 2025, 1, 118–127. [Google Scholar]
  9. Tan, M.; Pang, R.; Le, Q.V. Efficientdet: Scalable and efficient object detection. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, Seattle, WA, USA, 13–19 June 2020; pp. 10781–10790. [Google Scholar]
  10. Zhang, S.; Wen, L.; Bian, X.; Lei, Z.; Li, S.Z. Single-shot refinement neural network for object detection. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, Salt Lake City, UT, USA, 18–23 June 2018; pp. 4203–4212. [Google Scholar]
  11. Xu, J.; Wang, S.; Han, R.; Wu, X.; Zhao, D.; Zeng, X.; Yin, R.; Han, Z.; Liu, Y.; Sheng, S. Crack segmentation and quantification in concrete structures using a lightweight YOLO model based on pruning and knowledge distillation. Expert Syst. Appl. 2025, 283, 127834. [Google Scholar] [CrossRef] [Scilit]
  12. Zhao, Y.; Lv, W.; Xu, S.; Wei, J.; Wang, G.; Dang, Q.; Liu, Y.; Chen, J. Detrs beat yolos on real-time object detection. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, Seattle, WA, USA, 16–22 June 2024; pp. 16965–16974. [Google Scholar]
  13. Wang, C.; He, W.; Nie, Y.; Guo, J.; Liu, C.; Han, K.; Wang, Y. Gold-YOLO: Efficient object detector via gather-and-distribute mechanism. Adv. Neural Inf. Process. Syst. 2023, 36, 51094–51112. [Google Scholar]
  14. Chen, J.; Kao, S.; He, H.; Zhuo, W.; Wen, S.; Lee, C.; Chan, S.-H.G. Run, don’t walk: Chasing higher FLOPS for faster neural networks. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, Vancouver, BC, Canada, 17–24 June 2023; pp. 12021–12031. [Google Scholar]
  15. Ding, X.; Zhang, X.; Ma, N.; Han, J.; Ding, G.; Sun, J. Repvgg: Making vgg-style convnets great again. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, Nashville, TN, USA, 20–25 June 2021; pp. 13733–13742. [Google Scholar]
  16. Ouyang, D.; He, S.; Zhang, G.; Luo, M.; Guo, H.; Zhan, J. Efficient multi-scale attention module with cross-spatial learning. In Proceedings of the ICASSP 2023–2023 IEEE International Conference on Acoustics, Speech and Signal Processing (ICASSP), Rhodes Island, Greece, 4–10 June 2023; IEEE: New York, NY, USA; pp. 1–5. [Google Scholar]
  17. Sun, Q.-S.; Zeng, S.-G.; Liu, Y.; Heng, P.-A.; Xia, D.-S. A new method of feature fusion and its application in image recognition. Pattern Recognit. 2005, 38, 2437–2448. [Google Scholar] [CrossRef] [Scilit]
  18. Rezatofighi, H.; Tsoi, N.; Gwak, J.; Sadeghian, A.; Reid, I.; Savarese, S. Generalized intersection over union: A metric and a loss for bounding box regression. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, Long Beach, CA, USA, 15–20 June 2019; pp. 658–666. [Google Scholar]
  19. Zheng, Z.; Wang, P.; Ren, D.; Liu, W.; Ye, R.; Hu, Q. Enhancing geometric factors in model learning and inference for object detection and instance segmentation. IEEE Trans. Cybern. 2021, 52, 8574–8586. [Google Scholar] [CrossRef] [Scilit] [PubMed]
  20. Zheng, Z.; Wang, P.; Liu, W.; Li, J.; Ye, R.; Ren, D. Distance-IoU loss: Faster and better learning for bounding box regression. Proc. AAAI Conf. Artif. Intell. 2020, 34, 12993–13000. [Google Scholar] [CrossRef] [Scilit]
  21. Liu, C.; Wang, K.; Li, Q.; Zhao, F.; Zhao, K. Powerful-IoU: More straightforward and faster bounding box regression loss with a nonmonotonic focusing mechanism. Neural Netw. 2024, 170, 276–284. [Google Scholar] [CrossRef] [Scilit] [PubMed]
  22. Yu, Z.; Huang, H.; Chen, W.; Su, Y.; Liu, Y.; Wang, X. Yolo-facev2: A scale and occlusion aware face detector. Pattern Recognit. 2024, 155, 110714. [Google Scholar] [CrossRef] [Scilit]
  23. NTU Department of Civil Engineering. Public_Crack Computer Vision Model [DB/OL]. (2023-08-07). Available online: https://universe.roboflow.com/ntu-department-of-civil-engineering/public_crack (accessed on 10 June 2025).
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content.

Article Metrics

Citations

Article Access Statistics

Multiple requests from the same IP address are counted as one view.