The challenge
A major healthcare technology and services provider, specialising in pharmaceutical solutions and healthcare data analytics, relied on manual pill counting.
Manual counting is slow and error-prone, and it creates bottlenecks that affect inventory management, patient safety and regulatory compliance. The client needed a proof of concept that could recognise and count specific pharmaceutical products by NDC code from photographs, including images with several pill types at once, at pharmaceutical-grade accuracy.
Our solution
We developed a computer vision system based on a deep neural network, fine-tuned for pharmaceutical pill detection and counting and trained on high-resolution images across multiple categories.
The inference pipeline produces prediction boxes with confidence scores, evaluated against ground truth with precision, recall and F1 metrics.
- Small and large model variants to balance accuracy and computing requirements
- User interface for image upload, confidence threshold adjustment and real-time result visualisation
- Full technical documentation and source code handed over to the client
The outcome
The system achieved over 99.9% precision, recall and F1 score across all predictions, a major improvement over manual methods. Healthcare organisations can automate pharmaceutical inventory processes, redirect staff to higher-value patient care and keep compliance consistent and auditable.
The same approach applies to wider quality control in healthcare, such as medical device inspection, drug manufacturing validation and clinical trial automation, and can scale along the pharmaceutical supply chain from manufacturing to retail pharmacy.