It's a Software design with Python for analyzing video, face detection and recognition, pedestrian detection, and background video analyzing for development of a product for urban security in zone of high stream of people and controlled environment.
Are required this libraries in Python 3.7:
- numpy~=1.19.0
- future~=0.18.2
- icrawler~=0.6.3
- opencv-python~=4.2.0.34
- imutils~=0.5.3
- pillow~=7.2.0
- face_recognition_models
- face_recognition
- future~=0.18.2
- os
- cmake
- dlib~=19.7
Use the [git clone]
git clone https://github.com/AMIRANDA9112/Recognition
In the console execute the index
python Recognition.py
You can skip the outputs windows with SCAPE key
You can make analysis in a video .mp4 file, streaming WebCam or IpCam with simple set of face images in format .png or .jpg
You can adjust the quality of analysis video with the detail index min 1 = 1x100 frames , max 10 = 1x10 frames
how output this return a collage report set, with 24 frames each report with the face image localized in the frames in the face image directory
like this
See the progress report in console
For WebCam you'll only need the set face images folder
For IpCam you'll need the set face images folder and the correct Ip for the streaming video, this depend of each camera.
You can adjust the Resolution index in the input process for best performance processing depending of native processor capability.
You can detect pedestrian with WebCam and IpCam, the detail index is for adjust the sensitive factor depending of resolution input, and perspective and distance of the square objective, how a street or a indoor space.
The model can't be confused by mascots
In a streaming video from a IpCam or WebCam you can replace the background for a image or a video with this module.
Now you can look the video or image that you are select for the background of video streaming, in the Ip options how in the other modules you can affect the resolution of input.
Press the SPACE key for capture the background to replace in streaming video
Now you can look how the perturbing of shadows, and movement and lights changes make effect in the output video.
The algorithm only replace the changes respect to the moment of capture with the key SPACE, if you like reset, you can use the 'R' key for reset the background and SPACE for set again.
The IpCam Implementation is very funny
The quality depend of resolution input, and correct lighting.
Here you have two simples tools for have set data for practice
- Download Video from Youtube
you only need write the Url of a Youtube video, and the button will redirecting to a correct page download for mp4 format.
- Search Face
You only need write the name of a celebrity or famous person and in way automatic the going to download the photo face with best match on internet, this option need the directory of faces in the Face Detection Module.
https://github.com/techwithtim/Face-Recognition
https://github.com/FaztWeb/python-tkinter-sqlite-crud
https://github.com/misbah4064/backgroundremoval
https://www.coursera.org/learn/analyzing-video-opencv-numpy
Thanks to HOLBERTON SCHOOL FORMATION
and I can build this project in base to this projects:
https://github.com/techwithtim/Face-Recognition
https://github.com/FaztWeb/python-tkinter-sqlite-crud