# Evaluating Few-Shot Pill Recognition Under Visual Domain Shift

arXiv: https://arxiv.org/abs/2603.10833 · HTML: https://mlsanity.com/paper/2603.10833/

## Key facts

- No citing papers in the map yet (data through 14 Oct 2026).
- Builds on 9 of its 19 references that are in the map.
- First posted on arXiv 11 Mar 2026.

## Builds on (most cited first, 9 of 9)

- [Faster R-CNN: Towards Real-Time Object Detection with Region Proposal Networks](https://mlsanity.com/paper/1506.01497/) (2015)
- [Matching Networks for One Shot Learning](https://mlsanity.com/paper/1606.04080/) (2016)
- [Do ImageNet Classifiers Generalize to ImageNet?](https://mlsanity.com/paper/1902.10811/) (2019)
- [Frustratingly Simple Few-Shot Object Detection](https://mlsanity.com/paper/2003.06957/) (2020)
- [A Systematic Collection of Medical Image Datasets for Deep Learning](https://mlsanity.com/paper/2106.12864/) (2021)
- [Few-Shot Object Detection: A Comprehensive Survey](https://mlsanity.com/paper/2112.11699/) (2021)
- [On the generalization capabilities of FSL methods through domain adaptation: a case study in endoscopic kidney stone image classification](https://mlsanity.com/paper/2205.00895/) (2022)
- [CDFormer: Cross-Domain Few-Shot Object Detection Transformer Against Feature Confusion](https://mlsanity.com/paper/2505.00938/) (2025)
- [ePillID Dataset: A Low-Shot Fine-Grained Benchmark for Pill Identification](https://mlsanity.com/paper/2005.14288/) (2020)

## Abstract (arXiv)

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.
