Oral pills, including tablets and capsules, are one of the most popular pharmaceutical dosage forms available. Compared to other dosage forms, such as liquid and injections, oral pills are very stable and are easy to be administered. However, it is not uncommon for pills to be misidentified, be it within the healthcare institutes or after the pills were dispensed to the patients. Our objective is to develop groundwork for automatic pill identification and verification using Deep Convolutional Network (DCN) that surpasses the existing methods.
Pills were categorized in accordance to their dosage form, shape, presence or absence of imprint and color. 81.5% of the pills were tablet and 83% were imprinted with symbols or letters.
Example of images taken at various angles, from different distances, and under different illumination condition.
(A) The general pipeline for pill identification: (Step-1) Perspective correction, (step-2) pill detection, (step-3) pill identification using a trained deep model. (B) From left to right: Pill image after (i) perspective correction, (ii) superpixels, (iii) first stage of saliency detection, and (iv) second stage of saliency detection. The foreground segment was then obtained by performing adaptive thresholding on the second-stage output of saliency detection.
Comparison of mean accuracy rates (%) and standard deviations across five repeated random sub-sampling (mean ± s.d)
Two-dimensional embedding of pill patterns obtained using multi- dimensional scaling. Each point corresponds to representation of a pill obtained through (A) manually designed features and (B) hidden features extracted from the fully connected layer of deep convolutional network. Every point is encoded by color based on its associated class. The positions of six distinct pills are also shown in (B).
(A) Failure cases of baseline that exploits manually designed features with random forest as classifier. The baseline fails on all these while Deep Convolutional Network (DCN) succeeds in all except for the last one, where pill Class 20 was mistaken as Class 21 (highlighted in red borders). (B) Pill queries that DCN misclassify were mostly those that bear minimal identification features, namely of standard shapes and without any imprint. The left image of each image pair is the query, while the right one is the search result returned by the baseline or the DCN.