https://github.com/somdipdey/facedetection_with_haarcascade_in_python_opencv
Detect faces from a video input (webcam) and output the frames per second as well.
https://github.com/somdipdey/facedetection_with_haarcascade_in_python_opencv
c face-detection haar-cascade opencv opencv-python python python3
Last synced: 6 months ago
JSON representation
Detect faces from a video input (webcam) and output the frames per second as well.
- Host: GitHub
- URL: https://github.com/somdipdey/facedetection_with_haarcascade_in_python_opencv
- Owner: somdipdey
- License: mit
- Created: 2018-06-17T14:49:48.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2018-06-18T16:33:32.000Z (over 7 years ago)
- Last Synced: 2025-02-15T10:31:25.339Z (8 months ago)
- Topics: c, face-detection, haar-cascade, opencv, opencv-python, python, python3
- Language: C
- Size: 1.43 MB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Face Detection with Haar Cascade in Python Using OpenCV
This program detects faces from a video input (webcam) and then shows the video output with the estimated fps (frames per second). The program do require OpenCV package for Python to be installed.
Use this package to encrypt messages and embed in QR code, and decode the message back.
#### Build for Linux and OSX:
[](https://travis-ci.org/somdipdey/FaceDetection_with_HaarCascade_in_Python_OpenCV)
[](https://github.com/somdipdey/FaceDetection_with_HaarCascade_in_Python_OpenCV/blob/master/LICENSE)## Dependencies For MAC OS
$ [sudo] pip install opencv-python
$ [sudo] pip install matplotlib
$ [sudo] pip install numpy## Dependencies For Ubuntu, Debian
$ [sudo] apt-get install libopencv-dev python-opencv
$ [sudo] apt-get install python3-matplotlib
$ [sudo] apt-get install python-numpy#### Note:
For other dependencies based on a particular OS please refer to that OS's install command for the aforementioned packages.
## Installation For MAC OS, Ubuntu, Debian
### Steps:
$ git clone https://github.com/somdipdey/FaceDetection_with_HaarCascade_in_Python_OpenCV.git
$ [sudo] python setup.py build
$ [sudo] python setup.py install### Alternate Steps To Install This Program
$ pip install git+https://github.com/somdipdey/FaceDetection_with_HaarCascade_in_Python_OpenCV.git
$ [sudo] python setup.py build
$ [sudo] python setup.py install#### Note:
You need to use the setup.py build and install commands to build the C extension program to be used in your python program.
## Execute/Run The Program
$ python detect.py#### Note:
You can pass extra parameter as True in order to write out the FPS, Compute_FPS, CPU_LOAD, MEMORY_LOAD to an audit.txt file as comma separated values. Example:
$ python detect.py True
The above command will write the FPS, Compute_FPS, CPU_LOAD, MEMORY_LOAD to an audit.txt in the same directory as the program.
Here, FPS is the Frames Per Second of the Video Capture Input (webcam), whereas CPU_LOAD is the Frames Per Second of the computed program after several compute operations are performed. CPU_LOAD is the current load of the CPU in Percentage and MEMORY_LOAD is the current Memory (RAM) load in percentage.
## Result/Output
![]()