Inspiration
Metallic foil (blister packs, battery pouch seals) acts like a mirror under directed light. A saturated glare band can hide a defect from a camera. A single-view detector has two options: inspect the glare as-is, or mask it out and accept a blind spot. A human inspector tilts the part. We wanted to automate that reflex.
What it does
SpecuLab-MCP is a prototype active-perception inspector for flat foil:
- Detects an ArUco marker to rectify each view onto a metric canvas (2000 x 800 px).
- Measures glare with a two-stage hysteresis mask (core V >= 240, S <= 35, plus its surrounding halo).
- Exposes three stateless MCP tools: rank_candidate_views, fuse_candidate_view, finalize_inspection_or_escalate. Fusions are capped at 2.
- Registers an alternate view with homography (USAC_MAGSAC when available), gain-matches it, and feather-blends it over the glare.
- If glare stays above the gate (2.0%), the case is escalated to a human supervisor instead of being guessed.
Results (read this first)
All results below come from a procedurally generated test set of 14 synthetic specimens (7 defective, 7 clean). No physical hardware or photographs were used. They show the pipeline works on this synthetic set, not that it works on real foil.
- Passive unmasked: strict recall 1/7, clean false rejects 3/3.
- Passive glare-masked: strict recall 0/7, clean false rejects 0/3.
- Active (deterministic): strict recall 5/7, recall including escalation 6/7, clean false rejects 0/3. Small sample; counts shown instead of percentages.
How we built it
- OpenCV for ArUco rectification, morphology, ORB, and homography.
- FastMCP server for the three tools.
- Amazon Bedrock Converse with a deterministic fallback .
- Streamlit dashboard with a before/after comparison, the agent tool-execution timeline, and a benchmark tab.
Challenges
- Blending a clean view into a glare zone left halo artifacts. Fixed by dilating the blend mask before feathering.
- Glare rims were flagged as defects. Fixed with hysteresis masking.
Limitations
- Synthetic data only; no physical validation.
- Persistent glare across all views is escalated, not resolved.
- Small test set.
What we learned
Processing cannot recover information that saturation destroyed. Changing the viewpoint can.
Log in or sign up for Devpost to join the conversation.