AI-Based Tablet and Capsule Inspection System Using YOLO, OpenCV and ESP32: A Low-Cost Visual-Screening Prototype with Embedded Alert
Department of Artificial Intelligence and Data Science, Ajeenkya DY Patil School of Engineering, Pune, India · India
Abstract
Visual inspection of tablets and capsules is repetitive, and its outcome can vary between inspectors and over time. This paper presents a low-cost educational prototype that links a custom-trained YOLO object detector to a physical alert. A USB webcam supplies live frames to a host computer, where Python and OpenCV run Ultralytics YOLO inference on the CPU. The highest-confidence detection is mapped to a status, shown on a live display, and sent as a short ALERT or SAFE serial command to an ESP32 that drives a buzzer on GPIO 25. The detector uses weights trained on a public Roboflow Universe dataset of 11,832 images with two classes (defected and no-defect). We position the prototype against thirteen published studies on tablet, capsule and blister-pack inspection, describe its architecture, decision logic and circuit, and define an evaluation protocol. No project-specific accuracy, mAP or latency measurement is available, so none is claimed; published figures belong to the cited studies. We identify key limitations: a permissive 0.15 confidence threshold, a single-box decision rule, a SAFE fallback for unknown and no-detection cases, and a very small held-out test share (0.03%). The prototype is intended for educational demonstration and preliminary visible-defect screening only; human review remains essential.
Keywords
How to Cite This Article
Rights
BODHIVRUKSHA JOURNAL OF DIVERSE DISCIPLINE