SIC 3841  ·  Surgical Instruments  ·  AI Quality Control

The defect that reaches the operating room costs more than a factory.

A five-step agentic inspection pipeline — two-stage YOLOv8 vision (custom-trained on 10,764 industrial metal defect images, mAP50 0.764), Claude AI reasoning, and a built-in QMSR audit trail. Live on AWS. Real inference. Real compliance.

CUA AI VIBE CODING COMPETITION 2026 · 10,764 Training Images · 5-Tool Agentic Loop · mAP50 0.764 Defect Model · VIEW REPO ↗
0
Medical device recalls, FY 2020–2024
U.S. GAO Report GAO-26-107619
0%
Recall rate increase in 2024 alone
Sedgwick Recall Index 2024
$0M
Average cost per major product recall
McKinsey & Company
The Problem

Manual inspection is failing at scale.

Surgical instrument manufacturers rely on human visual inspection before instruments reach hospitals. The failure rate, the audit gap, and the recall cost all point to the same structural problem.

01

Fatigue degrades accuracy

Inspector accuracy drops measurably after two hours. The same defect passes the morning shift and fails the afternoon shift. There is no reproducible baseline.

02

Micro-defects are invisible to the naked eye

Cracks under 0.1mm, early-stage corrosion, and surface porosity — the defects most likely to cause OR failure — require magnification and controlled lighting that manual inspection cannot consistently apply at line speed.

03

Audit trails are built on paper

FDA's new QMSR (effective Feb 2, 2026) requires retrieval-ready, immutable, event-linked inspection records. Manual paper logs cannot satisfy this standard under audit.

04

Recall costs dwarf prevention costs

A single major recall costs $600M on average. The all-in cost to deploy DAMIAN on one line: $203K. The math is not complicated.

3,934
Device recalls in 5 years
U.S. GAO Report GAO-26-107619
PATIENT SAFETY CRISIS
$600M
Average cost per major recall
McKinsey & Company
PREVENTION ROI: 2,900%
QMSR EFFECTIVE
Feb 2,
2026
FDA Quality Management System Regulation now in effect. Manufacturers must produce defensible, event-linked inspection evidence under Compliance Program 7382.850.
How It Works

Five steps. Upload to audit log in under 2 seconds.

A fully agentic inspection pipeline — no scripted logic, no hardcoded rules. Claude reasons about each instrument independently using YOLO scan output, regulatory context, and risk scoring.

01 🔍
Image Quality Check
Claude vision pre-screens for resolution, framing, and lighting before committing to inference. Scores 0–100. Rejects unusable inputs.
CLAUDE VISION · SCORE 0–100 · PRE-SCREEN
02 ⚡
YOLOv8 Vision Scan
Two-stage architecture: YOLOv8n classifies the instrument type (6 classes) first, then YOLOv8s runs surface defect detection. Stage 2 was custom-trained on 10,764 industrial metal images — cracks, corrosion, scratches, porosity. mAP50: 0.764.
YOLOV8N + YOLOV8S · 5 DEFECT CLASSES · mAP50 0.764
03 📋
Regulatory Context
Maps detected defect to applicable FDA and ISO standard. Returns severity baseline, recall probability, and sterilization risk per 21 CFR 820.80(c).
21 CFR PART 820 · ISO 7153-1 · ASTM A967
04 ⚖️
Composite Risk Score
FMEA formula: CRS = S × O × D × P(recall|defect) × trend. Classifies PASS / FLAGGED / FAIL. HIGH risk triggers quarantine.
FMEA · CRS · RISK CLASSIFICATION
05 📁
Audit Log & Report
Immutable record: inspection ID, timestamp, image hash, model version, verdict, Claude reasoning, operator ID — mapped to QMSR §820.45 DHR.
21 CFR PART 820 · ISO 13485 · 21 CFR PART 11

The competitive moat

Three capabilities no incumbent — Cognex, Keyence, Teledyne, Landing AI, Instrumental, or any AI-native challenger — ships together in a single system.

DOMAIN-SPECIFIC TRAINING
How the Model Was Built
Cosmas uses a two-stage YOLOv8 pipeline trained from scratch for this domain. Stage 1 (YOLOv8n): instrument type classifier fine-tuned on real surgical instrument images — identifies 6 instrument classes before any defect analysis runs. Stage 2 (YOLOv8s): custom-trained surface defect detector. Surgical instruments are surgical-grade stainless steel — the defect morphology (cracks, corrosion, porosity, surface scratches) follows the same physics as industrial metal surfaces. Training data: 10,764 labeled images drawn from NEU Surface Defect Database, a Rust Corrosion dataset, NEU Steel Kaggle, and a Synthetic Industrial set. Trained in Google Colab for 77 epochs with early stopping (patience = 20). The model converged at epoch 57. mAP50: 0.764. This is not a general-purpose object detector repurposed for QC — it was trained specifically for this failure mode taxonomy.
10,764
Training images
0.764
mAP50 score
57
Epochs to convergence
AGENTIC AI REASONING
Claude Doesn't Just Classify — It Reasons
Each inspection produces a full written analysis: FDA citation, FMEA risk score, recommended action, regulatory note, and sterilization risk flag. Designed to augment human judgment, not replace it. Every result is auditable, explainable, and defensible under FDA inspection.
BUILT-IN COMPLIANCE
Native QMSR Audit Trail
Compliance is a byproduct of the inspection — not a separate workflow. Every event auto-generates a 21 CFR Part 820-compliant, Part 11-signed record. Audit-ready from day one.
LIVE ON AWS
Deployed. Not a Prototype.
Running on EC2 with HTTPS, nginx, systemd, and a full inspection history database. The GitHub repo has 65+ commits documenting every decision. This is a real system.
Live System

See Damian work on a real inspection.

Inspection #60. A needle holder with corrosion. Five agent steps, 737ms analysis time. Claude cites 21 CFR 820.88(c), ISO 7153-1, ASTM A967. Verdict: FAIL. CRS: 192.5 HIGH. Recommended action: quarantine.

DAMIAN — Inspection Terminal cosmas-damian.duckdns.org
Run Your Own Inspection → Try the Simulation
Interactive Demo

Upload an image. See the pipeline.

This simulation walks through the inspection flow. To run real inference against the live model, open the application.

Inspection Pipeline — Simulation
🔬
Drop a surgical instrument image
or click to browse  ·  JPG, PNG, WEBP

Defect Classes

Cracks — stress fractures at joints and hinges
Corrosion — surface oxidation on stainless steel
Scratches — blade and shaft surface damage
Porosity — subsurface voids from manufacturing

Compliance Framework

21 CFR Part 820 FDA QMSR 2026 21 CFR Part 11 ISO 13485 ISO 7153-1 ASTM A967

Every inspection generates an immutable record linking verdict, image hash, model version, operator ID, and timestamp — satisfying DHR requirements under QMSR §820.45.

Model Details

Stage 1 — Instrument Classifier: YOLOv8n fine-tuned on real surgical instrument imagery. Identifies 6 instrument types before defect analysis begins.

Stage 2 — Defect Detector: YOLOv8s custom-trained on 10,764 industrial metal surface images (NEU Surface Defect, Rust Corrosion, NEU Steel Kaggle, Synthetic Industrial). Trained 77 epochs, converged at epoch 57 via early stopping. mAP50: 0.764.

Reasoning Layer: Claude Sonnet 4 receives YOLO detections, regulatory context, and risk inputs — and produces a written inspection rationale per run. Confidence scores are always displayed. This system augments human judgment; it does not replace it.

Run real inference →

Ready to see the real thing?

Full application live on AWS. Login, upload, and watch the five-step pipeline generate a real QMSR-compliant inspection report.

Open DAMIAN →

Model DAMIAN savings against real financials.

Select a publicly traded surgical instrument manufacturer. Cost savings are derived from FY2024 10-K filings using a fully documented assumptions chain — not marketing projections.

--
--
FY2024 Revenue
--
Source: 10-K filing
Cost of Goods Sold
--
Source: 10-K filing
Implied QC Cost
--
Rev × 2.5% [McKinsey]
Inspection Labor
--
40% of QC Cost [ASQ]
Estimated DAMIAN Savings — Three-Year Ramp
Year 1
--
--
20% inspection labor reduction
Year 2
--
--
35% inspection labor reduction
Year 3
--
--
50% inspection labor reduction
1 Total Quality Cost = Revenue × 2.5%. Medical device manufacturers typically spend 2–3% of revenue on internal quality costs including inspection, testing, and appraisal. McKinsey Life Sciences
2 Inspection & testing labor = 40% of total quality cost. Appraisal costs (manual inspection, in-process testing) represent 35–45% of the Cost of Quality in precision manufacturing. ASQ CoQ Framework
3 Vision-inspectable tasks = 60% of inspection labor. Surface defects, dimensional checks, finish quality, and coating integrity are addressable by computer vision systems. Manufacturing benchmark
4 Labor reduction ramp: 20% in Year 1 (pilot lines), 35% in Year 2 (expanded deployment), 50% in Year 3 (full adoption + continuous learning). Conservative relative to published AI inspection benchmarks. Conservative estimate
5 Recall avoidance: average surgical instrument recall costs $3.2M in direct costs. DAMIAN estimated to reduce defect escape rate by 15% (Y1) → 35% (Y3). Recall frequency scaled to COGS volume. FDA MAUDE database
⚠ This is a financial simulation for illustration only. It is not a projection, guarantee, or endorsement by any referenced company. Actual savings depend on deployment scope, product mix, defect rates, and inspection volume. Disclaimer
Claude Sonnet 4 · Strategic Analysis Generated in real time · Not a projection

Savings estimates are derived from publicly available FY2024 10-K filings. Sources cited per company. DAMIAN augments human QC judgment — it does not replace it. Not a financial projection. Not endorsed by or affiliated with any company listed above.

AI for the Common Good

Built to make the inspector's
judgment flourish.

On May 25, 2026, Pope Leo XIV published Magnifica Humanitas — the first papal encyclical on artificial intelligence. Its central question is the same one Cosmas was built to answer: does this AI serve the person using it, or does it try to replace them?

△

Human judgment is the terminal decision

DAMIAN never autonomously removes an instrument, updates a production record, or sends an asset downstream. Every PASS, FLAGGED, and FAIL is a recommendation. A human QC inspector acts on it. That is not a limitation — it is the design.

◇

Uncertainty is always shown, never hidden

Confidence scores appear on every result. If confidence falls below the inspector's threshold, a PASS automatically escalates to FLAGGED. The full 5-step AI reasoning chain is accessible on every inspection record. The inspector always knows what the AI considered and how sure it was.

○

The common good, not just the ROI

FDA MAUDE records document real patient harm from defective surgical instruments. The business case — faster inspection, lower cost, better defect rates — is real. But the reason it matters is the patient on the table who cannot inspect the instruments used on them. Cost savings are the mechanism; patient safety is the purpose.

□

No claims we cannot substantiate

Magnifica Humanitas calls the honest pursuit of truth a common good. Cosmas discloses its model accuracy (mAP50 = 0.764), does not claim FDA approval, and does not claim the system prevents patient harm. The audit trail is real. The confidence scores are real. The limitations are documented.

◆

Speed for the inspector, not instead of the inspector

A QC inspector reviewing 200+ instruments per shift faces fatigue, inconsistent lighting, and the cognitive load of six instrument types and five defect classes. DAMIAN handles that baseline consistently so the inspector's attention goes where it belongs: the instruments that genuinely require tactile judgment and experience.

△

Two brothers. One purpose.

Saints Cosmas and Damian were twin physicians — the Holy Unmercenary Physicians — who practiced medicine together, without charge, for anyone who needed it. The company is Cosmas. The AI is DAMIAN. They are not a brand. They are a promise: that the technology which protects patients should not be reserved for those who can afford it. Open, auditable, built on public infrastructure.

Architectural alignment documented in ADR-008: Alignment with Magnifica Humanitas — available in the public GitHub repository.

github.com/vincentdr-code/cosmas-surgical-qc ↗
Request Pilot

Start with one production line.

The 30-day pilot offer

Install DAMIAN on a single production line. Run it in parallel with your existing QC process for 30 days. At the end, you have a side-by-side defect escape rate comparison, a complete QMSR audit trail, and a clear decision in front of you.

No long-term commitment. No cloud connection required for the enterprise product.

Parallel run — Damian alongside your current inspection process
Full 21 CFR Part 820 audit trail from day one
30-day side-by-side defect escape rate comparison
All-in hardware cost: $203K at midpoint across configurations