Enhancing Medication Adherence With Computer Vision: Object Detection Models For Pill Detection
As the global population ages, ensuring proper medication adherence has become a critical healthcare challenge, particularly among seniors who often manage multiple chronic conditions. Medication errors, especially in this demographic, significantly contribute to hospital admissions and adverse outcomes. This paper proposes a computer vision-based approach using the YOLOv8 architecture to automate pill monitoring within a specific and controlled context. After evaluating multiple pre-trained backbones (EfficientNetV2, CSPDarknet, and others), the YOLOv8 emerged as a top performer, achieving 94.0\% recall on a dataset with pills in a semi-controlled background, sourced from the literature, which closely simulates the conditions of the project in which this study is inserted. Additional tests were also performed with a less controlled dataset to verify if the trained models were capable of performing in more generic contexts, with EfficientNetV2 B2 achiving a 68.6\% recall score. This research offers a significant step forward in applying AI for healthcare, providing an accessible, scalable solution for automated pill identification, particularly in supporting elderly patients with their medication regimens.