Abstract:To prevent safety incidents caused by smoking in public places, an improved smoking detection algorithm is proposed based on the YOLOv3 framework. Firstly, to address the issue of pixel information loss during traditional upsampling operations, a convolutional-transpose convolutional module is designed to replace it. In the feature fusion part, a coordinate attention mechanism is added to make the network better focus on small targets. Improved k-means++ is used to optimize the prior box. Finally, the GIoU is replaced with IoU as the loss function of the algorithm to further improve the detection accuracy. In addition, a multi-scene smoking dataset is constructed, and data augmentation and expansion are performed on the dataset. Experimental results show that the improved algorithm has a 5.58% and 3.34% increase in AP@0.5 and AP@0.5:0.95 compared to the original algorithm, respectively, and the FPS is reduced by about 3 points.