Skip to content
Conference

Improving Few-Shot Fine-Grained Pill Image Recognition on the ePillID Benchmark Using Coordinate Attention and Domain Adaptation

Aug 2026 · 2026 4th International Conference on Advanced Network Technologies and Applications (APAN) · pp. 1-6 · 0 citations · 24 references

Abstract

Automated pill identification from images can prevent medication errors that harm millions of patients every year, yet it remains difficult: visually near-identical pills must be distinguished from a single professional reference image per class, while queries arrive as consumer photographs taken under uncontrolled conditions. Existing metric-learning baselines for this low-shot fine-grained setting address the reference-to-consumer domain gap only implicitly through data augmentation, and consequently exhibit unstable accuracy across cross-validation folds—an undesirable property for safety-critical deployment. To close this gap, we propose a unified framework that augments a multi-head metric-learning pipeline with three complementary components: Coordinate Attention embedded in the backbone for directional spatial localization of imprints and contours, compact bilinear (second-order) pooling for fine-grained feature interactions, and adversarial domain adaptation via a gradient reversal layer that encourages domain-invariant embeddings at zero inference overhead. On the standard low-shot pill identification benchmark, the proposed model attains GAP@1 of 91.65% and Top-5 accuracy of 99.88%, while reducing the cross-validation standard deviation of GAP@1 nearly twofold (±1.45 vs. ±2.55) relative to the same-backbone baseline. A mobile deployment achieves sub-3.5s end-to-end latency, demonstrating practical viability for medical decision support.

View source

We use cookies to run the site and, with your consent, for analytics and to show ads. See our Cookie Policy.