Abstract The distributed acoustic sensing (DAS) system based on phase-sensitive optical time domain reflection ( Φ-OTDR) technology is widely used in pipeline safety monitoring, perimeter security, structure monitoring, etc. Accurate localization and recognition of multi-scene events over long distances has always been a challenge. This paper proposes an improved YOLOv7 algorithm for multi-event real-time detection of DAS system. The algorithm employs space-to-depth Conv(SPD-Conv) to replace the strided convolutions and pooling operations in YOLOv7, reducing fine-grained information loss and learning of inefficient feature representations. In addition, the Convolutional Block Attention Module (CBAM) is introduced in YOLOv7 to improve the model performance. We collected spatial–temporal signal data for six types of pipeline safety events, and passed them into the improved YOLOv7 algorithm in the form of data matrixes for training and evaluation. Experiments have shown that the proposed method achieves an mAP@.5 (mean Average Precision) of 99.7% for the identification of six pipeline safety event types. Positioning loss reduced to 0.2%, and detection speed can reach 70 frames per second(FPS). Our scheme achieves significant improvements in localization and classification accuracy compared to Faster R-CNN, etc. The event recognition localization method proposed in this paper has the advantage of fast speed and high accuracy.