Created a full fledged python face detector application
This is a full fledged Face Detector application in python which aims to detect faces in any Image or detect any faces in a video file, also aims to detect faces appearing in your WebCam. Its created by the use of OpenCV in python which detect faces on the basis of a Haar Cascade file that contain all the face features.
- Image face detection
- Video face detection
- Webcam face detection
Python 3 - version 3.7.0
- cv2 - OpenCV implementation
- os - Miscellaneous operating system interfaces
- sys - System-specific parameters and functions
- time - Time access and conversions
- msvcrt - Useful routines from the MS VC++ runtime
- Clone or download the repo:
https://github.com/ashish7zeph/python-opencv-face-detector
- Navigate to the folder
python-opencv-face-detector
- Run the script
face_detector.py
- Select
I
forimage detection
|V
forvideo detection
|W
forwebcam detection
- Type in the image or video name respectively, if image is in the same folder
- Else type the location of the image on the system
Finally, face detected is referenced by a rectangle box on the face appearing in the new window.
Can press q
anytime to quit
the application or any window
OpenCV (Open Source Computer Vision Library) is released under a BSD license and hence it’s free for both academic and commercial use. It has C++, Python and Java interfaces and supports Windows, Linux, Mac OS, iOS and Android. OpenCV was designed for computational efficiency and with a strong focus on real-time applications. Written in optimized C/C++, the library can take advantage of multi-core processing. Enabled with OpenCL, it can take advantage of the hardware acceleration of the underlying heterogeneous compute platform.
Adopted all around the world, OpenCV has more than 47 thousand people of user community and estimated number of downloads exceeding 14 million. Usage ranges from interactive art, to mines inspection, stitching maps on the web or through advanced robotics.