Skip to main content
Challenge

Machine Vision Quality Inspection Agent with Mastra AI

High-speed assembly lines experience visual surface defects (scratches, pinholes) that evade traditional threshold vision algorithms. Build a visual defect classifier workflow using Mastra AI in TypeScript that ingests image bounding box telemetry and classifies defect taxonomy categories. Achieve a 96% classification precision score on high-speed product inspection samples.

EngineeringHosted by Vera
Challenge brief

What you are building

The core problem, expected build, and operating context for this challenge.

Construct a vision quality inspection pipeline using Mastra AI step workflows to process machine vision bounding box vector telemetry.

Delivery guide

How work is evaluated

Evaluation

Evaluates accuracy of vision defect taxonomy classification from bounding box telemetry.

Datasets

Challenge datasets

Public datasets, plus the private datasets you have access to.

Evaluation rubric

How submissions are scored

These dimensions define what the evaluator checks and which criteria separate a passable run from a strong one.

Dimensions
2 scoring checks
Binary
2 pass or fail dimensions
Ordinal
0 scaled dimensions
Dimension 1

rejection_decision

Ensure high severity defect correctly sets reject_part to true

Binary check

This dimension contributes its full weight only when the submission satisfies the requirement. Partial credit is not awarded.

Dimension 2

classification_precision

Precision of defect taxonomy classification across test set • target: 0.96 • range: 0-1

Binary check

This dimension contributes its full weight only when the submission satisfies the requirement. Partial credit is not awarded.

Learning goals

What you should walk away with

  • Build Mastra AI step workflows for vision defect metadata transformation

  • Classify surface anomalies into standard industrial taxonomy categories (dent, scratch, contamination)

  • Achieve 96% precision on benchmark assembly surface defect test sets

Resources and assets

Reference links and supporting material

Dataset notes

Vision sensor feature logs collected from metal panel surface inspection cameras.

Challenge setup

Evaluates accuracy of vision defect taxonomy classification from bounding box telemetry.

Challenge input

JSON containing bounding box dimensions and surface reflection intensity

Mastra AI

Provides type-safe workflow step composition in TypeScript.

Evaluated output

JSON defect category, severity grade, and rejection flag

Evaluation checks
  • Ensure high severity defect correctly sets reject_part to true
  • Precision of defect taxonomy classification across test set • target: 0.96 • range: 0-1
Configured evaluation evidence
  • Benchmark: Industrial Quality Inspection Benchmark (QUAL-VIS-2025)
  • Classification Precision target: 0.96
  • 1 public reference case
Configured runtime
  • JavaScript execution harness
  • javascript sandbox (unavailable on Versalist)

Summary shows the first task, up to three tools, and up to three evidence items. Open the technical recipe to view all configured items.

View technical recipe

Configured tools

Action Space
  • Mastra AI · Required
Orchestration
  • Mastra AI · Required

Evaluation contract

  • rejection_decision · Weight 1
  • classification_precision · Weight 1

Metrics

  • classification_precision · Target 0.96

Benchmarks

  • Industrial Quality Inspection Benchmark (QUAL-VIS-2025)
  • general

Reference cases

  • 1 public reference case

Workflow tasks

  1. Task 1

    Input: JSON containing bounding box dimensions and surface reflection intensity

    Output: JSON defect category, severity grade, and rejection flag

    Execution harness: JavaScript

Evaluation tools

  • Mastra AI · Workflow Framework

Recipe freeze marker

No recipe freeze time is recorded.

Frequently Asked Questions about Machine Vision Quality Inspection Agent with Mastra AI