📚 Course contents

AI & Computer Vision, lesson 36 of 52

Automation Stress Test: A Fire Drill for Your System

advanced30 min readFull course

Introduction

Your system works in the classroom. Will it work at dusk, on a shaky camera, with a player in a yellow bib that looks like the ball? A school runs a fire drill so the real emergency holds no surprises. Today you'll run one for your system: make conditions worse step by step, find where it breaks, and decide what to fix first.

By the end of this lesson you'll be able to:

  • Design a stress test that changes one thing at a time
  • Measure detection rate, position error and goal correctness, and say what each hides
  • Name the breaking point of each stress
  • Distinguish a missed goal from a false alarm and say which matters more for their product
  • Explain boundary flicker and one fix
  • Write a failure policy: stop, warn, or carry on

Working principle

A system is only as good as its worst day

You have built a detector, a trigger, an API and a light. They work on your clean test clip. A match day has low sun, lens smudges, a cheap camera and a yellow bib. A stress test finds out which of those breaks you, before match day.

How to stress test

  1. Start with a clean clip where you know the truth (the ball's real positions, or at least the real goals).
  2. Make it worse in one way at a time, in steps from mild to terrible.
  3. At each step, measure: how often is the ball found, how far off is it, and are the goals right?
  4. Write down the first step where it breaks. That is the breaking point.

One change at a time is the key: otherwise you cannot tell which one broke it.

Three numbers, not one

NumberWhat it tells youWhat it hides
Detection rateHow often something was foundWhether it was the right thing
Position errorHow close the found thing is to the truthNothing, but needs ground truth
Goals correctWhether the whole system still worksWhy it failed

In our test a yellow bib gave 100% detection and 354 px error. The detection rate alone says "perfect".

Two kinds of failure

MeaningCost
Missed goalA real goal was not detectedThe fans are unhappy
False alarmA goal was announced that did not happenEveryone loses trust

Which is worse depends on the product. A goal alarm that cries wolf will be switched off. A highlight reel that misses one goal is forgiven. lesson 19 gave you the words (false positives and false negatives); now you see them in action.

Failures come from different places

LayerExampleFix
PictureDark, bright, blurry, noisyBetter camera position and settings
DetectorColour clash with a bibDifferent colour, a trained model (lesson 24), shape checks
TriggerBall on the zone lineHysteresis, more frames
HardwareCable unpluggedFall back (lesson 35)

Know when you can't trust the picture

A cheap check can warn you. The health check (Cell 6) looks at brightness and sharpness every second. If the picture is bad, show a warning light rather than a wrong score. A system that says "I'm not sure right now" is more trustworthy than one that is confidently wrong.

Decide the failure policy

For each failure, choose in advance: stop, warn, or carry on. A dark picture: warn. A lost ball for three seconds: carry on. Ten seconds with no ball at all: warn. Write the policy in a table and put it in the product notes (lesson 47, lesson 50).

Automation Stress Test: A Fire Drill for Your System