Real-Time Drug Classification Using YOLOv11 for Reducing Medication Errors
DOI:
https://doi.org/10.30871/jaic.v9i4.10117Keywords:
Classification, Drug Type, Object Detection, YOLO11Abstract
Advancements in digital imaging and machine learning have transformed healthcare, enabling innovative solutions for automated drug identification. This study develops an image-based system to classify pharmaceutical drugs, tackling errors arising from visual similarities in their shape, color, or size. Accurate drug identification is crucial for healthcare professionals and patients to access reliable information on drug composition, usage instructions, and potential side effects, enhancing safety and efficiency in medical practice. The system leverages the YOLO (You Only Look Once) algorithm, renowned for its speed and precision in object detection. A dataset comprising 5,000 drug images sourced from Kaggle was curated, with annotations and augmentation techniques such as horizontal flipping, rotation, and scaling to improve model robustness. The YOLOv11 model achieved a precision of 97.4%, a recall of 97.6%, and a mean average precision (mAP@50) of 98.4%, demonstrating high reliability in real-world scenarios. Integrated with a user-friendly Tkinter interface, the system facilitates real-time drug detection and information retrieval, streamlining access to critical data. This research underscores the YOLO algorithm’s effectiveness in delivering rapid and accurate drug classification, offering a scalable solution for healthcare applications. The system’s success highlights its potential to reduce medication errors and improve patient outcomes through precise and accessible drug identification technology.
Downloads
References
[1] Y. Xu, Y. Liu, H. Li, L. Wang, and J. Ai, “A Deep Learning Approach of Intrusion Detection and Tracking with UAV-Based 360° Camera and 3-Axis Gimbal,” Drones, vol. 8, no. 2, Feb. 2024, doi: 10.3390/drones8020068.
[2] A. T. Bruni, C. H. P. Rodrigues, C. Dos Santos, J. S. de Castro, L. S. Mariotto, and L. F. C. Sinhorini, “Analytical Challenges for Identification of New Psychoactive Substances A Literature-Based Study for Seized Drugs,” 2022, Visao Fokka Communication Agency. doi: 10.30744/brjac.2179-3425.RV-41-2021.
[3] P. Breen and Smith Rebecca, “Deaths related to drug poisoning in England and Wales 202 registrations 1,” Dec. 2023.
[4] E. M. Olson et al., “Physician Identification Badges: A Multispecialty Quality Improvement Study to Address Professional Misidentification and Bias,” Mayo Clin Proc, vol. 97, no. 4, pp. 658–667, Apr. 2022, doi: 10.1016/J.MAYOCP.2022.01.007.
[5] A. Hafezi, A. Babaii, B. Aghaie, and M. Abbasinia, “The relationship between patient safety culture and patient safety competency with adverse events: a multicenter cross-sectional study,” BMC Nurs, vol. 21, no. 1, Dec. 2022, doi: 10.1186/s12912-022-01076-w.
[6] E. M. Tichy et al., “National trends in prescription drug expenditures and projections for 2022,” American Journal of Health-System Pharmacy, vol. 79, no. 14, pp. 1158–1172, Jul. 2022, doi: 10.1093/ajhp/zxac102.
[7] B. G. de la Torre and F. Albericio, “The Pharmaceutical Industry in 2021. An Analysis of FDA Drug Approvals from the Perspective of Molecules,” Feb. 01, 2022, MDPI. doi: 10.3390/molecules27031075.
[8] E. Chai, L. Ta, Z. Ma, and M. Zhi, “ERF-YOLO: A YOLO algorithm compatible with fewer parameters and higher accuracy,” Image Vis Comput, vol. 116, p. 104317, Dec. 2021, doi: 10.1016/J.IMAVIS.2021.104317.
[9] X. Yang et al., “OTTM: an automated classification tool for translational drug discovery from omics data,” Brief Bioinform, vol. 24, no. 5, Sep. 2023, doi: 10.1093/bib/bbad301.
[10] L. Tan, T. Huangfu, L. Wu, and W. Chen, “Comparison of RetinaNet, SSD, and YOLO v3 for real-time pill identification,” BMC Med Inform Decis Mak, vol. 21, no. 1, Dec. 2021, doi: 10.1186/s12911-021-01691-8.
[11] J. Heo, Y. Kang, S. K. Lee, D. H. Jeong, and K. M. Kim, “An Accurate Deep Learning–Based System for Automatic Pill Identification: Model Development and Validation,” J Med Internet Res, vol. 25, 2023, doi: 10.2196/41043.
[12] A. J. Tittle-Ind Multi Res, A. Stefi, P. M. Varsha, S. Sumana, and V. Vandana Simha, “Indiana Journal of Multidisciplinary Research Using Machine Learning Models to Detect and Identify Pills,” 2024, doi: 10.5281/zenodo.12674988.
[13] H. W. Ting, S. L. Chung, C. F. Chen, H. Y. Chiu, and Y. W. Hsieh, “A drug identification model developed using deep learning technologies: Experience of a medical center in Taiwan,” BMC Health Serv Res, vol. 20, no. 1, Apr. 2020, doi: 10.1186/s12913-020-05166-w.
[14] M. G. Ragab et al., “A Comprehensive Systematic Review of YOLO for Medical Object Detection (2018 to 2023),” IEEE Access, vol. 12, pp. 57815–57836, 2024, doi: 10.1109/ACCESS.2024.3386826.
[15] O. E. Olorunshola, M. E. Irhebhude, and A. E. Evwiekpaefe, “A Comparative Study of YOLOv5 and YOLOv7 Object Detection Algorithms 1*,” 2023.
[16] T. Ahmad et al., “Object Detection through Modified YOLO Neural Network,” Sci Program, vol. 2020, pp. 1–10, 2020, doi: 10.1155/2020/8403262.
[17] K. Maharana, S. Mondal, and B. Nemade, “A review: Data pre-processing and data augmentation techniques,” Global Transitions Proceedings, vol. 3, no. 1, pp. 91–99, Jun. 2022, doi: 10.1016/J.GLTP.2022.04.020.
[18] G. Iglesias, E. Talavera, Á. González-Prieto, A. Mozo, and S. Gómez-Canaval, “Data Augmentation techniques in time series domain: a survey and taxonomy,” May 01, 2023, Springer Science and Business Media Deutschland GmbH. doi: 10.1007/s00521-023-08459-3.
[19] K. Alomar, H. I. Aysel, and X. Cai, “Data Augmentation in Classification and Segmentation: A Survey and New Strategies,” J Imaging, vol. 9, no. 2, Feb. 2023, doi: 10.3390/jimaging9020046.
[20] P. S. Chary, “Real Time Object Detection Using YOLOv4,” Int J Res Appl Sci Eng Technol, vol. 11, no. 12, pp. 1375–1379, Dec. 2023, doi: 10.22214/ijraset.2023.57602.
[21] R. N. Ariwa, C. Markus, N. G. Teneke, S. Adamu, and K. G. Fumlack, “Plant Disease Detection Using Yolo Machine Learning Approach,” British Journal of Computer, Networking and Information Technology, vol. 7, no. 2, pp. 115–129, Jul. 2024, doi: 10.52589/bjcnit-ejwgfw6d.
[22] N. Jegham, C. Y. Koh, M. Abdelatti, and A. Hendawi, “YOLO Evolution: A Comprehensive Benchmark and Architectural Review of YOLOv12, YOLO11, and Their Previous Versions,” Mar. 2025.
[23] A. Bochkovskiy, C.-Y. Wang, and H.-Y. M. Liao, “YOLOv4: Optimal Speed and Accuracy of Object Detection,” Apr. 2020, [Online]. Available: http://arxiv.org/abs/2004.10934
Downloads
Published
How to Cite
Issue
Section
License
Copyright (c) 2025 Joshua Lungido, Eko Hari Rachmawanto

This work is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License.
Authors who publish with this journal agree to the following terms:
- Authors retain copyright and grant the journal right of first publication with the work simultaneously licensed under a Creative Commons Attribution License (Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) ) that allows others to share the work with an acknowledgement of the work's authorship and initial publication in this journal.
- Authors are able to enter into separate, additional contractual arrangements for the non-exclusive distribution of the journal's published version of the work (e.g., post it to an institutional repository or publish it in a book), with an acknowledgement of its initial publication in this journal.
- Authors are permitted and encouraged to post their work online (e.g., in institutional repositories or on their website) prior to and during the submission process, as it can lead to productive exchanges, as well as earlier and greater citation of published work (See The Effect of Open Access).








