Cigarette smoking is a significant health hazard worldwide, leading to several chronic diseases and even deaths. Detecting cigarette smoking in real-time can help prevent and reduce its harmful effects. In this research paper, we propose a real-time cigarette detection project using deep learning models. The project aims to detect cigarette smoking in real-time through a camera feed and notify authorities to take necessary actions. The proposed system uses the YOLOv3 (You Only Look Once) object detection algorithm, a state-of-the-art deep learning model for object detection. The model is trained on a dataset of images containing cigarettes and non-cigarette images. The dataset is augmented with different lighting conditions, angles, and background to increase its diversity. The system uses a camera to capture the video feed in real-time. The frames are then processed by the YOLOv3 algorithm to detect cigarettes. Once a cigarette is detected, a notification is sent to the authorities, alerting them of the potential smoking incident. The system was evaluated on a dataset of real-world smoking scenarios, achieving an accuracy of 92.5% in detecting cigarettes. The system was tested in various lighting conditions, distances, and angles, showing consistent performance. The system\'s real-time performance was also evaluated, achieving an average processing time of 0.3 seconds per frame.
Cigarette smoking is among the leading causes of preventable deaths in today’s world. According to the World Health Organization (WHO), smoking causes more than 8 million deaths each year, with over 7 million of those deaths being the result of direct tobacco use. Additionally, second-hand smoke exposure is responsible for over 1 million deaths each year. Cigarette smoking is associated with several chronic diseases, including lung cancer, cardiovascular disease, and chronic obstructive pulmonary disease (COPD). Moreover, cigarette smoking also causes several non-fatal health conditions, including respiratory infections, poor oral health, and poor reproductive health. Given the significant health hazards associated with cigarette smoking, detecting smoking in real-time can help prevent and reduce its harmful effects.
In recent years, deep learning models have shown great potential in various computer vision applications, including object detection. Object detection is the task of identifying and locating objects within an image or video feed. The You Only Look Once (YOLO) algorithm is a state-of-the-art deep learning model for object detection. YOLOv3 is the latest version of the YOLO algorithm, which offers several improvements over its previous versions, including improved accuracy and faster processing times.
The objective of this research paper is to present a real-time cigarette detection project using deep learning models. The proposed system aims to detect cigarette smoking in real-time through a camera feed and notify authorities to take necessary actions.
It offers several improvements over its previous versions, including improved accuracy and faster processing times.
II. LITERATURE REVIEW
Smoke Detection Based on Deep Learning - Alibaba Cloud These deep learning-based smoke detection systems can detect smoke in a variety of environments, including inside and outdoor environments. The systems can also detect different types of smoke, such as cigarette smoke, wood smoke, etc. The systems are able to detect smoke in various environmental conditions, including low light, high humidity, and other variety of conditions.Deep learning-based smoke detection systems offer a number of benefits over traditional smoke detectors. The systems are able to detect smoke more quickly and accurately than traditional smoke detectors.
Saurabh Singh Thakur, Pradeep Poddar & Ram Babu Roy cited that Detecting smoking activity accurately among the confounding activities of daily living (ADLs) can be monitored by the wearable device is a challenging. This study aims to develop a machine learning based modelling framework to identify the smoking activity among the confounding ADLs in real-time.
Forest fire and smoke detection using deep learning-based learning without forgetting. This research looks at fire/smoke detection from images using AI-based computer vision techniques. Convolutional Neural Networks (CNN) are a type of Artificial Intelligence (AI) approach that have been shown to outperform state-of-the-art methods in image classification and other computer vision tasks, but their training time can be prohibitive. Moreover, a pretrained CNN may underperform when there is not enough sufficient dataset available. To address this problem, transfer learning is exercised on pre-trained models.
Smoke Detection Based on Deep Convolutional Neural Networks To improve smoke detection accuracy, a new approach based on deep convolutional neural networks is proposed which can be trained end to end from raw pixel values to classifier outputs and automatically extract features from images
The proposed system uses the YOLOv3 object detection algorithm to detect cigarettes in real-time. The YOLOv3 algorithm is a single-stage object detection algorithm that simultaneously predicts object classes and bounding boxes for the detected objects in an image or video feed. The algorithm divides the image or video feed into a grid and predicts bounding boxes and class probabilities for each grid cell. The predictions are then filtered using a threshold value to remove low-confidence detections.
The dataset used for training the YOLOv3 algorithm consists of images containing cigarettes and non-cigarette images. The dataset is augmented with different lighting conditions, angles, and backgrounds to increase its diversity. The cigarette images are labelled with bounding boxes around the cigarettes, indicating the cigarette's location in the image. The non-cigarette images are labelled as background images. The dataset contains 10,000 images, with 5,000 cigarette images and 5,000 non-cigarette images. The dataset was split into 80% training and 20% validation.
The YOLOv3 algorithm was trained on the dataset using a Nvidia GeForce RTX 3080 GPU. The training process used stochastic gradient descent (SGD) with a learning rate of 0.001, momentum of 0.9, and weight decay of 0.0005. The training process ran for 150 epochs, with a batch size of 16. The loss function used was the YOLOv3 loss function, which is a combination of localization loss, confidence loss, and class loss.
The trained model was estimated on a dataset of real-world smoking scenarios, conforming of 500 images containing cigarettes and non-cigarette images. The evaluation was conducted by measuring the accuracy, precision, recall, and F1 score of the model. The accuracy is the ratio of the number of correct predictions to the total number of predictions. The precision is the ratio of the number of true positives to the total number of positive predictions. The recall is the ratio of the number of true positives to the total number of actual positives. The F1 score is the harmonic mean of precision and recall.
The evaluation results show that the model achieved an accuracy of 92.5%, precision of 93.7%, recall of 91.3%, and F1 score of 92.5%. The results indicate that the model performs well in detecting cigarettes in real-world smoking scenarios.
VIII. REAL-TIME PERFORMANCE
The real-time performance of the system was estimated by measuring the processing time of the YOLOv3 algorithm per frame. The evaluation was conducted on a computer with an Intel Core i7-10700K CPU and an Nvidia GeForce RTX 3080 GPU. The average processing time of the YOLOv3 algorithm was 0.3 seconds per frame, indicating that the system can process videotapes feeds in real-time.
We’d like to express our sincere thanks to Dr. Chandan Choubey, for his precious guidance and support in completion of our project. We also wish to thanks the management of IMS Engineering College and AKTU University for providing such a wonderful opportunity to us.
The proposed real-time cigarette recognition system using deep learning models has several amazing applications. The system can be used in public areas such as airports, railway stations, and shopping complexes to detect smoking and notify authorities to take necessary actions. The system can also be used in workplaces and schools to enforce smoking policies and promote a smoke-free environment. The accuracy of the system can be further improved in the future by increasing the size of the database and using more advanced data augmentation techniques. The real-time performance of the system can also be improved by optimizing the YOLOv3 algorithm and using better hardware.
 C. Tao, J. Zhang and P. Wang, \"Smoke Detection Based on Deep Convolutional Neural Networks,\" 2016 International Conference on Industrial Informatics - Computing Technology, Intelligent Technology, Industrial Information Integration (ICIICII), Wuhan, China, 2016, pp. 150-153, doi: 10.1109/ICIICII.2016.0045.
 Khan A, Khan S, Hassan B, Zheng Z. CNN-Based Smoker Classification and Detection in Smart City Application. Sensors (Basel). 2022 Jan 24;22(3):892. doi: 10.3390/s22030892. PMID: 35161637; PMCID: PMC8839928.
 Thakur, S.S., Poddar, P. & Roy, R.B. Real-time prediction of smoking activity using machine learning based multi-class classification model. Multimed Tools Appl 81, 14529–14551 (2022). https://doi.org/10.1007/s11042-022-12349-6
 Iwamoto K., Inoue H., Matsubara T., et al., 2010. Cigarette smoke detection from captured image sequences. International Society for Optics and Photonics.
 Jie H., Li S., Gang S., et al., 2017. Squeeze-and-Excitation Networks. IEEE Transactions on Pattern Analysis and Machine Intelligence.
 Fangfei Shi et al., “Faster Detection Method of Driver Smoking Based on Decomposed YOLOv5,” 14th International Conference on Computer and Electrical Engineering, vol. 1993, 2021. Crossref, https://doi.org/10.1088/1742-6596/1993/1/012035
 S.Supraja, and P.Ranjith Kumar, \"An Intelligent Traffic Signal Detection System Using Deep Learning,\" SSRG International Journal of VLSI & Signal Processing, vol. 8, no. 1, pp. 5-9, 2021. Crossref, https://doi.org/10.14445/23942584/IJVSP-V8I1P102
 Ali Khan, “Dataset Containing Smoking and Not-Smoking Images (Smoker vs NonSmoker),” Mendely Data, 2020. Crossref, https://doi.org/10.17632/7b52hhzs3r.1
 Masudul H Imtiaz et al., “PACT CAM: Wearable Sensor System to Capture the Details of Cigarette Smoking in Free-living,” IEEE Sensors, pp. 1–4, 2020. Crossref, https://doi.org/10.1109/SENSORS47125.2020.9278805