ABSTRACT Although phased array ultrasonic testing (PAUT) technology has been widely employed in pipeline weld defect recognition, current defect recognition still relies on manual operation, which limits its efficiency. By combining deep learning with PAUT, this paper presents a new neural architecture based on YOLOv5 called DFW-YOLO that can call defect indications automatically. To address redundant defect feature maps, the FasterNet backbone is introduced to enhance the model’s feature extraction ability. Additionally, partial dilated convolution (PDConv) and partial convolution (PConv) with an atrous convolution branch are designed to extend the receptive field of the backbone network, mitigating the chance of feature loss. Furthermore, a weighted generalised feature pyramid network (WGFPN) structure is proposed as the neck network. This structure combines the reparameterized generalised feature pyramid network (RepGFPN) with the weighted aggregated concatenation (WAC) structure and eliminates inefficient branches to enhance the model’s feature fusion ability. The experimental results demonstrated that DFW-YOLO outperforms the original YOLOv5 in terms of detection performance. The precision, recall, mean average precision (mAP)@0.5, and mAP@0.5:0.95 are indicators for DFW-YOLO and reach 97.4%, 97.5%, 98.3%, and 68.2%, respectively, marking 4.8%, 5%, 2.7%, and 22.5% improvement compared to the original YOLOv5.