Download a dataset at http://www.idiap.ch/~marcel/Databases/frontalfaces/main.html

>  tar -zxvf datafaced.tar.gz 

# boosting pixel-based discrete weak classifiers
> mkdir discrete_wc
> trainPixStump -one_file datafaced/face_train.bindata -one_file datafaced/nonface_train.bindata 19 19 -imagenorm -equalh -o discrete_wc/model.wsm

> testPixStump discrete_wc/model.wsm -one_file datafaced/face_train.bindata 19 19 -imagenorm -equalh -o discrete_wc/face_train
> testPixStump discrete_wc/model.wsm -one_file datafaced/nonface_train.bindata 19 19 -imagenorm -equalh -o discrete_wc/nonface_train
> testPixStump discrete_wc/model.wsm -one_file datafaced/face_test.bindata 19 19 -imagenorm -equalh -o discrete_wc/face_test
> testPixStump discrete_wc/model.wsm -one_file datafaced/nonface_test.bindata 19 19 -imagenorm -equalh -o discrete_wc/nonface_test

> cd discrete_wc
> gnuplot
gnuplot> set data style lines
gnuplot> plot 'face_train.histo' with lines, 'nonface_train.histo' with lines, 'face_test.histo' with lines, 'nonface_test.histo' with lines

> rm *.histo
> rm *.output

# boosting pixel-based real weak classifiers

> mkdir real_wc
> trainPixStump -one_file datafaced/face_train.bindata -one_file datafaced/nonface_train.bindata 19 19 -imagenorm -equalh -o real_wc/model.wsm -real

> testPixStump real_wc/model.wsm -one_file datafaced/face_train.bindata 19 19 -imagenorm -equalh -o real_wc/face_train -real
> testPixStump real_wc/model.wsm -one_file datafaced/nonface_train.bindata 19 19 -imagenorm -equalh -o real_wc/nonface_train -real
> testPixStump real_wc/model.wsm -one_file datafaced/face_test.bindata 19 19 -imagenorm -equalh -o real_wc/face_test -real
> testPixStump real_wc/model.wsm -one_file datafaced/nonface_test.bindata 19 19 -imagenorm -equalh -o real_wc/nonface_test -real

> cd real_wc
> gnuplot
gnuplot> set data style lines
gnuplot> plot 'face_train.histo' with lines, 'nonface_train.histo' with lines, 'face_test.histo' with lines, 'nonface_test.histo' with lines

> rm *.histo
> rm *.output


# boosting Haar-like weak classifiers

> mkdir haar_wc
> trainHaarStump -one_file datafaced/face_train.bindata -one_file datafaced/nonface_train.bindata 19 19 -imagenorm -n 10 -o haar_wc/modelhaar.inorm.wsm

> testHaarStump haar_wc/modelhaar.inorm.wsm -one_file datafaced/face_train.bindata 19 19 -imagenorm -o haar_wc/face_train_inorm
> testHaarStump haar_wc/modelhaar.inorm.wsm -one_file datafaced/nonface_train.bindata 19 19 -imagenorm -o haar_wc/nonface_train_inorm
> testHaarStump haar_wc/modelhaar.inorm.wsm -one_file datafaced/face_test.bindata 19 19 -imagenorm -o haar_wc/face_test_inorm
> testHaarStump haar_wc/modelhaar.inorm.wsm -one_file datafaced/nonface_test.bindata 19 19 -imagenorm -o haar_wc/nonface_test_inorm
> testHaarStump haar_wc/modelhaar.inorm.wsm -one_file datafaced/nonface_test.bindata 19 19 -haarnorm -o haar_wc/nonface_test_haarnorm

> cd haar_wc

> gnuplot
gnuplot> set data style lines
gnuplot> plot 'face_train_inorm.histo' with lines, 'nonface_train_inorm.histo' with lines, 'face_test_inorm.histo' with lines, 'nonface_test_inorm.histo' with lines, 'nonface_test_haarnorm.histo' with lines

> rm *.histo
> rm *.output


# boosting Haar-like (real) weak classifiers

> mkdir real_haar_wc
> trainHaarStump -one_file datafaced/face_train.bindata -one_file datafaced/nonface_train.bindata 19 19 -imagenorm -n 10 -o real_haar_wc/modelhaar.inorm.wsm -real

> testHaarStump real_haar_wc/modelhaar.inorm.wsm -one_file datafaced/face_train.bindata 19 19 -imagenorm -o real_haar_wc/face_train_inorm -real
> testHaarStump real_haar_wc/modelhaar.inorm.wsm -one_file datafaced/nonface_train.bindata 19 19 -imagenorm -o real_haar_wc/nonface_train_inorm -real
> testHaarStump real_haar_wc/modelhaar.inorm.wsm -one_file datafaced/face_test.bindata 19 19 -imagenorm -o real_haar_wc/face_test_inorm -real
> testHaarStump real_haar_wc/modelhaar.inorm.wsm -one_file datafaced/nonface_test.bindata 19 19 -imagenorm -o real_haar_wc/nonface_test_inorm -real
> testHaarStump real_haar_wc/modelhaar.inorm.wsm -one_file datafaced/nonface_test.bindata 19 19 -haarnorm -o real_haar_wc/nonface_test_haarnorm -real

> cd real_haar_wc

> gnuplot
gnuplot> set data style lines
gnuplot> plot 'face_train_inorm.histo' with lines, 'nonface_train_inorm.histo' with lines, 'face_test_inorm.histo' with lines, 'nonface_test_inorm.histo' with lines, 'nonface_test_haarnorm.histo' with lines

> rm *.histo
> rm *.output