Custom Viola-Jones Face Detection from Scratch

Custom Viola-Jones Face Detection from Scratch

external-link

Mar 2026

Finished

Full from-scratch implementation of the Viola-Jones face detection framework. The cascade classifier is trained stage-by-stage using AdaBoost on Haar-like features with hard negative mining. The detector supports parallel execution via Numba JIT compilation (5-10x inference speedup) with a ThreadPoolExecutor fallback. Trained on WIDER FACE dataset with 15,000 face samples. Best cascades reach 28 stages with 0.999 TPR. Includes real-time webcam detection, XML serialization compatible with OpenCV, and comprehensive Jupyter notebooks for ROC analysis and cascade inspection.

Technologies
ai

AI

jupyter

Jupyter

latex

LaTeX

matplot

Matplot

numpy

NumPy

opencv

OpenCV

pandas

Pandas

plotly

Plotly

python

Python

sklearn

Sklearn

https://raw.githubusercontent.com/MiquelGomezCorral/BIOM-Face-detection/main/readme_images/FP-TP-Progresion.png
https://raw.githubusercontent.com/MiquelGomezCorral/BIOM-Face-detection/main/readme_images/base-filters.png
https://raw.githubusercontent.com/MiquelGomezCorral/BIOM-Face-detection/main/readme_images/first-Stage.png
https://raw.githubusercontent.com/MiquelGomezCorral/BIOM-Face-detection/main/readme_images/output (1).png
https://raw.githubusercontent.com/MiquelGomezCorral/BIOM-Face-detection/main/readme_images/output (2).png
https://raw.githubusercontent.com/MiquelGomezCorral/BIOM-Face-detection/main/readme_images/output (3).png
https://raw.githubusercontent.com/MiquelGomezCorral/BIOM-Face-detection/main/readme_images/output (4).png
https://raw.githubusercontent.com/MiquelGomezCorral/BIOM-Face-detection/main/readme_images/thumbnail.webp
https://raw.githubusercontent.com/MiquelGomezCorral/BIOM-Face-detection/main/readme_images/FP-TP-Progresion.png
https://raw.githubusercontent.com/MiquelGomezCorral/BIOM-Face-detection/main/readme_images/base-filters.png
https://raw.githubusercontent.com/MiquelGomezCorral/BIOM-Face-detection/main/readme_images/first-Stage.png
https://raw.githubusercontent.com/MiquelGomezCorral/BIOM-Face-detection/main/readme_images/output (1).png
https://raw.githubusercontent.com/MiquelGomezCorral/BIOM-Face-detection/main/readme_images/output (2).png
https://raw.githubusercontent.com/MiquelGomezCorral/BIOM-Face-detection/main/readme_images/output (3).png
https://raw.githubusercontent.com/MiquelGomezCorral/BIOM-Face-detection/main/readme_images/output (4).png
https://raw.githubusercontent.com/MiquelGomezCorral/BIOM-Face-detection/main/readme_images/thumbnail.webp
https://raw.githubusercontent.com/MiquelGomezCorral/BIOM-Face-detection/main/readme_images/FP-TP-Progresion.png
https://raw.githubusercontent.com/MiquelGomezCorral/BIOM-Face-detection/main/readme_images/base-filters.png
https://raw.githubusercontent.com/MiquelGomezCorral/BIOM-Face-detection/main/readme_images/first-Stage.png
https://raw.githubusercontent.com/MiquelGomezCorral/BIOM-Face-detection/main/readme_images/output (1).png
https://raw.githubusercontent.com/MiquelGomezCorral/BIOM-Face-detection/main/readme_images/output (2).png
https://raw.githubusercontent.com/MiquelGomezCorral/BIOM-Face-detection/main/readme_images/output (3).png
https://raw.githubusercontent.com/MiquelGomezCorral/BIOM-Face-detection/main/readme_images/output (4).png
https://raw.githubusercontent.com/MiquelGomezCorral/BIOM-Face-detection/main/readme_images/thumbnail.webp
https://raw.githubusercontent.com/MiquelGomezCorral/BIOM-Face-detection/main/readme_images/FP-TP-Progresion.png
https://raw.githubusercontent.com/MiquelGomezCorral/BIOM-Face-detection/main/readme_images/base-filters.png
https://raw.githubusercontent.com/MiquelGomezCorral/BIOM-Face-detection/main/readme_images/first-Stage.png
https://raw.githubusercontent.com/MiquelGomezCorral/BIOM-Face-detection/main/readme_images/output (1).png
https://raw.githubusercontent.com/MiquelGomezCorral/BIOM-Face-detection/main/readme_images/output (2).png
https://raw.githubusercontent.com/MiquelGomezCorral/BIOM-Face-detection/main/readme_images/output (3).png
https://raw.githubusercontent.com/MiquelGomezCorral/BIOM-Face-detection/main/readme_images/output (4).png
https://raw.githubusercontent.com/MiquelGomezCorral/BIOM-Face-detection/main/readme_images/thumbnail.webp