Litcius/Paper detail

Real-time pill identification and classification using deep learning framework for medicine inspection systems

N. Kavitha, P. Madhumathy

2025Discover Electronics7 citationsDOIOpen Access PDF

Abstract

The accurate identification of pharmaceutical pills is crucial for ensuring medication safety, enhancing healthcare delivery, and supporting regulatory compliance. While manual verification remains common, it is often time-consuming and prone to human error. In response, this chapter proposes an advanced deep learning-based system for real-time pill detection and classification using the YOLOv5s object detection framework. A novel component of this system is the integration of a Deep Text Spotter (DTS) module, further enhanced by a character-level Recurrent Neural Network (RNN) with coordinate encoding to improve imprint recognition. This combination effectively addresses spatial inconsistencies and mitigates optical character recognition (OCR) errors that typically arise in incomplete or unclear pill imprints. To address limitations in small-object detection and sparse annotations, a training strategy is introduced that enables generalization from single-object scenarios to multi-object contexts. The system is trained on a hybrid dataset that includes the National Library of Medicine (NLM) Pill Dataset and real-world pill images with diverse morphologies and imprint styles. The proposed framework achieves a detection accuracy of 97.8%, outperforming baseline models across precision, recall, and F1-score metrics. These results suggest strong potential for adoption in pharmaceutical quality assurance, clinical verification systems, and forensic pill analysis.

Topics & Concepts

Artificial intelligenceDeep learningComputer sciencePillIdentification (biology)Machine learningArtificial neural networkGeneralizationObject (grammar)Object detectionComponent (thermodynamics)Feature extractionData miningPrecision medicineFeature (linguistics)Key (lock)Encoding (memory)Deep neural networksStability (learning theory)Pattern recognition (psychology)Quality (philosophy)Baseline (sea)AI in cancer detectionCurrency Recognition and DetectionDigital Imaging in Medicine