
Image source: Real photos taken at the New Weisheng Exhibition

Original article link: https://international-pharma.com/navigating-ai-driven-pharmaceutical-visual-inspection/
The following is the Chinese translation of the article, welcome to read and exchange!
A New Paradigm for Pharmaceutical Quality Control
AI driven visual inspection
The pharmaceutical industry is still facing challenges in quality control. Traditional detection methods are no longer sufficient to meet the needs of modern production, such as the occurrence of highly concerning contamination events such as metal stainless steel particles in Moderna vaccines, which expose key vulnerable points in the existing system. Manual visual inspection is still susceptible to human error, while traditional automated inspection systems can only identify defects that have been pre programmed to search for. With increasingly strict regulatory scrutiny and increasing production complexity, manufacturers urgently need new solutions.AI automation technology represents an advanced evolution in the field of visual inspection, which can fundamentally compensate for the limitations of manual detection and traditional automation methods.Artificial intelligence driven detection is expected to achieve zero defect production while maintaining commercial feasibility, thereby fundamentally changing the pharmaceutical quality assurance system.
Regulatory driving factors
Regulatory agencies including the US Food and Drug Administration (FDA), the European Medicines Agency (EMA), and the UK Medicines and Health Products Agency (MHRA) are gradually requiring manufacturers to demonstrate more robust quality control capabilities beyond traditional compliance measures.
The current Good Manufacturing Practice (cGMP) includes strict pollution control requirements,Intended to prevent foreign particles from endangering drug quality, and the enforcement of such requirements in the global market is constantly strengthening.
The "Industry Guidelines for Visible Foreign Matter Detection in Injections" released by the FDA clearly require that all drugs used for parenteral administration must undergo visual inspection for visible foreign matter, and any containers found to contain visible particles must be deemed unqualified and removed. In addition, the guidelines for visible foreign matter in injections in the United States Pharmacopeia stipulate that before product release, a 100% visual inspection must be conducted to demonstrate that the batch is "essentially free of visible foreign matter". These regulations highlight the crucial importance of comprehensive testing capabilities in pharmaceutical production.
At present, there is no formal regulation specifically targeting AI, but the EU has drafted GMP Appendix 22 (Artificial Intelligence) and Appendix 11 (Computerized Systems), which are still under review. A core regulatory principle gradually clarified in the draft is that only static or deterministic models are allowed to be used in critical GMP applications, and dynamic or continuous learning models are not applicable to critical GMP scenarios.
This means that the AI model deployed in the detection equipment on the production line must be locked and static, and the self-learning ability can only be used for development phase or future version updates, and cannot automatically update the model during on-site production.
Given that AI specific regulations are still in the draft stage, AI visual inspection equipment is still subject to the same regulatory framework as traditional inspection equipment. The EU policy on Automatic Visual Inspection (AVI) states: "When using automatic inspection methods, the process should be validated to detect known defects (which may affect product quality or safety), and its detection capability should be equivalent to or superior to manual inspection methods.
Many AI automated detection systemsBy generating complete audit trail records to support various compliance frameworks and meet regulatory requirements for documentation, we provide manufacturers with a verifiable and traceable quality assurance system.
Technological progress and capability
AI automation technology represents a major innovation in the field of visual inspection, which can solve the fundamental limitations of manual inspection and traditional automated inspection. Manual detection is susceptible to human error, fatigue, and lack of consistency, while traditional automated detection can only identify defect types that have been explicitly programmed.AI automation technology has significant advantages, including the ability to identify new types of defects and achieve continuous improvement through algorithm learning iterations, fundamentally changing the detection paradigm.
AI based detection equipment can significantly reduce the missed detection rate and reduce the proportion of qualified products that are misjudged as unqualified10-20% reduced to about 2% ⁽⁸⁾The significant improvement in accuracy directly translates into significant cost savings and waste reduction. In addition, AI technology can also analyze image sequences as videos,Judging suspected defects through motion trajectories and multi angle viewsThis provides a more comprehensive evaluation than static image analysis.
AI automated detectionoperating mechanismYes: Train a deep neural network model using a dataset containing a large number of images, including good product images labeled as "qualified" and defective product images labeled as "unqualified", with clearly labeled defect areas.
Complete training usually uses around1 million qualified product images and 2.5 million defective imagesQualified images not only include defect free products, but also include predictable interference factors such as bubbles, scale marks, and engraved markings.
Defect images cover common types of contamination in pharmaceutical products, such as glass, particulate matter, and metal contamination, and defect types do not need to be exhaustive. After training, the model is able to learnDistinguish between qualified products with normal interference characteristics and defective products.

Image source: Real photos taken at the New Weisheng Exhibition
In actual operation, the detection equipment will collect multiple images of each product and input them into the model for qualified/unqualified judgment.When all features in the image meet the expected characteristics of a qualified product, the model gives a "qualified" judgment; In any of the following situations, a "unqualified" judgment will be given:Firstly, certain features match the defect patterns learned during training; Secondly, certain features do not conform to the contour of qualified products, even if they do not directly match a specific defect type.
The second type of judgment follows the "fail safe" principle, ensuring that any potentially problematic products will be marked for further evaluation. The detection equipment can also detect sealing defects, container appearance defects, and filling volume control, among other items, for each categoryAdopting an independently trained deep neural network modelThe methods are basically the same.
Economic benefits and performance indicators
AI automated detection can achieve significant cost savings by reducing labor costs, lowering scrap rates, and avoiding recall losses.More advanced visual inspection technology can also reduce compliance costs, prevent reputation damage caused by quality issues, and avoid the loss of market opportunities. The biggest cost savings come from reducing waste: the error rejection rate can be reduced from about 15% to 2%, which is equivalent to saving 13% of finished products that would otherwise be discarded unnecessarily.
The performance of detection systems is usually evaluated through two core indicators: false negative rate (false negatives) and false positive rate (false positives/false negatives). The missed detection rate refers to the proportion of defective products that have not been eliminated by the detection system, while the false detection rate refers to the proportion of qualified products that have been incorrectly judged as unqualified. The probability of detection (PoD) or detection rate is the inverse of the missed detection rate, calculated as: 1- missed detection rate.
According to the United States Pharmacopeia, visual inspection is a probabilistic process rather than an absolute process, and its detection capability is influenced by factors such as particle size, shape, color, density, and reflectivity. The theoretical resolution limit of the human eye is about 11 μ m, but the actual resolution ability is closer to 85-100 μ m. Under controlled conditions, the PoD of 50 μ m particles detected manually is only slightly higher than 0%; About 40% for a single spherical particle of 100 μ m (such as polystyrene microspheres); About 70% for 150 μ m particles; For particles of 200 μ m and above, it can exceed 90% ⁽¹º ⁾.
In glass containers, glass particles become the main risk of contamination due to delamination or breakage, and the performance differences of different detection methods are particularly evident. Research has shown that manual detection can only identify about 40% of products containing individual 50-400 μ m glass particles; Traditional automated detection systems can typically detect about 90%;The detection rate of AI visual inspection system can reach as high as 98.5%, with a missed detection rate of only 1.5%These improvements significantly enhance the safety and quality assurance level of sterile products.
For plastic containers, due to the difficulty in distinguishing foreign objects in transparent materials, the performance differences are more significant. The PoD of a single plastic particle detected manually is about 25%, which increases to about 45% when there are 5 400 μ m particles present. The detection rate of traditional automation systems is about 65%, while AI detection systems can achieveAbout 95%In terms of false rejection rate, traditional machine vision is often interfered by bubbles and appearance features, with a false rejection rate of up to 10-20%, while AI systemsAbout 2%It is equivalent to the level of manual detection.
Challenges and Solutions in Implementation
Manufacturers need to carefully address a series of challenges as they transition from manual or traditional automated testing to AI automated testing. One of the key challenges is setting clear eligibility thresholds. This is significantly different from manual testing, where the qualification standards are often conveyed orally and relatively vague. In the initial implementation stage, pharmaceutical companies often encounter differences in machine threshold settings among different departments such as quality, production, and financeConsensus should be reached through effective change management and stakeholder coordination.

Image source: Real photos taken at the New Weisheng Exhibition
Successful implementation also requires a comprehensive validation process to demonstrate that the new system is equivalent or superior in performance to existing methods. Enterprises must establish a comprehensive training system for personnel operating new systems, develop standard operating procedures (SOPs) adapted to AI processes, and ensure seamless integration with existing quality management systems. At the same time, it is also necessary to meet data governance requirements, including reasonable construction of datasets, deviation management, and complete documentation of model development and validation processes.
Future technological development
Visual inspection technology is still evolving, with the goal of achieving higher performance and wider applicability. One of the current research and development priorities is to build more universal computer vision neural network models,Similar to the development trend of large language models.At present, it is often necessary to train models separately for different container specifications and even different drug solutions. Given the similarity between qualified samples and defective samples, as well as the latest advances in algorithms, the industry is attempting to integrate different models to form a unified universal detection model. This can not only reduce the workload of customers in model switching, lower operational risks, but also significantly alleviate the burden of repeated calibration for equipment manufacturers.
For many years, the limited depth of field in camera imaging has been limiting detection capabilities, especially when detecting small particles in relatively large containers such as 30ml penicillin bottles. With the predictive power of AI, researchers are developing algorithms to predict the trajectory of particles in three-dimensional space by analyzing the top 20% of image sequences, and to control the liquid lens in real-time to adjust the focal plane. This method canOvercoming shallow depth of field limitationsBy obtaining clearer suspected particle images, the missed detection rate was reduced from 2% to 0.2%, and the detection rate was increased from 98.5% to 99.8%.
Advanced AI vision technology can also achieve more refined defect classification and characterization, providing manufacturers with deeper information about pollution sources and patterns. Machine learning algorithms can identify trends in defect occurrence, thereby supporting predictive maintenance and process optimization.This expands the value of AI from a single detection stage to a broader field of manufacturing intelligence.
Strategic implementation considerations
The successful introduction of AI driven pharmaceutical visual inspection requires systematic planning at the technical, regulatory, and organizational levels.Manufacturers should evaluate the existing quality control infrastructure, identify specific improvement opportunities, and develop phased implementation plans to minimize the impact on production operations. Regulatory factors should be integrated into technology selection and validation strategies, while meeting current requirements and preparing for future regulatory changes.
Training and change management are equally crucial.Employees need to understand new technologies and adapt to new ways of working. Quality inspectors need to master AI system validation and continuous monitoring methods, while production personnel need to be familiar with the operation of automated systems and exception handling processes. The support of management and clear communication of implementation benefits help ensure organizational recognition and successful implementation of technology.
At the financial level, decision-makers should not only focus on initial capital investment, but also comprehensively evaluate itLong term operating incomeThis includes reducing waste, improving compliance capabilities, and enhancing product quality. The overall cost of ownership analysis should cover labor savings, reduced recall risks, and competitive advantages brought about by excellent quality control capabilities.
Conclusion
The pharmaceutical industry is standing at a critical historical juncture. Moving from manual detection to AI systems has achieved a huge leap in accuracy,This is not only a technological upgrade, but also represents a fundamental shift in the way we safeguard human health.Manufacturers embracing this change are not just updating their equipment, but establishing a leadership position and winning trust in an industry where precision is life.
The performance of manual detection and traditional methods is approaching the upper limit, while AI driven detection is still advancing with algorithm breakthroughs. The future detection rate is expected to approach 99.8%, transforming today's ambitious goals into tomorrow's minimum standards. This technology has surpassed commercial indicators and become an important tool for global health protection:Every contaminated drug successfully intercepted is a guardian for a patient.
With increasingly strict regulatory requirements and continuous changes in the market environment,AI visual inspection is transforming from an emerging technology to a critical infrastructure.Manufacturers who deploy this technology first will establish increasingly difficult to replicate competitive advantages. In a regulatory environment where quality control capabilities determine market access and operational sustainability, AI driven quality testing has become a core component of future pharmaceutical manufacturing excellence.

References:
1. Chooi, W.H. et al. (2022) Vaccine contamination: Causes and control, 《Vaccine》。 Available from PMC database (accessed on August 20, 2025)
2. (2021) "Visible Foreign Matter Detection in Injections - Industry Guidelines", US Food and Drug Administration (FDA). Available from FDA official documents (accessed on August 20, 2025)
3. (2014) United States Pharmacopeia, Chapter 790. Available on the USP official website (accessed on August 21, 2025)
4. (2025) "GMP Appendix 22: Artificial Intelligence", draft document of the European Commission. Available from the EU Health Department (visit date: August 20, 2025)
5. (2011) "GMP Appendix 11: Computerized Systems", European Commission. Available from the EU Health Department (visit date: August 20, 2025)
6. (2022) GMP Appendix 1: Manufacturing of Sterile Medicinal Products. Available from official EU documents (accessed on August 21, 2025)
7. "Visual Inspection Using Machine Learning/Artificial Intelligence", Pharmaceutical Engineering (November December 2020). Available on the official ISPE website (accessed on August 20, 2025)
8. Xin Weisheng (2025) "Comparative Study of AI Driven Visual Inspection Performance and Traditional Visual Inspection Equipment", internal research data, unpublished
9. Xin Weisheng (2025) "Comparative Study of AI Driven Visual Inspection Performance and Traditional Visual Inspection Equipment", internal research data, unpublished
10. Cherris, R. (2016) "Injection Visual Inspection - NGVF Master Class Presentation", PDA/PharmOut。 Available on PharmOut official website (accessed on August 21, 2025)
11. Mazaheri, M. et al. (2024) "Monitoring Visible Particles in Extraintestinal Preparations through Artificial Visual Inspection - Re evaluating Size Thresholds and Other Particle Characteristics Defining Particle Visibility", 《Journal of Pharmaceutical Sciences》。 Available on ScienceDirect (accessed on August 28, 2025)
12. Xin Weisheng (2025) "Company Forecast of Future AI Visual Inspection Detection Rate", internal estimation data, not publicly available