Pill Variants and Counterfeit Pill Detection

Three years ago, our team set out with a plan to design a mobile technology that could help clinicians identify the multitude of generic pills that patients take, but the solutions we developed also addressed a global threat to public health – counterfeit pills.

Our Challenge

If you spend time looking at large quantities of pills at high magnification, you learn some distressing facts that make identifying them with computer vision extremely difficult.

  • Pills of the same medication and strength do not always look exactly alike – at least not at eight megapixel resolution from six inches away. They vary (albeit slightly) in color, texture, coating and reflectivity, even imprint.
  • Some of this variation is systematic – meaning that different production lots of pills will have the same visual differences across the entire batch.
  • Pills age and change texture and/or color over their shelf life in ways somewhat determined by environmental factors like light exposure and humidity.

Our Results

Our solution was a process where each unique systematic pill variant (for example, a change in size of the imprint font or a subtle change in color) could be categorized as a separate statistical model of that specific pill variant. We also worked to filter out any minor differences in appearance that can mar an individual pill.

The end result is a data modeling process where images of pills are taken in, QA’d and then evaluated for differences from the existing set of statistical models. If the individual pill varies significantly, a new statistical model for this variant can be added to the MedSnap library, which houses nearly 12,000 variants for 4,700 unique medications.

MedSnap Verify Services

MedSnap Verify Services, a comprehensive service for pharmaceutical companies, takes this ability and applies it to field identification of counterfeit pills. We work with companies to add samples of all of their production lots, as well as retained lots from prior production, to a custom library. We then deploy this library on the MedSnap VR app via an iPhone where it can be used to test any field sample against the company’s entire product library.

Our algorithm, which considers 25 different aspects of appearance, can be used in all field samples. Any sample that varies significantly is flagged as non-conforming and potentially counterfeit.

Although it was not our original intent to create a solution for counterfeit pill surveillance and detection, our entire team is thrilled that our efforts can be applied to such an important global problem.

Email this to someoneShare on Google+Share on LinkedInTweet about this on TwitterShare on Facebook