Abstract:Aiming at the problems of slow speed and high false detection rate of traditional tunnel fire detection methods, a real-time flame detection algorithm based on YOLOv5s was proposed, the size of anchorage frame was recalculated by K-means. In this paper, a fusion algorithm of YOLOv5s-SRGAN is proposed. The recall rate of 1 326 tunnel flame images is 94%, 1. 7 times that of YOLOv5s. CBAM attention mechanism module and gradient equalization mechanism were introduced to improve the performance of the model through feature extraction network and loss function respectively. Compared with YOLOv5s, the average accuracy of flame detection (IOU= 0. 5) is increased by 44%, the average detection speed of the test set reached 32 FPS. The results show that the improved flame detection algorithm has better recognition effect on small flame targets.