▁until ▁the ▁desired ▁accuracy / comput ation ▁time ▁is ▁reached . ▁ ▁After ▁the ▁initial ▁algorithm , ▁it ▁was ▁understood ▁that ▁training ▁the ▁cas cade ▁as ▁a ▁whole ▁can ▁be ▁optimized , ▁to ▁achieve ▁a ▁desired ▁true ▁detection ▁rate ▁with ▁minimal ▁complexity . ▁Ex amples ▁of ▁such ▁algorithms ▁are ▁RC Bo ost , ▁EC Bo ost ▁or ▁R CE C Bo ost . ▁In ▁their ▁most ▁basic ▁versions , ▁they ▁can ▁be ▁understood ▁as ▁choosing , ▁at ▁each ▁step , ▁between ▁adding ▁a ▁stage ▁or ▁adding ▁a ▁weak ▁lear ner ▁to ▁a ▁previous ▁stage , ▁wh iche ver ▁is ▁less ▁cost ly , ▁until ▁the ▁desired ▁accuracy ▁has ▁been ▁reached . ▁Every ▁stage ▁of ▁the ▁class ifier ▁cannot ▁have ▁a ▁detection ▁rate ▁( sens itivity ) ▁below ▁the ▁desired ▁rate , ▁so ▁this ▁is ▁a ▁const rained ▁optimization ▁problem . ▁To ▁be ▁precise , ▁the ▁total ▁sens itivity ▁will ▁be ▁the ▁product ▁of ▁stage ▁sens it iv ities . ▁ ▁Cas cade ▁class ifiers ▁are ▁available ▁in ▁Open CV , ▁with ▁pre - tra ined ▁cas c ades ▁for ▁front al ▁faces ▁and ▁upper ▁body . ▁Training ▁a ▁new ▁cas cade ▁in ▁Open CV ▁is ▁also ▁possible ▁with ▁either ▁haar _ training ▁or ▁train _ c asc ades ▁methods . ▁This ▁can ▁be ▁used ▁for ▁rapid ▁object ▁detection ▁of ▁more ▁specific ▁targets , ▁including ▁non - human ▁objects ▁with ▁H aar - like ▁features . ▁The ▁process ▁requires ▁two ▁sets ▁of ▁samples : ▁negative ▁and ▁positive , ▁where ▁the ▁negative ▁samples ▁correspond ▁to