Skip to main content

Can AI be used for automated visual inspection of injectable products, and how do you qualify it?

Yes. EU, UK and PIC/S Annex 1 and FDA’s draft guidance treat a trained model like any automated inspection: validated to detect known defects, equal to or better than manual inspection, and, under Annex 1, challenged with representative defects before start-up and during each batch. Qualify it against manual inspectors with a Knapp comparison on a masked, QA-approved defect set. Draft EU Annex 22 adds a frozen model, independent test data, criteria fixed in advance and change control for retraining.Checked against its sources on 26 November 2026. How these answers are made

1What the rules allow.

Where automated methods are used, Annex 1 says the process “should be validated to detect known defects (which may impact product quality or safety) and be equal to, or better than, manual inspection methods”, and the equipment should be challenged “using representative defects prior to start up and at regular intervals throughout the batch”.1 FDA’s draft guidance says automated inspection machines “should be validated to meet or surpass human inspection capabilities and can be qualified using training standards or artificial intelligence technology”.2

TextStatus on 26 November 2026What it adds
EU Annex 1, 8.30 to 8.33In operation since 25 August 2023;1 same text in PIC/S PE 009-⁠18, in force 24 September 2026;3 MHRA, a PIC/S member, points UK sites to EudraLex Volume 44,5Equal to or better than manual; challenged during the batch; trended
Annex 11In operation since 30 June 20116Replacing a manual operation should cause “no resultant decrease in product quality, process control or quality assurance”6
21 CFR 211.68Regulation7A written program of checks; record changes by authorized people only7
USP <790> and <1790><790> official, and FDA says products with a USP monograph must meet it; <1790> informational2“Essentially free” of visible particulates; “Visual inspection is a probabilistic process”8,9
FDA particulates draftDraft since December 202110Validated against human capability; QA-approved test sets
FDA AI draftDraft since January 202511Model risk; life-cycle maintenance plans; early engagement12
Draft Annex 22Consulted on 7 July to 7 October 2025; not yet in EudraLex13,14Controls for trained models, in the template below15

FDA’s AI draft rates AI checking every vial’s fill level as medium risk, because release testing still samples fill volume; its steps are on FDA’s AI guidance. For a product- or process-specific model, it wants a summary of the life-cycle maintenance plan in the marketing application, and the detailed plan (metrics, monitoring frequency, retest triggers) in the site’s quality system for review.12 Draft Annex 22 covers only static, deterministic models, though EMA’s June 2026 workshop report says the drafting group has discussed allowing dynamic and probabilistic models backed by “a fully documented, robust, risk-based control strategy”.15,16

1.1Where a trained model fits.

If a rule-based recipe already meets Annex 1 8.32 in the Knapp comparison below, a trained model adds draft Annex 22’s work (a frozen model, an independent test set, logged confidence, a retest decision on every change) and no regulatory benefit: Annex 1’s bar is unchanged, and draft Annex 22 4.3 would hold the model to at least the recipe’s performance.1,15 Consider one where a recipe cannot reach the bar. For what FDA calls obvious challenges to visual inspection, opaque products and containers (“lyophilized powders, suspension products, tinted vials”), its examples of what helps are other wavelengths and sensors and X-ray, and a trained model can judge only what its sensor captures. Supplemental destructive testing “may not be warranted” if the technology “is validated to meet or surpass human inspection capabilities”. Before you buy, run the product-specific feasibility study the draft asks manufacturers for.2 Either way, FDA told Baxter that automated particle inspection “does not supplant the need for 100% manual visual inspection for various other attributes (e.g., cracks)”, so write down what the model does not judge.17

2Qualification protocol template.

One protocol can meet Annex 1, which compares the machine with manual inspection, and draft Annex 22, which compares it with the process replaced and wants the plan approved before testing.1,15

Table 2. A template. Draft Annex 22 rows are draft text.
SectionWhat it containsRequirement
Intended useProducts, containers and defect classes the model judges, including rare variations such as amber glass; what it does not judgeAnnex 22 3.1, 3.2 and 5.115
Defect libraryEvery known defect class, down to the lower limit of detection found in threshold studiesAnnex 1 8.30;1 FDA draft IV and V.C2
Test setGood and defective units, at most 10 to 20% defective, approved by QA, identities masked; generated images “not recommended”FDA draft V.C;2 Annex 22 5.615
Size per classEnough distinct defective units in each class for stated statistical confidenceAnnex 22 5.2;15 FDA draft V.C2
BaselinesRepeated inspection by qualified inspectors, and by the process replaced if not manualAnnex 1 8.32;1 Annex 22 4.315
CriteriaDetection and false rejection against each baseline, by class; approved before testingAnnex 22 4.1 to 4.315
LabelsEach defective unit’s class confirmed by several experts or a laboratory testAnnex 22 5.315
IndependenceNo test unit or image used to train, validate or tune the model, unless its features are independent; access loggedAnnex 22 6.1 to 6.415
ConfidenceConfidence logged per decision; an “undecided” threshold; the features behind each rejection reviewedAnnex 22 8.1 to 9.215
AccessWho can change recipes, thresholds, the cut-off and model versions; audit trail211.68(b);7 FDA Q&A 4;18 Annex 22 10.215
Routine challengeBefore start-up and at set intervals in each batch; response to a failureAnnex 1 8.321
RequalificationMethod and frequency; triggers such as a change, a failed challenge, an adverse reject trend or input drift; configuration controlFDA draft V.C;2 Annex 1 8.33;1 Annex 22 10.1 to 10.415

2.1Knapp test procedure and acceptance criteria.

Neither Annex 1 nor FDA’s draft prescribes how to compare a machine with people. The usual method is Knapp’s, described in a 2011 paper FDA’s draft cites.19

  1. Build a challenge set of good units and units with one particle each, rejects never more than 20% of it.
  2. Qualified inspectors inspect every unit many times, giving each its own probability of rejection.
  3. Sort units into zones: rejected under 30% of the time is acceptable, 30 to 70% gray, above 70% a reject.
  4. Reject zone efficiency (RZE) is the probability of detecting reject-zone units; false rejection (RAG) is the rejection of acceptable and gray-zone units.
  5. Run the machine on the same set many times and calculate the same figures.

The paper allows other methods, but “they must be based on multiple inspections of the challenge set”. It says a replacement must show “a detection probability that is greater than or equal to manual baseline”, and that RAG “is used to set the maximum acceptable level of False Rejection”.19 So a defensible acceptance rule is machine RZE at least the baseline’s, overall and per class, and machine RAG under a ceiling the protocol sets, such as the baseline’s own. FDA has also set a floor for one firm, people and machines alike: “At a minimum, your visual inspection systems should reliably be capable of detecting particulates of 150 microns or greater at a 70% probability of detection.”20

2.2Who does what.

  • Process expert: owns the intended use and acceptance criteria, approved before testing, and helps write the test plan (Annex 22 3.1, 4.2, 7.2).15
  • Quality assurance: prepares, approves and controls the test set, reviews the defect library and approves the protocol (FDA draft V.C).2
  • Inspectors: confirm each defective unit is detectable under normal conditions before it joins the set (FDA draft V.C),2 then form the manual baseline.19
  • Model developers: use only training and validation data; anyone who has seen test data stays out, or pairs with a colleague who has not (Annex 22 6.1, 6.5).15

For the rest of the draft, see EU GMP Annex 22.

3What an inspector asks to see.

Expect these records at a pre-approval or routine inspection.

  1. Protocol and report, with Knapp data per vial and baseline: Annex 1 8.32, FDA draft V.C, draft Annex 22 7.2 to 7.4.1,2,15
  2. Test-set and challenge-kit records: vial inventory, particle size and material, label checks, QA approval, access log: FDA draft V.C; draft Annex 22 5.3 and 6.2.2,15
  3. Routine challenge records for each batch: Annex 1 8.32 and the written records 211.68(a) requires.1,7
  4. Investigations of failed challenges and AQL failures, extended to every unit and batch in doubt: FDA draft V.E, citing 211.192.2
  5. Model version, checksum and change history, with each retest decision: draft Annex 22 10.1 and 10.2; FDA’s life-cycle maintenance plan.15,12
  6. Reject trends by defect type and monitoring metrics, adverse trends assessed for marketed product: Annex 1 8.33; draft Annex 22 10.3 and 10.4.1,15
  7. The role list and audit trail for recipe, threshold, cut-off and model changes: FDA’s data integrity Q&A names “automated visual inspection records” among records only authorized people should change under 211.68(b).18,7

4Example: qualifying a deep-learning inspection model.

This example is invented for illustration. Exemplomab 50 mg/mL injection in 2 mL clear glass vials is filled at the Larchford site, which replaces its semi-automated particle inspection with a machine running a deep-learning model.

Table 3. Example. A qualification record, invented for illustration.
FieldEntry
ProtocolVAL-⁠AVI-⁠031, approved by QA on 9 March 2026, before any test unit was run
ModelDL-⁠07 version 1.4, frozen on 3 March 2026, checksum in the protocol; trained on 21,600 images from 2024 and 2025; “undecided” cut-off of 0.80, set on the validation set
ScopeVisible particles in solution. Cracks, closure and fill defects stay with rule-based stations and acceptance quality limit (AQL) sampling
Test set800 vials made 10 to 13 March: 680 good and 120 seeded, 30 per particle class (15%); locked by QA, images access-controlled with an audit trail
Minimum per class20 distinct reject-zone vials: if all are detected, the one-sided 95% lower confidence bound on detection is 86.1%
LabelsParticle size and material confirmed by microscopy and two senior inspectors
Particle sizesGlass, elastomer and metal 50 to 500 µm; fibers 75 to 1,500 µm long. Lower limit of detection (70% detection) in the 2025 manual threshold study: 100 µm for elastomer and metal, 125 µm for glass and fibers
BaselinesManual: 5 qualified inspectors, 4 inspections each of every vial, 16 to 27 March (20 per vial). Semi-automated: the same 5, 2 each (10 per vial)
ZonesOf the 120 seeded vials, 90 in the reject zone, 20 gray, 10 accept
Machine runs10 runs of each vial at 300 a minute on 7 April: 8,000 decisions; “undecided” counts as a reject
CriteriaMachine RZE at least the higher baseline, overall and per class; every reject-zone vial rejected in at least 8 of 10 runs; machine RAG no higher than either baseline
RequalificationChallenge kit before start-up and every two hours; the 10 machine runs repeated yearly on the locked test set, and after retraining, a camera or lighting change, or falling detection in routine challenges
Elapsed timeSeven weeks, from model freeze on 3 March to the report on 21 April, not counting the training-set build
Table 4. Example. Rejections of reject-zone vials by baseline.
Particle classVialsManual RZESemi-automated RZEMachine RZE
Glass24394 of 480, 0.821209 of 240, 0.871233 of 240, 0.971
Fiber21361 of 420, 0.860187 of 210, 0.890200 of 210, 0.952
Elastomer22396 of 440, 0.900200 of 220, 0.909220 of 220, 1.000
Metal23396 of 460, 0.861205 of 230, 0.891221 of 230, 0.961
All901,547 of 1,800, 0.859801 of 900, 0.890874 of 900, 0.971

Every reject-zone vial was rejected in at least 8 of 10 machine runs. With all 21 fiber vials detected, the one-sided 95% lower bound for that class is 86.7%; for all 90, 96.7%. All 28 vials with particles of 150 to 199 µm fell in the reject zone, each detected over 70% of the time by inspectors (448 of 560, 80.0%) and machine (268 of 280, 95.7%): both clear the floor FDA set for Fresenius Kabi.

Table 5. Example. Rejections of gray-zone, accept-zone and good vials.
PopulationManualSemi-automatedMachine
Gray zone, 20 vials196 of 400, 49.0%118 of 200, 59.0%151 of 200, 75.5%
Accept zone, 10 seeded31 of 200, 15.5%19 of 100, 19.0%28 of 100, 28.0%
Good, 680 vials381 of 13,600, 2.8%245 of 6,800, 3.6%109 of 6,800, 1.6%
RAG, all three608 of 14,200, 4.3%382 of 7,100, 5.4%288 of 7,100, 4.1%

On the Annex 22 metrics, sensitivity on reject-zone vials was 97.1% (874 of 900) and specificity on good vials 98.4% (6,691 of 6,800). Every criterion was met, and heat maps for every rejection were centered on the particle, not on the vial shoulder or a reflection. QA approved the report on 21 April 2026 and the model was released under change control.

Worth copying: gray-zone rejection reported on its own line, since it is the buffer the paper describes, and distinct vials counted per class, not runs.

5Retraining and model updates.

Draft Annex 22 asks for every change, “including any change to physical objects the model is using as input”, to be evaluated for retesting, and a decision not to retest should be “fully justified”.15

ChangeUsual responseRule
Retrained on more imagesNew version: full retest on test data the retraining never touchedAnnex 22 6.1 and 10.115
Confidence cut-off movedChoose it on validation data, never by tuning on the test set; confirm the metrics on test dataAnnex 22 6.1, 9.2 and 10.115
New container or supplierAssess as a new subgroup; usually retestAnnex 22 3.2 and 10.115
Camera or lighting changeRetest and check drift against the baselineAnnex 22 10.1 and 10.315
Platform patch onlyRegression test and a written justification for not retesting the modelAnnex 22 10.115

6What inspectors cite.

“We encourage the use of automated visual inspection for particulates to augment the 100% manual visual inspection program. Automated methods should be rigorously studied for their capability and robustness under various conditions, machine settings, container-closure sizes, defect types, and other variables.” Baxter Healthcare Corporation, warning letter 320-⁠23-⁠18, 25 July 202317

The Form 483 behind it found machine recipes “inadequate for further qualification work” kept in use for US batches after failing challenge tests;21 in 2026 FDA found Fresenius Kabi’s systems “often exhibited low detectability and high variability regardless of particle type”.20

“Particulates in challenge kits were excessively large (e.g., greater than (b)(4) microns), approximately (b)(4) times larger than what operators should be capable of reliably detecting.” Baxter International Inc., warning letter 320-⁠26-⁠132, 29 September 202622

A model qualified on that kit inherits its blind spot. For inspector qualification and AQL sampling, see visual inspection of injectables.

7How it runs in Seal.

In Seal, the visual inspection blueprint gives automated inspection a recipe and evidence state: cameras, lighting, algorithms, thresholds, software and recipe versions, setup checks and challenges. Each production population references the released recipe actually used, and a failed challenge identifies the time window and population inspected under an unacceptable state before reinspection or investigation is routed. The defect library keeps provenance, approval and effective dates, first-pass findings are kept through reinspection, and the inspection machine can stay the source for its images and classifications. It is part of Seal’s records for sterile injectables.

Seal’s computer system assurance records link a regulated system’s intended use, function risk, supplier evidence, configuration baseline, testing, anomalies and release, and confirm that production matches the released baseline before regulated use. An inspection system’s software and model versions can be released the same way, each change assessed from what moved.

AQuestions and answers

Who should label the images used to train and test an inspection model?

Experienced inspectors and process experts label; QA approves the test set. Draft Annex 22 wants test labels verified to a very high degree of correctness, for example by several experts or by laboratory tests such as microscopy. Labels for training images matter too, because a model learns whatever the labels teach it, so record who labeled each set and how disagreements were settled.

Does an AI inspection machine remove the need for AQL sampling?

No. The machine replaces or supports the 100% inspection step. FDA’s draft guidance still expects the quality unit to sample each batch for AQL testing after 100% inspection, and Annex 1 treats a critical defect found in later sampling as a sign the original inspection may have failed, which needs investigating.

How often should an automated inspection machine be challenged during a batch?

Annex 1 asks for a challenge with representative defects before start-up and at regular intervals throughout the batch, but sets no interval. Choose it by how many units you are prepared to reinspect if a challenge fails, because every unit inspected since the last good challenge is in doubt. Long batches and frequent recipe changes argue for shorter intervals.

Does draft Annex 22 apply to inspection machines that use classical vision algorithms?

No. The draft applies to machine learning models that gained their function by training on data rather than being explicitly programmed. A recipe of engineer-set thresholds is not an AI model under it, but Annex 1 and Annex 11 still apply. Many machines mix the two, so record which stations run trained models.

What should happen to vials the model can’t classify confidently?

Draft Annex 22 expects the confidence score of each decision to be logged during testing where applicable, and an appropriate threshold, and says to consider flagging very low-confidence results as undecided rather than guessing. Treat undecided vials as rejects or send them to qualified manual inspection, as your procedure says, and count them in the qualification so false rejection is not understated. A rising share of undecided vials in production is a drift signal worth trending.

Do we need to tell FDA before switching to AI visual inspection?

Usually, in some form. For an approved product, a new inspection method is a post-approval manufacturing change, and FDA’s particulates draft says such changes must follow its existing rules, such as 21 CFR 314.70 for drug applications and 601.12 for biologics, which set the reporting category. FDA’s AI draft adds that later model changes affecting performance should be reported the same way, and it encourages early talks with CDER’s Emerging Technology Program or CBER’s Advanced Technologies Team before AI is used in manufacturing.

References22 sources

References

  1. 1EudraLex Volume 4, Annex 1: Manufacture of Sterile Medicinal Products, European Commission, 22 August 2022, deadline for coming into operation 25 August 2023, sections 8.30 to 8.33. https://health.ec.europa.eu/system/files/2022-08/20220825_gmp-an1_en_0.pdf (read 26 November 2026)
  2. 2Inspection of Injectable Products for Visible Particulates, draft guidance for industry, FDA, December 2021, sections I, II, IV and V, and footnotes 6 and 18. https://www.fda.gov/media/154868/download (read 26 November 2026)
  3. 3PE 009-⁠18 (Annexes), Guide to Good Manufacturing Practice for Medicinal Products, Annex 1, sections 8.30 to 8.33, PIC/S, 24 September 2026; entry into force in PE 009-⁠18 (Intro). https://picscheme.org/docview/11333 (read 26 November 2026)
  4. 4Members, PIC/S, United Kingdom: Medicines and Healthcare products Regulatory Agency. https://picscheme.org/en/members (read 26 November 2026)
  5. 5Good manufacturing practice and good distribution practice, MHRA, GOV.UK. https://www.gov.uk/guidance/good-manufacturing-practice-and-good-distribution-practice (read 26 November 2026)
  6. 6EudraLex Volume 4, Annex 11: Computerised Systems, European Commission, in operation since 30 June 2011, principle. https://health.ec.europa.eu/system/files/2016-11/annex11_01-2011_en_0.pdf (read 26 November 2026)
  7. 721 CFR 211.68, Automatic, mechanical, and electronic equipment, paragraphs (a) and (b), eCFR. https://www.ecfr.gov/current/title-21/section-211.68 (read 26 November 2026)
  8. 8General Chapter <790> Visible Particulates in Injections, USP–NF, United States Pharmacopeia, 2017, introduction (public preview), DOI 10.31003/USPNF_M7197_01_01. https://doi.usp.org/USPNF/USPNF_M7197_01_01.html (read 26 November 2026)
  9. 9General Chapter <1790> Visual Inspection of Injections, USP–NF, United States Pharmacopeia, 2023, introduction (public preview), DOI 10.31003/USPNF_M7198_07_01. https://doi.usp.org/USPNF/USPNF_M7198_07_01.html (read 26 November 2026)
  10. 10Inspection of Injectable Products for Visible Particulates, guidance page, FDA, docket FDA-⁠2021-⁠D-⁠0241, content current as of 17 December 2021. https://www.fda.gov/regulatory-information/search-fda-guidance-documents/inspection-injectable-products-visible-particulates (read 26 November 2026)
  11. 11Considerations for the Use of Artificial Intelligence To Support Regulatory Decision-⁠Making for Drug and Biological Products, guidance page, FDA, docket FDA-⁠2024-⁠D-⁠4689, content current as of 6 January 2025. https://www.fda.gov/regulatory-information/search-fda-guidance-documents/considerations-use-artificial-intelligence-support-regulatory-decision-making-drug-and-biological (read 26 November 2026)
  12. 12Considerations for the Use of Artificial Intelligence to Support Regulatory Decision-⁠Making for Drug and Biological Products, draft guidance, FDA, January 2025, sections IV.A.1 to IV.A.3, IV.B and IV.C. https://www.fda.gov/media/184830/download (read 26 November 2026)
  13. 13Stakeholders’ Consultation on EudraLex Volume 4, Good Manufacturing Practice Guidelines: Chapter 4, Annex 11 and New Annex 22, European Commission, open 7 July to 7 October 2025. https://health.ec.europa.eu/consultations/stakeholders-consultation-eudralex-volume-4-good-manufacturing-practice-guidelines-chapter-4-annex_en (read 26 November 2026)
  14. 14EudraLex Volume 4, Good Manufacturing Practice guidelines, European Commission. https://health.ec.europa.eu/medicinal-products/eudralex/eudralex-volume-4_en (read 26 November 2026)
  15. 15EudraLex Volume 4, Annex 22: Artificial Intelligence, draft for consultation, European Commission, drafted by the EMA GMDP Inspectors Working Group with PIC/S, July 2025, sections 1 to 10. https://health.ec.europa.eu/document/download/5f38a92d-bb8e-4264-8898-ea076e926db6_en?filename=mp_vol4_chap4_annex22_consultation_guideline_en.pdf (read 26 November 2026)
  16. 16Multistakeholder workshop on expert contributions to artificial intelligence guidance development (Annex 22), report, EMA/156789/2026, European Medicines Agency, workshop of 30 June 2026, first published 2 October 2026 on EMA’s event page. https://www.ema.europa.eu/en/documents/report/report-multistakeholder-workshop-expert-contributions-artificial-intelligence-guidance-development-annex-22_en.pdf (read 26 November 2026)
  17. 17Baxter Healthcare Corporation (Baxter Pharmaceuticals India, Ahmedabad), warning letter 320-⁠23-⁠18, MARCS-⁠CMS 654136, FDA, 25 July 2023. https://www.fda.gov/inspections-compliance-enforcement-and-criminal-investigations/warning-letters/baxter-healthcare-corporation-654136-07252023 (read 26 November 2026)
  18. 18Data Integrity and Compliance With Drug CGMP: Questions and Answers, Guidance for Industry, FDA, December 2018, question 4. https://www.fda.gov/media/119267/download (read 26 November 2026)
  19. 19Melchore JA, Sound Practices for Consistent Human Visual Inspection, AAPS PharmSciTech 12(1):215–221, published 4 January 2011, the paper cited in FDA’s draft guidance as Melchore 2011. https://pmc.ncbi.nlm.nih.gov/articles/PMC3066354/ (read 26 November 2026)
  20. 20Fresenius Kabi USA LLC, warning letter 320-⁠26-⁠129, MARCS-⁠CMS 733107, FDA, 22 September 2026. https://www.fda.gov/inspections-compliance-enforcement-and-criminal-investigations/warning-letters/fresenius-kabi-usa-llc-733107-09222026 (read 26 November 2026)
  21. 21Form FDA 483, Baxter Pharmaceuticals India Pvt Ltd, Ahmedabad, inspection of 19 to 27 January 2023, observation 1, FDA. https://www.fda.gov/media/175813/download (read 26 November 2026)
  22. 22Baxter International Inc. (Baxter Healthcare Corporation, Round Lake), warning letter 320-⁠26-⁠132, MARCS-⁠CMS 733231, FDA, 29 September 2026. https://www.fda.gov/inspections-compliance-enforcement-and-criminal-investigations/warning-letters/baxter-international-inc-733231-09292026 (read 26 November 2026)

See your process in Seal.

Bring a procedure or a recurring problem. See how your team configures it with Neil and improves the next run.