###### Abstract  
Medication misidentification poses a significant risk to patient safety, particularly for elderly individuals managing complex prescriptions. To address this, we developed a deep learning-based system for real-time medication recognition on mobile devices. Through a comparative analysis of convolutional neural networks, ResNet101 was selected for its superior performance, achieving 98.51% accuracy on a dataset from the Korea Pharmaceutical Information Center. The system employs advanced preprocessing techniques, including image augmentation and normalization, to ensure robustness across diverse conditions. Heatmap-based visualizations enhance model interpretability, fostering trust in their decisions. Deployed as a user-friendly mobile application, the system prioritizes accessibility for elderly users, offering a practical solution to reduce medication errors. This research demonstrates the potential of AI-driven mobile health applications to improve pharmaceutical safety and patient outcomes.  
m m  
Deep learning-based automated pharmaceutical identification systems have shown potential in addressing these issues by enabling real-time and accurate pill recognition through image classification. Existing research has explored various machine learning models for pill classification, demonstrating notable advancements [4; 7; 8]. However, limitations persist in terms of accuracy, robustness, and adaptability to real-world conditions, including variations in lighting, occlusions, and diverse pill designs. Recent studies have proposed integrating object detection techniques with convolutional neural networks (CNNs) for enhanced accuracy, with some systems achieving classification rates of 85-90% on standardized datasets [2; 4]. Despite these improvements, real-world implementation remains a challenge, as many systems are designed for laboratory-controlled environments and struggle with real-time processing [2].  
To address these challenges, we propose an advanced deep learning-based pharmaceutical recognition system optimized for mobile applications. Our system employs ResNet101, a state-of-the-art CNN architecture, which demonstrated superior classification accuracy (98.51%) compared to other widely used architectures such as DenseNet, EfficientNet, MobileNet, SqueezeNet, and VGGNet. The system is designed to process medication images captured in diverse environments while integrating real-time inference capabilities suitable for mobile deployment. Additionally, heatmap-based visualizations enhance model interpretability, improving trust in the system's classification decisions.  
This research aims to develop a robust and practical medication identification system that ensures high-precision classification of pharmaceutical compounds. A comparative evaluation of multiple CNN architectures is conducted to determine the most effective deep learning model for real-time pill recognition. Furthermore, the system is implemented as a user-friendly mobile application, specifically designed for accessibility, particularly for elderly individuals who may struggle with conventional medication management. Ultimately, this study seeks to enhance patient safety by preventing medication errors and supporting healthcare providers in drug administration [1; 9].  
By integrating advanced deep learning techniques with practical mobile applications, this study contributes to the growing field of AI-powered healthcare solutions, offering a scalable, efficient, and highly accurate medication recognition system. The findings suggest significant potential for reducing medication-related errors and enhancing patient outcomes, particularly in home healthcare, hospitals, and emergency settings.