Kumita← Open visual lesson

Cascades

The math behind the picture

The saving comes from refusing to do work that cannot change a crop’s final rejection.

Connection 1 of 4

One failure can settle an AND decision

A crop reaches a later check only after passing the earlier checks.
From guided stage 3 · Static lesson frame

A crop reaches a later check only after passing the earlier checks.

A survivor must pass every stage. If the first check fails, passing the second and third could not make “all checks passed” true. We can stop immediately for that crop.

survive = pass₁ AND pass₂ AND pass₃

Read it as: The early exit uses the logic of the final rule; it does not guess the uncomputed scores.

Connection 2 of 4

Count who actually reaches each check

The lesson compares work using the same checks and decision cutoffs.
From guided stage 5 · Static lesson frame

The lesson compares work using the same checks and decision cutoffs.

Imagine 100 crops reach the first check, 30 reach the second, and 10 reach the third. With equally costly checks, that is 100 + 30 + 10 = 140 evaluations. Testing all three on every crop would require 300.

actual work = Σ (crops reaching a stage × cost of that stage)

Read it as: If stages have different costs, multiply by those costs rather than just counting calls.

Evaluate all checks300 calls
Stop at first failure140 calls

Connection 3 of 4

Keep the rules fixed when comparing approaches

Evaluating every check and stopping at the first failure should give the same final survivors when the checks and cutoffs are identical. The difference is how many unnecessary checks we avoided.

Changing a cutoff while comparing runs changes the decision rule too, so it is no longer a pure comparison of evaluation order.

Connection 4 of 4

Why an early mistake is expensive

A true target rejected early never reaches a later, more discriminating check. A cascade therefore needs early stages that reject useful amounts of background without discarding too many targets.

Fewer calls alone do not establish better accuracy or lower total runtime; the cost of the checks matters too.

Connect it back to the picture

A cascade reorders when we spend effort. Its efficiency follows from early-exit logic, while its accuracy depends on the checks and their cutoffs.

Full notation and technical reference

The expressions below collect the operations discussed above. You can return here when you want the compact notation.

survive = pass₁ AND pass₂ AND … AND passₖ
work = N₁C₁ + N₂C₂ + … + NₖCₖ
  • Nₛ is the number of crops that reach stage s; Cₛ is that stage's evaluation cost.
  • The same checks and cutoffs give the same final decision whether all checks are evaluated or evaluation stops at the first failure.

Numerical reference

If 100 windows reach the first check, 30 the second and 10 the third, three equally costly checks require 140 evaluations rather than 300.

Where this explanation stops

Early rejection saves work but can discard a real target. Later checks cannot recover a rejected crop. The lesson uses fitted brightness cutoffs, not a full AdaBoost cascade trainer.

Follow the same idea in the Python or JavaScript notebook →