Applying Deep Learning Models for Weapon Detection in Public Environments Through Serveillance Cameras

  • Dung Nguyen University of Sciences, Hue University, Hue city, Vietnam
  • Van-Dung Hoang HCMC University of Technology and Education, Ho Chi Minh city, Vietnam
  • Van-Tuong-Lan Le Hue University, Hue city, Vietnam
Keywords: Transformer, Real time, Weapon detection, Surveillance system

Abstract

In the context of public security, the ability to detect weapons in real time through surveillance cameras is of utmost importance. This study focuses on applying fine-tuning techniques and data augmentation strategies to a Transformer-based model to enhance the capability of identifying weapons in public environments. The fine-tuning process optimized the model parameters, along with these augmentations, to improve weapon detection performance. Experimental results show that after fine-tuning, the model achieved an mAP@0.5 score of up to 96.5%, representing a significant improvement in accuracy compared to previous object detection models. These results demonstrate the great potential for applying the model to real-time security surveillance systems, effectively detecting and addressing threats.

Author Biographies

Dung Nguyen, University of Sciences, Hue University, Hue city, Vietnam

Dung Nguyen was born on June 13, 1988 in Thua Thien Hue. He graduated with a bachelor’s degree in  information technology from University of Sciences, Hue University in 2010. In 2013, he graduated with a master’s degree in computer science from University of Sciences, Hue University. Currently he works at University of Sciences, Hue University. Research fields: Software technology, artificial intelligence, machine learning, deep learning, databases.

Van-Dung Hoang, HCMC University of Technology and Education, Ho Chi Minh city, Vietnam

Van-Dung Hoang received a Ph.D. degree in Electrical and Computer Engineering from University of Ulsan, Ulsan city, Korea, in 2015. After a year of experience with Telecom SudParis as a Postdoctoral Research Fellow, he joined the Faculty of Information Technology, HCMC University of Technology and Education, Ho Chi Minh City, Vietnam, where he is currently serving as a professor of Artificial Intelligence Department. His research interests cover a wide area, which focuses on computer vision, robotics, medical image processing, autonomous vehicles, and ambient intelligence.

Van-Tuong-Lan Le, Hue University, Hue city, Vietnam

Van-Tuong-Lan Le was born on November 10, 1974, in Thua Thien Hue. In 1996, he graduated with a degree in Mathematics and Informatics from the College of Sciences, Hue University. He obtained a Master’s degree in Information Technology from Hanoi University of Science and Technology in 2002 and earned a Ph.D. in Computer Science from the College of Sciences, Hue University, in 2018. He is currently working at the Department of Training and Student Affairs, Hue University.

References

Y.LeCun, L.Bottou, Y.Bengio, and P.Haffner, “Gradient based learning applied to document recognition,”Proceedings of theIEEE, vol.86, no.11, pp.2278–2324, 1998.

A.Krizhevsky, I. Sutskever, andG. E.Hinton, “Imagenet classificationwithdeep convolutional neural networks,”Ad vances inneural information processing systems, vol. 25, 2012.

K.Simonyan,“Verydeep convolutional networks for large scale image recognition,”arXivpreprint arXiv: 1409.1556, 2014.

K.He, X.Zhang, S.Ren, and J.Sun,“Deepresiduallearning for imagerecognition,” inProceedingsof the IEEE conference on computer vision and pattern recognition, 2016, pp. 770–778.

A.Vaswani,“Attentionisallyouneed, ”Advances in Neural Information Processing Systems, 2017.

S.Yellapragada, Z.Li, K.B.Doshi, P.M.Mhasakar, H.Fan, J. Wei, E. Blasch, B. Zhang, and H. Ling, “Cctv-gun: Benchmarking handgun detection in cctv images,” arXiv preprintarXiv: 2303.10703, 2023.

J. Lim,M. I. Al Jobayer, V.M. Baskaran, J.M. Lim, J. See, andK.Wong, “Deepmulti-level featurepyramids: Application for non-canonical firearm detection in video surveillance,”Engineering applications of artificial intelligence, vol.97, p.104094, 2021.

J.L.S.Gonz´ alez, C.Zaccaro,J.A. ´ Alvarez-Garc´ıa, L.M.S. Morillo, and F. S. Caparrini, “Real-time gundetection in cctv: Anopenproblem, ”Neuralnetworks, vol.132, pp.297 308, 2020.

W. Sultani, C. Chen, and M. Shah, “Real-worldanomaly detectioninsurveillancevideos,”in Proceedings of the IEEE conference on computer vision and pattern recognition, 2018, pp.6479–6488.

C.B.Doand A.Y.Ng, “Transfer learningfor textclassifi cation, ”Advancesinneural information processing systems, vol.18, 2005.

L.Torreyand J.Shavlik, “Transfer learning,” inHandbook of research on machine learning applications and trends: algorithms,methods,andtechniques. IGIglobal, 2010, pp. 242–264.

L.Zhao, S.Pan, E.Xiang, E.Zhong, Z.Lu, and Q.Yang, “Active transfer learning for cross-system recommendation,” in Proceedings of the AAAI Conferenceon Artificial Intelligence, vol.27, no.1,2013, pp. 1205–1211.

K.Weiss, T.M.Khoshgoftaar, and D.Wang, “Asurveyof transfer learning,” Journal of Bigdata, vol. 3, pp. 1–40, 2016.

N.Agarwal, A.Sondhi, K.Chopra, and G.Singh, “Transfer learning: Survey and classification,” Smart Innovations in Communication and Computational Sciences: Proceedings of ICSICCS 2020, pp.145–155, 2021.

A.Hosna, E.Merry, J.Gyalmo, Z.Alom, Z.Aung, and M.A.Azim, “Transfer learning: a friendly introduction,” Journal of BigData, vol.9,no.1,p.102, 2022.

Z. Lin, D. Liu,W. Pan, and Z.Ming, “Transfer learning in collaborative recommendation for bias reduction,” in Proceedings of the15th ACM Conferenceon Recommender Systems, 2021, pp.736–740.

Y.Zhao, W.Lv, S.Xu, J.Wei, G.Wang, Q.Dang, Y.Liu, and J.Chen, “Detrsbeatyoloson real-time object detection,” in Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, 2024, pp. 16965–16974.

J.Redmon, S.Divvala, R.Girshick, and A.Farhadi, “You only look once: Unified, real-time object detection,” in 2016 IEEE Conference on Computer Vision and Pattern Recognition (CVPR), 2016, pp. 779–788.

J. Redmon and A. Farhadi, “Yolo9000: Better, faster, stronger,” in2017 IEEE Conference on Computer Vision and Pattern Recognition (CVPR), 2017,pp. 6517–6525.

J.Redmon, “Yolov3:An incremental improvement,” arXiv preprintarXiv: 1804.02767, 2018.

A.Bochkovskiy, C.-Y.Wang, and H.-Y.M.Liao, “Yolov4: Optimal speed and accuracy of object detection,” arXiv preprintar Xiv: 2004.10934, 2020.

G. Jocher, A. Stoken, J.Borovec, L.Changyu,A.Hogan, L.Diaconu,F. Ingham, J.Poznanski, J.Fang,L.Yuetal., “ultralytics/yolov5: v3. 1-bug fixes and performance im provements,” Zenodo, 2020.

C.Li, L.Li, Y.Geng, H.Jiang, M.Cheng, B.Zhang, Z.Ke, X.Xu, and X.Chu, “Yolov6v3.0: A full-scalereloading,” arXivpreprintar Xiv: 2301.05586, 2023.

C.-Y.Wang, A.Bochkovskiy, and H.-Y.M.Liao, “Yolov7: Trainablebag of freebies setsnewstate of the art for realtime object detectors,” in 2023 IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR), 2023, pp. 7464–7475.

C.-Y. Wang, I.-H. Yeh, and H.-Y. Mark Liao, “Yolov9: Learning what you want to learn using programmable gra dient information,” in European Conference on Computer Vision. Springer, 2025, pp. 1–21.

A. Wang, H. Chen, L. Liu, K. Chen, Z. Lin, J. Han, and G. Ding, “Yolov10: Real-time end-to-end object detection,” arXiv preprint arXiv: 2405.14458, 2024.

N. Carion, F. Massa, G. Synnaeve, N. Usunier, A. Kir illov, and S. Zagoruyko, “End-to-end object detection with transformers,” in European conference on computer vision. Springer, 2020, pp. 213–229.

R. Girshick, J. Donahue, T. Darrell, and J. Malik, “Rich feature hierarchies for accurate object detection and seman tic segmentation,” in 2014 IEEE Conference on Computer Vision and Pattern Recognition, 2014, pp. 580–587.

R. Girshick, “Fast r-cnn,” in 2015 IEEE International Con ference on Computer Vision (ICCV), 2015, pp. 1440–1448.

S. Ren, K. He, R. Girshick, and J. Sun, “Faster r-cnn: Towards real-time object detection with region proposal net works,” IEEE Transactions on Pattern Analysis & Machine Intelligence, vol. 39, no. 06, pp. 1137–1149, June 2017.

W. Liu, D. Anguelov, D. Erhan, C. Szegedy, S. Reed, C.-Y. Fu, and A. C. Berg, “Ssd: Single shot multibox detector,” in Computer Vision–ECCV 2016: 14th European Conference, Amsterdam, The Netherlands, October 11–14, 2016, Proceedings, Part I 14. Springer, 2016, pp. 21–37.

T.-Y. Ross and G. Doll´ar, “Focal loss for dense object detec tion,” in proceedings of the IEEE conference on computer vision and pattern recognition, 2017, pp. 2980–2988.

X. Zhu, W. Su, L. Lu, B. Li, X. Wang, and J. Dai, “Deformable detr: Deformable transformers for end-to-end object detection,” arXiv preprint arXiv: 2010.04159, 2020.

D. Meng, X. Chen, Z. Fan, G. Zeng, H. Li, Y. Yuan, L. Sun, and J. Wang, “Conditional detr for fast training convergence,” in Proceedings of the IEEE/CVF international conference on computer vision, 2021, pp. 3651–3660.

K. He, X. Zhang, S. Ren, and J. Sun, “Deep residual learning for image recognition,” in Proceedings of the IEEE confer ence on computer vision and pattern recognition, 2016, pp. 770–778.

A. G. Howard, “Mobilenets: Efficient convolutional neural networks for mobile vision applications,” arXiv preprint arXiv: 1704.04861, 2017.

M. Sandler, A. Howard, M. Zhu, A. Zhmoginov, and L. C. Chen, “Mobilenetv2: Inverted residuals and linear bottle necks,” in Proceedings of the IEEE conference on computer vision and pattern recognition, 2018, pp. 4510–4520.

J. Deng, W. Dong, R. Socher, L.-J. Li, K. Li, and L. Fei Fei, “Imagenet: A large-scale hierarchical image database,” in 2009 IEEE conference on computer vision and pattern recognition. IEEE, 2009, pp. 248–255.

T.-Y. Lin, M. Maire, S. Belongie, J. Hays, P. Perona, D. Ra manan, P. Doll´ar, and C. L. Zitnick, “Microsoft coco: Com mon objects in context,” in Computer Vision–ECCV 2014: 13th European Conference, Zurich, Switzerland, September 6-12, 2014, Proceedings, Part V 13. Springer, 2014, pp. 740–755.

J. tor Assalim, dataset,” “Fireguns and knifes detec https://universe.roboflow.com/joo-assalim/ f ireguns-and-knifes-detector, nov 2023, visited on 2024 11-29. [Online]. Available: https://universe.roboflow.com/ joo-assalim/fireguns-and-knifes-detector

Published
2024-11-28