Automated Visual Inspection in Pharmaceuticals with Roboflow
Blog post from Roboflow
Pharmaceutical manufacturing under FDA 21 CFR Part 211 requires rigorous visual inspections, particularly for injectable products, which necessitate a 100% inspection rate, while solid oral dosage forms invoke inspections based on AQL sampling. Manual inspection, prone to fatigue and inconsistency, only detects about 80% of defects, leading to costly recalls in the industry. This tutorial outlines the construction of a two-stage Automated Visual Inspection (AVI) pipeline using Roboflow, which automates the detection and classification of pills on a production line. The process involves detecting pills, cropping each for isolated classification, and using a workflow to output pass/fail results. Two datasets from Roboflow Universe are utilized: one for pill detection and another for defect classification, each trained separately to enhance accuracy. The workflow integrates detection with dynamic cropping and classification, allowing for precise defect identification, which scales across various pharmaceutical products without needing a complete rebuild. By setting confidence thresholds and monitoring classification distribution as a process signal, the system can be optimized to reduce false rejects and address manufacturing issues, presenting a scalable and efficient solution for ensuring product quality in pharmaceuticals.