In this section we'll learn how to apply face detection with OpenCV to single input images, videos, and webcams.
-
Face detection with Images:
python detect_faces.py --image data/image.jpg --prototext model/deploy.prototxt.txt --model model/res10_300x300_ssd_iter_140000.caffemodel
python detect_faces.py -i data/sample.jpg -p model/deploy.prototxt.txt -m model/res10_300x300_ssd_iter_140000.caffemodel
-
Face detection with Video:
python detect_faces_video.py -v data/1.mp4 -p model/deploy.prototxt.txt -m model/res10_300x300_ssd_iter_140000.caffemodel
-
Face detection with Webcam:
python detect_faces_video.py -p model/deploy.prototxt.txt -m model/res10_300x300_ssd_iter_140000.caffemodel