This paper proposes an automatic identification method of smoking behaviour in public places based on the improved You Only Look Once (YOLO) algorithm. The histogram of oriented gradient (HOG) feature method is used to detect the face part of smokers, taking the detected face image as the input, the edge of the image is extracted by using the structured edge detection operator of the edge box. The gesture dataset is re-clustered by K-means++ clustering algorithm to obtain a priori frame that is more suitable for gesture recognition; and in the traditional YOLO network, the SPP spatial pyramid pooling module is added to realise the fusion of local gesture features and global gesture features, to complete the automatic identification of smoking behaviour in public places. The results show that the highest recognition rate of this method is 94.3%, the accuracy and recall rate are higher than those of the traditional methods, and the recognition results are more comprehensive.