Smoking in public places not only causes potential harm to the health of oneself and others, but also causes hidden dangers such as fires. Therefore, for health and safety considerations, a detection model is designed based on deep learning for places where smoking is prohibited, such as airports, gas stations, and chemical warehouses, that can quickly detect and warn smoking behavior. In the model, a convolutional neural network is used to process the input frames of the video stream which are captured by the camera. After image feature extraction, feature fusion, target classification and target positioning, the position of the cigarette butt is located, and smoking behavior is determined. Common target detection algorithms are not ideal for small target objects, and the detection speed needs to be improved. A series of designed convolutional neural network modules not only reduce the amount of model calculations, speed up the deduction, and meet real-time requirements, but also improve the detection accuracy of small target objects (cigarette butts).