cs.CVMar 11, 2026

Evaluating Few-Shot Pill Recognition Under Visual Domain Shift

Authors: W. I. Chu, G. Tarroni, L. Li

Organizations: Department of Engineering, City St George’s, University of London, London, United Kingdom · Department of Computer Science, City St George’s, University of London, London, United Kingdom

Abstract

Adverse drug events are a significant source of preventable harm, which has led to the development of automated pill recognition systems to enhance medication safety. Real-world deployment of these systems is hindered by visually complex conditions, including cluttered scenes, overlapping pills, reflections, and diverse acquisition environments. This study investigates few-shot pill recognition from a deployment-oriented perspective, prioritizing generalization under realistic cross-dataset domain shifts over architectural innovation. A two-stage object detection framework is employed, involving base training followed by few-shot fine-tuning. Models are adapted to novel pill classes using one, five, or ten labeled examples per class and are evaluated on a separate deployment dataset featuring multi-object, cluttered scenes. The evaluation focuses on classification-centric and error-based metrics to address heterogeneous annotation strategies. Findings indicate that semantic pill recognition adapts rapidly with few-shot supervision, with classification performance reaching saturation even with a single labeled example. However, stress testing under overlapping and occluded conditions demonstrates a marked decline in localization and recall, despite robust semantic classification. Models trained on visually realistic, multi-pill data consistently exhibit greater robustness in low-shot scenarios, underscoring the importance of training data realism and the diagnostic utility of few-shot fine-tuning for deployment readiness.

Figures & tables

Explore similar work

CardsList
  1. A dataset of medication images with instance segmentation masks for preventing adverse drug events

    Mar 11, 2026W. I. Chu, S. Hirani, G. Tarroni +1Object DetectionInstance Segmentation

  2. Prompt-Driven Simulation with Feature Perturbation for Cross-Domain Few-Shot Object Detection

    Aug 2, 2026Linhai Zhuo, Junxi Cai, Tianwen Qian +2Synthetic Data AugmentationFew-Shot Domain Adaptation

  3. Enabling Validation for Robust Few-Shot Recognition

    Jun 5, 2025Hanxin Wang, Tian Liu, Shu KongFew-Shot LearningFew-Shot Image Classification