The inadequate automation level in the transit of oil drilling tubular columns has led to significant inefficiencies and safety issues. To address these challenges, a real-time detection algorithm, ECS-YOLOv5s, has been proposed. This algorithm aims to improve the accuracy of drill pipe identification during operational processes, facilitating the automation of tubular column handling It has the potential to reduce drilling cycles and overall drilling costs. ECS-YOLOv5s enhance the detection accuracy of drill pipes by incorporating a Bidirectional Feature Pyramid Network (BiFPN) architecture with an improved multi-scale feature fusion network. The use of EfficientNet as the backbone network reduces the number of parameters and computations while effectively merging features from different layers. Additionally, the Spatial Pyramid Pooling (SPP) structure in the Neck is replaced with SPPF, and a Convolutional Block Attention Module (CBAM) is introduced to improve model robustness, reduce parameters and computations, and enhance the model’s ability to detect dense targets. The ECS-YOLOv5s algorithm exhibits superior performance in drill pipe inspection, achieving a mean Average Precision (mAP) of 90.2%, a frame rate of 125 FPS, and a parameter count of only 37%. It achieves an accuracy of 98.6%, outperforming the original model by 9.2%. The comparative analysis demonstrates that the improved algorithm surpasses traditional models such as YOLOv5s, SSD, Faster-RCNN, and YOLOv7-tiny in both performance and accuracy. These findings provide valuable insights for the research on automated processing of tubular columns in intelligent oil drilling platforms.