Inspiration

An anomaly score alone does not tell an operator what to do next. Operators also need usable photographs, visible evidence, and a clear path to human review.

MotionQA connects these steps in one inspection workflow. We developed the prototype using PCB images from the public VisA dataset. Our intended users are quality inspectors working at fixed inspection stations.

What it does

MotionQA checks a photograph, locates the board, and highlights regions with unusual visual features. Each inspection returns a decision, explanation, score, thresholds, model version, and evidence image.

The application distinguishes PASS, FAIL, REVIEW, RETAKE, NO_PART, and ERROR. Operators can repeat unsuitable photographs within the same inspection session. Three unsuccessful capture attempts trigger human review.

FAIL and REVIEW enter a review queue. The application preserves the machine decision alongside the reviewer’s decision. Processing failures return ERROR instead of PASS.

How we built it

We used OpenCV 5 for board localization, capture checks, feature extraction, and evidence rendering. MobileNetV2 extracts image features through OpenCV’s ONNX inference engine.

A PatchCore-style method compares image patches against a memory bank of normal features. Its scores measure feature distances, not defect probabilities.

We also built an OpenCV template-difference baseline to compare approaches.

React and TypeScript provide the interface. FastAPI handles inspection requests, while PostgreSQL stores inspection records.

AWS EC2 Graviton runs the application and inference pipeline in Docker containers. Private S3 storage retains evidence images. CloudFront provides HTTPS access, Secrets Manager stores credentials, and CloudWatch collects logs. CloudFormation defines the infrastructure.

Challenges we ran into

Missing components exposed a limitation of our anomaly method. A missing header pin revealed ordinary background, which the model treated as familiar. That defective board received PASS.

Another board lacked both transducers and initially received NO_PART. We revised ambiguous board handling so that this case reaches REVIEW.

The dataset also contains orientation differences between normal and defective boards. These differences complicate interpretation of the measured performance.

We reused evaluation images during development and failure analysis. Therefore, our results cannot establish performance on unseen production data.

Accomplishments that we're proud of

We implemented an inspection workflow that preserves evidence and supports human review. We also deployed OpenCV 5 inference on AWS.

On 153 development images, MotionQA produced these results:

  • Defective images: 47 FAIL, five REVIEW, and one PASS.
  • Normal images: 60 PASS, 36 REVIEW, and four FAIL.

The template baseline required 58 reviews, compared with MotionQA’s 41. However, the baseline passed none of the defective images. This comparison exposes a trade-off between review workload and missed defects.

During recorded AWS testing, all 20 inspections matched their corresponding local decisions. Median inference time was 450 milliseconds. These measurements demonstrate deployment consistency on those images.

What we learned

Inspection quality depends on more than separating normal and anomalous images. Capture checks, decision thresholds, review procedures, and evidence retention also affect the workflow.

The missing-pin failure showed why component position matters. Familiar-looking patches can still represent an incomplete assembly.

We also learned to distinguish development measurements from independent evaluation. Documenting failures helped define the next experiment and prevented unsupported performance claims.

What's next for Motion QA

We plan to collect new images from a defined inspection station. We will freeze the model and thresholds before evaluating those images.

We will keep photographs of the same physical part within one dataset partition. We also plan to investigate position-aware checks for missing components.

MotionQA currently supports prototype evaluation. Factory validation and independent performance testing remain future work.

Dataset credit: VisA by Zou et al., released under CC BY 4.0. Model credit: OpenCV Zoo MobileNetV2.

Built With

Share this project:

Updates

Submission history