AI Pill Counter – Embedded Computer Vision Case Study
This project demonstrates the development of a complete AI-powered embedded vision
system for automated pill detection and counting. The system combines embedded hardware,
computer vision, machine learning, and real-time software integration to solve a practical
automation problem in the healthcare industry.
Overview
The objective of this project was to accurately count pills placed on a tray using a
camera and deep learning model running locally on an embedded edge AI platform.
The system operates completely offline and performs image acquisition,
object detection, instance segmentation, and counting in real time.
Engineering Disciplines Demonstrated
Embedded Systems Development
Embedded Linux development
Edge AI deployment on NVIDIA Jetson Orin platform
Hardware integration and system bring-up
GPIO, camera, display, and peripheral interfacing
Real-time software optimization
Computer Vision & Machine Learning
Image acquisition and preprocessing
Object detection and instance segmentation
Deep learning model training and validation
Dataset generation and annotation
Performance tuning and accuracy optimization
Software Development
Python application development
C/C++ embedded programming
Modular software architecture
Performance profiling and optimization
Automated testing and debugging
System Integration
Camera integration and calibration
LCD user interface development
Hardware-software integration
End-to-end product prototyping
Field testing and validation
Technical Architecture
The system captures high-resolution images from a camera mounted above a pill tray.
Images are processed locally using a deep learning model trained to identify and count
individual pills, including partially overlapping objects. The final count is displayed
on an embedded LCD interface.
NVIDIA Jetson Orin Nano
Embedded Linux
Python
C/C++
PyTorch
OpenCV
Mask R-CNN Instance Segmentation
Computer Vision
Edge AI
Engineering Challenges Solved
Detecting touching and overlapping pills
Managing reflections and lighting variations
Optimizing AI inference speed on embedded hardware
Designing a reliable image acquisition pipeline
Balancing accuracy, performance, and hardware cost
Demonstration Videos
The videos below demonstrate the complete embedded system operating on production
hardware. The AI model performs image capture, object detection, instance segmentation,
and pill counting locally without requiring cloud processing.
Introduction
Introduction to the real-time pill detection and counting using embedded AI.
Performance Demonstration
Demonstration of counting performance with different quantities of pills.