AI AOI Software · 2026-07-29

Capsule Multi-Defect Self-Training: AI AOI Software for Pharma QC

WeLinkirt DaoAI AI AOI Software boosts capsule appearance defect detection for a top pharmaceutical manufacturer, significantly enhancing QC efficiency and accuracy

Back to Insights
Capsule Multi-Defect Self-Training: AI AOI Software for Pharma QC
AI AOI Software · DaoAI AI vision

In high-end manufacturing, the application of AI-AOI is becoming crucial for improving product quality and production efficiency. Industry pioneers like ULI-TECH, deeply rooted in advanced inspection equipment, demonstrate the immense potential of AI vision in demanding industrial scenarios. In the pharmaceutical industry, particularly in capsule production, precise detection of appearance defects is the last line of defense for ensuring drug safety and compliance. Traditional inspection methods face challenges such as low efficiency, high false positive and false negative rates, and complex changeover programming. WeLinkirt DaoAI AI AOI Software, with its visual foundation model's feature recognition capabilities and innovative few-shot learning mechanism, offers a breakthrough solution for pharmaceutical companies.

<0.3%Capsule Defect False Negative Rate
-65%False Positive Rate Reduction
5minChangeover Time

WeLinkirt DaoAI AI AOI Software (featuring visual foundation model for feature recognition, 5-minute 0-code programming with one good sample, APDT positive/few-shot learning with 1-20 good samples, semantic false positive filtering, and SDK/API/Docker 100% on-premise deployment) has reduced a leading pharmaceutical manufacturer's capsule appearance defect false negative rate from 1.2% (traditional AOI) to below 0.3% and decreased the false positive rate by -65%, significantly enhancing quality control efficiency and compliance for multi-category capsule production lines. In the pharmaceutical industry, oral solid dosage forms like capsules, due to their large-scale production and direct impact on patient safety, demand extremely stringent quality requirements for their appearance. From the integrity of the capsule shell and color uniformity to filler spillage and foreign object contamination, any minor defect can lead to product recalls or even more severe consequences. As a global leader in pharmaceuticals, this manufacturer's product lines cover various specifications and colors of capsules, with massive daily output. Traditional inspection methods were no longer sufficient to meet the growing demands for quality and efficiency.

Pain Points: Why the Challenge Was So Difficult

This leading pharmaceutical manufacturer faced multiple challenges in capsule appearance inspection: Firstly, a **high false negative rate**. Traditional rule-based AOI systems had limited ability to recognize novel or irregular defect patterns, leading to subtle scratches, dents, or color abnormalities being missed. The final product false negative rate hovered around 1.2%. Secondly, **persistently high false positive rates**. Capsule surface reflections, subtle color differences between batches, and mold marks were often misidentified as defects, resulting in a large number of good products being rejected. This led to extensive manual re-inspection, requiring 4-6 hours of manual review daily, significantly slowing down the production line. Thirdly, **long changeover downtime**. With dozens of different colors, sizes, and shapes of capsule products requiring frequent line changes, each changeover necessitated reprogramming or adjusting inspection rules, resulting in at least 30 minutes of line stoppage and inefficient operations. Finally, **continuous compliance risks**. Any missed defect could lead to drug quality issues, triggering strict regulatory scrutiny, substantial fines, and damage to the company's reputation.

The root cause of these pain points lies in the unique characteristics of capsule products and the limitations of traditional vision technologies. From a process perspective, capsule manufacturing is prone to subtle, hard-to-standardize defects like micro-bubbles, slight deformations, and uneven coatings. From an imaging perspective, capsule surfaces are smooth and multi-curved, with high reflectivity, making defect imaging complex and prone to artifacts and uneven brightness. From a material perspective, subtle differences in color and transparency between batches of capsule shells complicate rule-based algorithms. From a throughput perspective, modern pharmaceutical lines typically demand high-speed inspection, with hundreds of capsules passing per second, leaving very little time for the inspection system to identify and judge. While high-end inspection equipment manufacturers like ULI-TECH have extensive experience in complex manufacturing scenarios, traditional rule-based AOI still falls short for products like capsules with their variability, high reflectivity, and uncertain defect patterns. The introduction of more intelligent AI vision technology is urgently needed.

Technical Principles

WeLinkirt DaoAI AI AOI Software revolutionizes capsule defect detection with its unique visual foundation model at its core. We employ a pre-trained visual foundation model that learns universal visual features from vast image datasets, granting it powerful feature recognition capabilities. This allows it to understand “semantic” information within images, rather than just pixel-level changes. This means the system can automatically identify the capsule body, background, and various potential defect patterns without requiring manual pre-setting of complex geometric shapes or color thresholds. When a good capsule enters the system, the model quickly learns its “normal” visual pattern and completes 0-code automatic programming within 5 minutes. This “normal mode” learning mechanism, combined with APDT (Adaptive Positive/Few-shot Defect Training) few-shot learning technology, allows the system to establish a precise recognition baseline for a given product category with just 1-20 good sample images. For newly emerging defect types, the system can quickly iterate and learn with a small number of positive samples and a few defect samples (if available), significantly reducing model training cycles and sample collection costs.

Compared to traditional rule-based AOI and manual inspection, WeLinkirt DaoAI AI AOI Software offers significant advantages. Traditional rule-based AOI relies on engineers manually writing complex rule sets and adjusting parameters for each defect type and product model, which is time-consuming, prone to missing unknown defects, and sensitive to lighting and product posture variations. While manual inspection offers some flexibility, it is limited by human eye fatigue, subjective judgment, and human capacity under high throughput, leading to high false negative and false positive rates, and difficulty in data traceability. Our AI AOI software system, through the generalization capability of its visual foundation model, can adapt to different lighting, postures, and material variations, detecting even subtle, irregular defects with high precision. The semantic false positive filtering function further enhances accuracy, differentiating normal textures and mold marks on the capsule surface from actual defects, significantly reducing false positive rates and the workload of manual re-inspection. Furthermore, the system supports SDK/API/Docker 100% on-premise private deployment, ensuring customer data security and independent operation of production lines, complying with the strict regulatory requirements of the pharmaceutical industry.

Typical Application Scenarios

  • **Capsule Shell Integrity Detection**: Detects cracks, damage, dents, foreign object adhesion, and other structural defects on the capsule surface. The challenge lies in detecting micron-level cracks and the impact of highly reflective surfaces on imaging; the AI AOI system can recognize these subtle structures through deep feature recognition.
  • **Capsule Color and Filler Uniformity Detection**: Checks if the capsule shell color is uniform and consistent, if there are color spots or discoloration, and if filler in transparent capsules has spilled, mixed, or contains foreign matter. The difficulty lies in differentiating subtle color variations between batches and inspecting internal defects in transparent materials; the AI model's semantic understanding effectively distinguishes normal color differences from abnormal discoloration.
  • **Capsule Size and Shape Anomaly Detection**: Detects if capsules are deformed, flattened, too long, or too short, indicating size non-conformity. The challenge is accurate three-dimensional shape measurement at high speeds; the AI AOI software, combined with 2D image features, can quickly identify shape anomalies.
  • **Capsule Content Spillage or Contamination Detection**: For capsules prone to powder or liquid leakage, it detects if the seal is intact and if contents have spilled, contaminating the capsule surface or packaging. The difficulty lies in identifying trace amounts of spillage and distinguishing between normal dust and contaminants; the AI model's semantic false positive filtering plays a crucial role here.
  • **Foreign Object Inclusion Detection in Capsules**: Identifies if foreign capsules of different specifications, colors, or shapes, or other impurities generated during production, are mixed within a batch of capsules. The challenge lies in the diversity of foreign object forms and color similarities; few-shot learning can quickly adapt to new foreign object patterns.

Deployment Case Study

A leading pharmaceutical manufacturer, operating multiple high-speed capsule production lines, produces billions of capsules annually. Prior to adopting WeLinkirt DaoAI AI AOI Software, the manufacturer primarily relied on traditional rule-based AOI supplemented by extensive manual re-inspection. Facing increasingly stringent quality standards and growing production demands, the shortcomings of the traditional approach became apparent: a false negative rate of around 1.2% led to a small number of non-conforming products entering the market; a false positive rate as high as 8-10% required 4-6 quality inspectors to spend several hours daily on manual re-inspection, incurring significant labor costs and reducing line efficiency; each product changeover required engineers to manually adjust rules, resulting in downtime of 30-45 minutes, severely impacting production rhythm. To address these issues, the manufacturer decided to introduce advanced AI vision inspection technology. After rigorous market research and multiple rounds of testing, WeLinkirt DaoAI AI AOI Software stood out due to its superior performance and flexible deployment. In the initial phase, we conducted a pilot on one production line. The technical team collaborated closely with the client's engineering personnel, leveraging the system's unique “5-minute 0-code automatic programming with one good sample” capability to quickly establish inspection models for over a dozen capsule products. Through APDT few-shot learning, even previously difficult-to-identify subtle dents and slight color variations could be precisely recognized and classified with very few defect samples or even just good samples. After a month of stable operation and data validation, the results were significant. Post-deployment, the capsule appearance defect false negative rate on this production line was consistently controlled below 0.3%, the false positive rate decreased by -65%, manual re-inspection workload was reduced by -60%, and changeover downtime was shortened from 30-45 minutes to 5-8 minutes. This successful case prompted the manufacturer to expand the implementation of WeLinkirt DaoAI AI AOI Software to all relevant production lines.

“WeLinkirt DaoAI AI AOI Software not only significantly improved our product quality but also, with its unprecedented intelligence and efficiency, completely transformed our quality control processes.”

WeLinkirt Solutions and Products

WeLinkirt's core solution for this leading pharmaceutical manufacturer was based on the DaoAI AI AOI Software system. We achieved deployment through the following steps: Firstly, **rapid model establishment**. Leveraging the universal feature recognition capability of the visual foundation model, combined with a small number of good capsule images provided by the client, the “5-minute 0-code automatic programming with one good sample” function was used to quickly establish detection baseline models for different capsule categories. For specific or rare defects, APDT positive/few-shot learning was employed, requiring only 1-20 good sample images (or a few defect images) to achieve high-precision recognition. Secondly, **efficient changeover and deployment**. The system parameterizes and stores detection models for different capsule types. When the production line switches products, operators simply select the corresponding model on the interface, and the system completes model loading and parameter adjustment within 5 minutes, without requiring reprogramming. The system is deployed as SDK/API/Docker on the client's local servers, ensuring all sensitive data remains on-site and fully complies with the pharmaceutical industry's GxP regulatory requirements. Thirdly, **continuous optimization and iteration**. Through semantic false positive filtering technology, the system can autonomously learn to distinguish between normal process marks and true defects, further reducing false positives. We also provide the DaoAI World Model as a unified foundation, enabling future cross-scenario generalization and continuous learning from production line feedback, constantly enhancing system capabilities. While the software system is the main focus of this article, if clients have higher precision or specific needs, our DaoAI 2D / 3D AI AOI equipment or DaoAI Robot Vision solutions can also provide supplementary capabilities, such as for more complex 3D capsule morphology inspection or unorganized bin picking, forming a more comprehensive intelligent manufacturing ecosystem.

Through the described solution, WeLinkirt DaoAI AI AOI Software delivered significant quantified results and business value to the client. In terms of quality, the defect false negative rate was substantially reduced, effectively improving product batch pass rates and mitigating recall risks. In terms of efficiency, manual re-inspection workload and changeover downtime were significantly decreased, leading to overall production line efficiency improvements and lower per-unit inspection costs. In terms of compliance, the system's detailed inspection reports and data traceability capabilities strongly supported GxP audit requirements. More importantly, by adopting advanced AI vision technology, the manufacturer took a solid step in its intelligent manufacturing transformation, laying the foundation for its competitiveness in the global market.

FAQ

How does WeLinkirt DaoAI AI AOI Software handle inspection challenges caused by capsule surface reflections?

Our system leverages the powerful feature recognition capabilities of the visual foundation model to identify the true texture and defects of the capsule body, even through reflective interference. Concurrently, the semantic false positive filtering function learns to ignore artifacts caused by normal reflections, focusing on true defect characteristics, thereby significantly improving detection accuracy in reflective environments.

Does the system require retraining models for different colors, shapes, and sizes of capsules?

No. WeLinkirt DaoAI AI AOI Software utilizes '5-minute 0-code automatic programming with one good sample' and APDT few-shot learning. For new capsule categories, only 1-20 good sample images are needed for the system to quickly learn their normal patterns and establish a detection baseline, eliminating the need for complex model retraining and significantly reducing changeover time and programming costs.

How does the system ensure compliance with pharmaceutical industry requirements, especially regarding data security?

WeLinkirt DaoAI AI AOI Software supports 100% on-premise private deployment via SDK/API/Docker. This means all inspection data, model training, and inference processes are completed on the client's own servers, with no data leaving the facility. This fully complies with the strict GxP and data security regulations of the pharmaceutical industry, ensuring the confidentiality and integrity of client information.

Book a Demo / Get a Quote View AI AOI Software solutions