We will learn Training procedures Give +ve and -ve examples to the system then the system will learn to classify an unknown input E. g. give pictures of faces( +ve examples and non-faces (ve examples to train the system Detection procedures Input an unknown(e.g. an image), the system will tell you it is a face or not Adaboost, Vga ace non-face 6
We will learn • Training procedures – Give +ve and –ve examples to the system, then the system will learn to classify an unknown input. • E.g. give pictures of faces (+ve examples) and non-faces (-ve examples) to train the system. • Detection procedures – Input an unknown (e.g. an image) , the system will tell you it is a face or not. Adaboost , V9a Face non 6 -face
A line y=mX+c Exercise 1 a linear m=3,c=2 (a) When x=1y=3*x+2=5.50 programming example when y=5.5, is x,y 因 Figure bovell/below[ii the line? File Edit Yiew Insert Tools Desktop Window Help 口白命气气← Answer:[]or[ⅲ]? =mx+c, m=3, C=2, X1,y=5 (a) When x=0,y=3*x+2=2.S0 y-mxC when y"=1.5, is(x,y") axIs above[l/below[ii] the line? Answer [i]or [i]? X=0,y=2 y=mxc y-mX<c Conclusion if a point x, y is above and on the left X=-1,V=-1 of the line y=mx+c, y>mX+c if a(x,y is below and on the right side X-axis of the line y=mx+c, y<mx+c Adaboost, Vga
Exercise 1 :A linear programming example • A line y=mx+c • m=3, c=2 • (a) When x=1, y=3*x+2=5. So when y’=5.5, is (x,y’) above[i]/below[ii] the line? • Answer: [i] or [ii]?________ • (a) When x=0, y=3*x+2=2. So when y”=1.5, is (x,y”) above[i]/below[ii] the line? • Answer: [i] or [ii]?________ • Conclusion, – if a point (x,y) is above and on the left of the line y=mx+c, y>mx+c – if a (x,y) is below and on the right side of the line y=mx+c, y<mx+c Adaboost , V9a 7 y-axis X-axis y=mx+c x=0,y=2 x=1,y=5 x=-1,y=-1 y-mx>c y-mx<c
A line y=mX+c ANSWER 1: Alinear m=3,c=2 (a) When x=1y=3*x+2=5.50 programming example when y=5.5, is x,y 因 Figure bovell/below[ii the line? File Edit Yiew Insert Tools Desktop Window Help Answer: i or [ii? i above =mx+c, m=3, C=2, X1,y=5 (a) When x=0,y=3*x+2=2.S0 y-mxC when y"=1.5, is(,y axIs above[il /below[ii] the line? Answer: [i or [ii? ii below X=0,y=2 y=mxc y-mX<c Conclusion if a point x, y is above and on the left X=-1,V=-1 of the line y=mx+c, y>mX+c if a(x,y is below and on the right side X-axis of the line y=mx+c, y<mx+c Adaboost, Vga
ANSWER 1 :A linear programming example • A line y=mx+c • m=3, c=2 • (a) When x=1, y=3*x+2=5. So when y’=5.5, is (x,y’) above[i]/below[ii] the line? • Answer: [i] or [ii]?_i above • (a) When x=0, y=3*x+2=2. So when y”=1.5, is (x,y”) above[i]/below[ii] the line? • Answer: [i] or [ii]?_ii below • Conclusion, – if a point (x,y) is above and on the left of the line y=mx+c, y>mx+c – if a (x,y) is below and on the right side of the line y=mx+c, y<mx+c Adaboost , V9a 8 y-axis X-axis y=mx+c x=0,y=2 x=1,y=5 x=-1,y=-1 y-mx>c y-mx<c
First let us learn what is a weak classifier h( -Case 1 If a point(x=lu, v Dis in the "gray area, h(x)=+I For this weak classifier p, m, c otherwise h(x=u, vD=-1. It can be written as are constants defining the classifier, variables h(r)=+I if v-mu<c, where m,x, are given constants 1 otherwise u, v are inputs. Vmu=fc Cas If u v is here,vw-mu=c If a point(x=[u, v )is in the"white"area, h(x)=+1-h(x=fu, v1=-1 otherwise h(x=u,v]=-1. It can be written as h(rs +1 if(v-mu<-cwhere-uy are given constants Gradient m otherwise V-mu>C At timet, combine case l and 2 together to become equation(() V-mu<c and use polarity p, to control which case you want to use if p,f(x)<p, B h,( If u, v is here, I otherwise h(X=[u,v])=1 where p, polarity .m c are used to define the line f is the function: (f(xu,vD=v-mu)and,=c .Any points in the gray area satisfy where m c are constants. u, v are variables V-mu<c plv-mu]<p,c, equation(()becomes .Any points in the white area h,(x)= Pv-m小<pc satisfy v-mu>c 1 otherwise Adaboost, vga
First let us learn what is a weak classifier h( ) • ( ) 1 otherwise 1 if ( ) , ( ) becomes where are constants, are variables. is the function :( ( [ , ]) ,) and where polarity { 1or -1}, ( ) 1 otherwise 1 if ( ) ( ) and use polarity to control which case you want to use. --At time , combine case1and 2 together to become equation 1 otherwise 1 where , are given constants ( ) otherwise [ ] 1.It can be written as: If a point ( [ , ])isin the "white" area , 1 --Case2--1 otherwise 1 if ,where , are given constants ( ) otherwise [ ] 1.It can be written as: If a point ( [ ])isin the "gray"area , 1 --Case1-- ii p v mu p c h x p v mu p c equation i m,c u,v f f x u v v mu c p i p f x p h x p t (i) if -(v-mu) c , m,x h x h(x u,v ) x u v h(x) v-mu c m,x h x h(x u,v ) x u,v h(x) t t t t t t t t t t t t t − − − − − − − − − − + − = − = − = = + − − − − − − − − − − + = − + − = = = − = = + − + = = = − = = + 9 Adaboost , V9a v=mu+c or v-mu=c •m,c are used to define the line •Any points in the gray area satisfy v-mu<c •Any points in the white area satisfy v-mu>c v c Gradient m (0,0) v-mu<c v-mu>c u For this weak classifier pt ,m,c are constants defining the classifier. Variables u,v are inputs. If u,v is here , h(x=[u,v])=1 If u,v is here , h(x=[u,v])=-1
The weak classifier( a summary) Function f is a straight line V=mutC By definition a weak classifier or should be slightly better than a V-mu=c random choice(probability of correct classifcation =0.5) Gradient ml Otherwise you should use a dice! In lu, v]space, the decision V-mu>c function f: (v-mu =c is a straight V-mu<c line defined by m, c 0,0)u1 Adaboost, Vga
The weak classifier (a summary) • By definition a weak classifier should be slightly better than a random choice (probability of correct classifcation =0.5) . Otherwise you should use a dice! • In [u,v] space, the decision function f : (v-mu)=c is a straight line defined by m,c. Adaboost , V9a 10 Function f is a straight line v c Gradient m (0,0) v-mu<c v-mu>c u v=mu+c or v-mu=c