Abstract:The increasing number of high-rise buildings worldwide has made building maintenance a significant concern. Exterior wall cracks are one of the most important safety hazards for buildings, and their automated detection is highly significant for mitigating safety risks in high-rise buildings. Automatic detection of cracks using a UAV carrying image recognition equipment is an efficient detection method; however, UAVs’s limited payload capacity restricts the computational power of the onboard imaging payload. In this paper, an improved object?detection algorithm based on YOLOv8n is proposed for exterior wall crack detection. In the backbone network, the C2fPro multilevel feature fusion extraction module enhances the feature extraction capability of the network; in the neck network, the AFPN structure is implemented in place of the PANet framework to reduce?the model parameters and computational workload significantly. Additionally, in the detection head, DynamicATSS is applied to assign labels while adopting the ECIoU loss function to increase the Frames Per Second (FPS). The algorithm was extensively evaluated on a collected dataset of wall cracks, and the results show that, compared with the original YOLOv8n, the proposed?algorithm reduces computational load by 28%, reduces the number of parameters by 33%, increases the mAP by 0.8%, and increases the FPS by 30% , reaching?400. The approach advances resilient infrastructure and urban resilience by enabling infrastructure protection within urban infrastructure.