Authors: Assistant Professor M.Anitha, G. Lahari

Abstract: Accurate pill identification is essential for reducing medication dispensing errors and improving patient safety in healthcare environments. The increasing number of prescription and over-the-counter medications has made manual pill identification a challenging and time-consuming task for pharmacists and healthcare professionals. Similarities in pill shape, color, size, and imprint often contribute to medication errors, potentially leading to serious health consequences. This paper presents an intelligent deep learning framework for automated pill identification that integrates Convolutional Neural Networks (CNNs) with image preprocessing techniques to accurately recognize pharmaceutical pills. The proposed framework employs the Pillbox dataset, image augmentation using the Keras Image Data Generator, OpenCV for image preprocessing, HSV-based color segmentation, Paddle OCR for imprint recognition, and feature extraction based on pill shape, color, and imprint characteristics. Two CNN architectures are developed for pill detection and pill classification using ReLU activation and Softmax classification layers. The feature extraction module further enhances recognition accuracy by comparing extracted characteristics with a reference database. Experimental evaluation demonstrates that the proposed CNN model achieves 98.9% training accuracy, 98.9% validation accuracy, and 97.5% testing accuracy, while integrating image preprocessing improves the overall identification accuracy to 97.9%. The proposed framework provides a scalable, accurate, and efficient solution for automated medication identification and has significant potential for deployment in pharmacies, hospitals, and intelligent healthcare systems to minimize medication dispensing errors and improve pharmaceutical safety.

DOI: https://doi.org/10.5281/zenodo.21625807