Transfer learning-based pill classification: efficient deep models for medication monitoring
Abstract
Purpose Medication adherence among elderly populations is a critical public health concern, with non-compliance often leading to preventable complications and hospitalizations. This study aims to evaluate and implement a deep learning-based computer vision system for automatic pill monitoring to improve medication management. Design/methodology/approach The proposed system transitions from an object detection paradigm (YOLOv8) to a binary Pill versus NoPill image classification framework. Twenty-five ImageNet-pretrained CNN variants from six architecture families were fine-tuned and evaluated on a newly collected dataset comprising 21,952 pill and non-pill images acquired under structured, deployment-representative conditions. Evaluation included nominal and controlled perturbation scenarios, paired statistical comparisons, case-level error analysis, and hardware-efficiency profiling. Findings Classification performance was close to saturation under nominal conditions and remained high under controlled perturbations. MobileNetV3-Small achieved perfect classification in both test scenarios while retaining a compact computational profile. SqueezeNet provided the smallest and fastest models but showed a small number of errors under perturbation. Although the global comparison was significant in the augmented scenario, no individual model pair remained statistically significant after Holm correction of exact McNemar tests. Social implications Automated pill monitoring has the potential to enhance patient safety, reduce healthcare costs, and improve the quality of life for older adults managing complex medication regimens. Originality/value Rather than proposing new algorithmic architectures, this study presents a comprehensive empirical evaluation of transfer learning for pill monitoring. By shifting from an object detection paradigm to a binary image classification framework, it systematically assesses the trade-offs between predictive performance and hardware efficiency. Leveraging lightweight architectures and a dataset collected under structured, deployment representative conditions, it provides a foundation for future research in automated medication adherence systems with enhanced scalability and practical applicability.
// Source
Authors: Gabriel Lowndes Souza Pinto, Rafael Martins, Robespierre Ribeiro, Gustavo A. Corrente, William Xavier, Goreti Marreiros, Luís Conceição
Institutions: Universidade Técnica do Porto, Grupo de Investigação em Engenharia e Computação Inteligente para a Inovação e o Desenvolvimento