Abstract:Given the low detection rates of small targets, low detection accuracy in complex scenes, and delayed detection in fire detection, an improved You Look Only Once v3 (YOLOv3)-based fire detection algorithm is proposed. Firstly, an improved K-means clustering algorithm is used to retrieve anchors that are more in line with the sizes of the flames and smoke. Secondly, spatial pyramid pooling is added after the Darknet-53, which improves the network receptive field and enhances the detection ability of the network on small-scale targets. Thirdly, the loss function is improved through complete intersection over union (CIoU), and the convergence of the loss function is sped up by taking into consideration the correlations of the center with the width and height coordinates when calculating the coordinate error. Finally, mosaic data enhancement is employed to enrich the background of the object to be detected, and the improved algorithm is trained and tested on a self-made data set. The experimental results show that compared with the YOLOv3 algorithm, the improved algorithm improves the flame AP from 94% to 98%, increases the smoke AP from 82% to 94%, and promotes the average detection speed from 31 fps to 43 fps. Compared with the Faster R-CNN, SDD , and other algorithms, it also has a higher mAP and a faster detection speed. Therefore, the improved algorithm is more effective in fire warning.