Abstract:Aiming at the problems of low efficiency and inconsistent standards in manual visual inspection of aviation lock-wire twisting direction in typical maintenance scenarios, an automatic detection model AFE-YOLOv7 is constructed. Using YOLOv7 as the basic model, the convolutional block attention mechanism CBAM is integrated into the SPPCSPC spatial pooling pyramid block to enhance the network's ability to pay attention to information between different channels and spatial information; Embedding a CA coordinate attention block between the neck network and the head prediction network to enhance the network's perception of the direction and position information of aviation fastener lock-wire; Optimizing the bounding box loss function to Focal-EIoU Loss to improve the robustness of the model. Using a self-built aviation lock-wire twisting directional dataset, the comparative and ablation experiments are conducted on the AFE-YOLOv7 model. The results show that AFE-YOLOv7 achieves the highest accuracy of 83.33%, and compared to YOLOv7, the proposed model has improved accuracy, recall, and mAP values by 7.67%, 8.68%, and 10.25%, respectively; Compared with widely used object detection methods such as YOLOv5s, it can better adapt to lock-wire twisting direction detection in multiple scenarios, with a running speed of 30.1 frames per second, meeting real-time detection requirements, promoting the construction of smart civil aviation.