Detection of Vaping Activity Using YOLOv8 on Images and Videos via a Deep Learning Approach
DOI:
https://doi.org/10.51903/av3vr043Keywords:
vaping, deep learning, computer vision, object detection, yolov8Abstract
Advances in artificial intelligence, particularly in computer vision and deep learning, have accelerated the development of automated systems capable of analyzing images and videos in real time. One of the most widely adopted approaches is object detection using the YOLO (You Only Look Once) algorithm. At the same time, the increasing use of electronic cigarettes (vapes), especially within educational environments, has created a need for intelligent monitoring systems that can automatically identify vaping activities. This study aims to develop a vape activity detection system based on the YOLOv8 algorithm for image and video analysis. The research employed a deep learning workflow consisting of dataset collection, preprocessing, model training, and evaluation. An initial dataset of 1,000 images was expanded to 2,000 images through augmentation techniques using Roboflow. Model training was conducted with 100 epochs and an image resolution of 640×640 pixels. The evaluation results demonstrated strong performance, achieving a precision of 0.968, a recall of 0.970, and an [email protected] of 0.973. In addition, the system was capable of operating in real time with a detection speed of up to 25 FPS. These findings indicate that YOLOv8 is effective for detecting vaping activities and has strong potential for implementation in CCTV-based surveillance systems.
References
[1] N. Qosidah, “Systematic Literature Review: Energy Metrics, Trade-Offs, and Best Practices in Green IT and Green Software,” Jurnal Ilmiah Sistem Informasi, vol. 4, no. 1, pp. 58–69, Jan. 2025, doi: 10.51903/zezhdt51.
[2] P. Divyadharshini, R. Princi, G. Subashini, and B. Moohambgai, “Virtual Reality in Adaptive Learning: Identifying Learning Styles and Integration in Educational Apps,” Journal of Technology Informatics and Engineering, vol. 4, no. 2, pp. 261–276, Aug. 2025, doi: 10.51903/jtie.v4i2.268.
[3] K. Naseer and H. N. Ahmed, “Effectiveness and Reliability of Artificial Intelligence in Fraud Detection: a Mixed-Method Study on Financial Audit,” Journal of Management and Informatics, vol. 4, no. 1, pp. 706–722, Apr. 2025, doi: 10.51903/jmi.v4i1.168.
[4] Katyayani, K. Bhardwaj, and T. Poongodi, “Deep Learning Approach for Multi-Object Detection Using YOLO Algorithm,” in 2023 6th International Conference on Contemporary Computing and Informatics (IC3I), 2023, pp. 689–693, doi: 10.1109/ic3i59117.2023.10398124.
[5] M. L. Ali and Z. Zhang, “The YOLO Framework: a Comprehensive Review of Evolution, Applications, and Benchmarks in Object Detection,” Computers, vol. 13, no. 12, p. 336, Dec. 2024, doi: 10.3390/computers13120336.
[6] C.-Y. Wang, A. Bochkovskiy, and H.-Y. M. Liao, “YOLOv7: Trainable Bag-of-Freebies Sets New State-of-the-Art for Real-Time Object Detectors,” Jul. 2022, [Online]. Available: http://arxiv.org/abs/2207.02696.
[7] M. A. Meidyan and W. Yustanti, “Implementasi Metode You Only Look Once (YOLOv5) dalam Deteksi Pelanggaran Helm,” Jurnal Teknik Informatika (JUTIF), vol. 5, no. 1, pp. 115–124, Feb. 2024, doi: 10.52436/1.jutif.2024.5.1.1633.
[8] N. A. Gunarsih, S. Wiyono, D. I. Af’idah, T. Informatika, and H. Bersama, “Aplikasi Deteksi Pelanggaran Merokok di Tempat Larangan Merokok,” Jurnal Komputer dan Informatika (JICON), vol. 12, no. 1, pp. 55–62, May 2024, doi: 10.35508/jicon.v12i1.14421.
[9] N. A. D. Istanto and B. S. W. Poetro, “Implementasi Algoritma Faster R-CNN dalam Deteksi Aktivitas Merokok di Lingkungan Kampus,” Jurnal Nasional Teknologi dan Sistem Informasi (TEKNOSI), vol. 11, no. 2, pp. 140–148, Aug. 2025, doi: 10.25077/teknosi.v11i2.521.
[10] M. I. Gojali and E. L. Tjiong, “Pengembangan Aplikasi Deteksi Objek Rokok dan Kegiatan Merokok Menggunakan Algoritma YOLOv3,” Kalbisiana Jurnal Sains, Teknologi dan Desain, vol. 9, no. 3, pp. 3215–3225, 2023, [Online]. Available: https://penerbit.kalbis.ac.id/index.php/kalbisiana/article/view/1542.
[11] A. Gevindo and S. Arlis, “Deteksi Perokok Menggunakan Algoritma You Only Look Once (YOLO) dan Convolutional Neural Network (CNN),” Jurnal Informatika Terpadu, vol. 12, no. 1, pp. 45–56, 2026, [Online]. Available: https://journal.nurulfikri.ac.id/index.php/jit.
[12] A. Rezky, A. Bagir, D. Pamerean, and F. Makhrus, “Deteksi Kecelakaan Lalu Lintas Otomatis pada Rekaman CCTV Indonesia Menggunakan Deep Learning,” Jurnal Informatika dan Teknik Elektro (JITE), vol. 5, no. 2, pp. 88–97, Oct. 2023, doi: 10.31294/jite.v5i2.2144.
[13] B. Purnama, S. Setyorini, E. Insanudin, I. Ismail, F. Labib, and N. S. Furqoon, “Implementasi Computer Vision untuk Deteksi Truk,” Jurnal Pengembangan dan Pengabdian Masyarakat Multikultural, vol. 2, no. 1, pp. 17–23, Feb. 2024, doi: 10.57152/batik.v2i1.1223.
[14] S. Al-E’mari, Y. Sanjalawe, and H. Alqudah, “Integrating Enhanced Security Protocols with Moving Object Detection: a YOLO-Based Approach for Real-Time Surveillance,” in 2024 2nd International Conference on Cyber Resilience (ICCR), 2024, pp. 1–6, doi: 10.1109/iccr61006.2024.10532863.
[15] A. Khayrat et al., “An Intelligent Surveillance System for Detecting Abnormal Behaviors on Campus Using YOLO and CNN-LSTM Networks,” in 2022 2nd International Mobile, Intelligent, and Ubiquitous Computing Conference (MIUCC), 2022, pp. 104–109, doi: 10.1109/miucc55081.2022.9781786.
[16] G. A. S. Surek, L. O. Seman, S. F. Stefenon, V. C. Mariani, and L. dos S. Coelho, “Video-Based Human Activity Recognition Using Deep Learning Approaches,” Sensors, vol. 23, no. 14, p. 6384, Jul. 2023, doi: 10.3390/s23146384.
[17] M. Rossi and P. Matt, “A Deformable Attention-Based Detection Transformer with Cross-Scale Feature Fusion for Industrial Coil Spring Inspection,” Mar. 2026, [Online]. Available: http://arxiv.org/abs/2603.13429.
[18] G. Cai, Q. Zhang, B. Liu, Z. Jin, and J. Qian, “Deep Learning-Based Recognition and Visualization of Human Motion Behavior,” Scientific Reports, vol. 14, no. 1, p. 4521, Feb. 2024, doi: 10.1038/s41598-024-55123-w.
[19] M. Tan and Q. V. Le, “EfficientNet: Rethinking Model Scaling for Convolutional Neural Networks,” Sep. 2020, [Online]. Available: http://arxiv.org/abs/1905.11946.
[20] K. Islam, “Recent Advances in Vision Transformer: a Survey and Outlook of Recent Work,” Oct. 2023, [Online]. Available: http://arxiv.org/abs/2203.01536.
[21] M. Dalal and P. Mittal, “A Systematic Review of Deep Learning-Based Object Detection in Agriculture: Methods, Challenges, and Future Directions,” Computers, Materials & Continua, vol. 82, no. 1, pp. 105–130, 2025, doi: 10.32604/cmc.2025.066056.
[22] T. Panboonyuen, “HOMEY: Heuristic Object Masking with Enhanced YOLO for Property Insurance Risk Detection,” Mar. 2026, [Online]. Available: http://arxiv.org/abs/2603.18502.
[23] M. T. Bhatti, M. G. Khan, M. Aslam, and M. J. Fiaz, “Weapon Detection in Real-Time CCTV Videos Using Deep Learning,” IEEE Access, vol. 9, pp. 34366–34382, 2021, doi: 10.1109/access.2021.3059170.
[24] A. A. Permana, R. Muttaqin, and A. Sunandar, “Sistem Deteksi Api Secara Real Time Menggunakan Algoritma You Only Look Once (YOLO) Versi 8,” Journal of Student Research (JSR), vol. 2, no. 1, pp. 15–28, 2024, [Online]. Available: https://universe.roboflow.com/.
[25] H. Gao, “A YOLO-Based Violence Detection Method in IoT Surveillance Systems,” International Journal of Advanced Computer Science and Applications (IJACSA), vol. 14, no. 5, pp. 412–420, 2023, doi: 10.14569/ijacsa.2023.0140545.
[26] A. I. Sapitri et al., “Deep Learning-Based Real Time Detection for Cardiac Objects with Fetal Ultrasound Video,” Informatics in Medicine Unlocked, vol. 36, p. 101150, Jan. 2023, doi: 10.1016/j.imu.2022.101150.
[27] I. M. D. Maleh, R. Teguh, A. S. Sahay, S. Okta, and M. P. Pratama, “Implementasi Algoritma You Only Look Once (YOLO) untuk Object Detection Sarang Orang Utan di Taman Nasional Sebangau,” Jurnal Informatika, vol. 10, no. 1, pp. 19–27, Mar. 2023, doi: 10.31294/inf.v10i1.13922.
[28] R. A. Amin, M. Hasan, V. Wiese, and R. Obermaisser, “FPGA-Based Real-Time Object Detection and Classification System Using YOLO for Edge Computing,” IEEE Access, vol. 12, pp. 73268–73278, 2024, doi: 10.1109/access.2024.3404623.
[29] D. I. Mulyana and R. F. Putra, “Optimasi Deteksi Objek dengan Segmentasi dan Data Augmentasi pada Hewan Siput Beracun Menggunakan Algoritma You Only Look Once (YOLO),” Jurnal Teknologi Informasi dan Komunikasi (JTI), vol. 8, no. 1, pp. 44–52, Jan. 2024, doi: 10.35870/jti.v8i1.1822.
[30] Z. Wang, L. Lei, and P. Shi, “Smoking Behavior Detection Algorithm Based on YOLOv8-MNC,” Frontiers in Computational Neuroscience, vol. 17, p. 1243779, 2023, doi: 10.3389/fncom.2023.1243779.
[31] J. Wei and K. Zou, “EDA: Easy Data Augmentation Techniques for Boosting Performance on Text Classification Tasks,” Aug. 2019, [Online]. Available: http://arxiv.org/abs/1901.11196.
Downloads
Published
Issue
Section
License
Copyright (c) 2026 Lahuddin Lahuddin, Pamela Larasati, Abdilah Hasbi

This work is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License.
All articles published in this journal are open access and licensed under the terms of the Creative Commons Attribution-ShareAlike 4.0 International License (CC BY-SA 4.0).
Under this license:
-
Authors retain copyright of their work.
-
Others are free to:
-
Share — copy and redistribute the material in any medium or format;
-
Adapt — remix, transform, and build upon the material for any purpose, even commercially;
-
-
As long as they:
-
Give appropriate credit to the original author(s) and the source;
-
Provide a link to the license;
-
Indicate if changes were made;
-
Distribute their contributions under the same license as the original.
-
This ensures that derivative works will also remain free and open under the same terms.













.png)