YOLO-Fire: A Fire Detection Algorithm Based on YOLO
摘要
Fire incidents pose a significant threat to public safety and the security of lives and properties. Currently, deep learning methods deployed on edge devices are commonly utilized for fire detection. However, these methods suffer from poor real-time performance, low accuracy, and high false alarm rates. To address these challenges, we propose a novel fire detection algorithm named YOLO-Fire, built upon the foundation of the state-of-the-art YOLOv5s. Firstly, we replace the original YOLOv5’s C3 structure with SimpleC3 to reduce the model’s parameter count without compromising feature extraction capability. Secondly, we adopt a single-input dynamic upsampler to better preserve crucial features. Lastly, we employ the Focal WIoU-loss function to mitigate penalties for distance and aspect ratio variations, thereby enhancing the detection capability of irregular objects. Experimental results on a fire dataset demonstrate that the YOLO-Fire algorithm achieves a mean Average Precision (mAP) of 58.2% compared to 57.1% of YOLOv5s, with precision (P) increasing from 64% to 65.9%. Furthermore, the YOLO-Fire model’s GFLOPS decreases from 15.8GFLOPs of YOLOv5s to 11.2GFLOPs, not only enhancing detection accuracy but also enabling real-time performance on edge devices.