Inspiration

High-speed manufacturing lines (continuous steel rolling, aerospace titanium milling, and automotive body stamping) inspect millions of square meters of surface daily. Traditional automated optical inspection (AOI) relies on static, single-pass algorithms that fail when directional factory lighting creates specular glare wash-out or when conveyor vibration causes motion blur escapes. I built SpecGuard as an active-perception system: an inspector that doesn't just passively classify, but actively adapts its optical parameters and visual tools in response to real-time image telemetry.

What It Does

SpecGuard operates as an autonomous closed-loop inspection station:

  • Pass 1 (Wide Fast Scan): Measures sharpness (Laplacian variance), specular glare ratio, and runs initial OpenCV 5 ENGINE_NEW ONNX anomaly detection.
  • Agentic Decision (MCP): If telemetry detects glare wash-out (>8%), it triggers Fast Marching Telea inpainting. If confidence is uncertain (0.30–0.72), it isolates the candidate region with 2x cubic ROI super-zoom. If conveyor vibration drops sharpness below safety limits (<20.0), it halts grading and triggers camera re-acquisition.
  • Pass 2 (Active Intervention): Executes the targeted visual operation and computes calibrated confidence.
  • Governance & Operator Gate: Quarantined components require authorized human operator sign-off before diverter routing, with all records saved to Amazon DynamoDB and S3.

How I Built It

  • OpenCV 5.0.0.93: Utilized the new cv.dnn.ENGINE_NEW graph execution engine, native N-D array auto-broadcasting via cv.subtract, Telea specular inpainting (cv.inpaint), CLAHE, and cv.INTER_CUBIC ROI zoom.
  • AWS Graviton COOL: Executed vectorized pipelines dispatching to Arm KleidiCV / NEON kernels, benchmarked over 1080p industrial frames.
  • Agentic Model Context Protocol (MCP): Structured 4 tool schemas (run_glare_compensated_rescan, run_highres_roi_zoom_scan, request_frame_reacquisition, finalize_inspection_verdict).
  • Modern Industrial Web OS: Custom vanilla CSS glassmorphic dashboard with split-slider comparison, Retina Canvas charts, and Web Audio API sensory feedback.

Quantitative Results & Impact

  • 97.2% Inspection Accuracy (+52.8% over static 1-pass AOI).
  • 100% Defect Recall (0 escapes) across 36 balanced test specimens.
  • 1.78x Graviton Throughput Speedup with 51.1% lower cloud compute cost per 1M frames on AWS Graviton3 c7g.medium vs x86 t3.medium.
  • 12–18 ms Pipeline Latency, exceeding continuous production line speeds (>50 FPS).

Built With

Share this project:

Updates

Submission history