All Projects → ITCoders → Human Detection And Tracking

ITCoders / Human Detection And Tracking

Licence: apache-2.0
Human-detection-and-Tracking

Programming Languages

python
139335 projects - #7 most used programming language
cplusplus
227 projects

Projects that are alternatives of or similar to Human Detection And Tracking

FaceIDLight
A lightweight face-recognition toolbox and pipeline based on tensorflow-lite
Stars: ✭ 17 (-97.74%)
Mutual labels:  face, face-recognition, face-detection
Php Opencv
PHP extensions for OpenCV
Stars: ✭ 524 (-30.41%)
Mutual labels:  opencv, face-detection, face-recognition
timeline
Timeline - A photo organizer
Stars: ✭ 39 (-94.82%)
Mutual labels:  face, face-recognition, face-detection
Attendance Using Face
Face-recognition using Siamese network
Stars: ✭ 174 (-76.89%)
Mutual labels:  opencv, face-detection, face-recognition
Awesome Face
😎 face releated algorithm, dataset and paper
Stars: ✭ 739 (-1.86%)
Mutual labels:  face-detection, face-recognition, face
Opencv Course
Learn OpenCV in 4 Hours - Code used in my Python and OpenCV course on freeCodeCamp.
Stars: ✭ 185 (-75.43%)
Mutual labels:  opencv, face-detection, face-recognition
Facecropper
✂️ Crop faces, inside of your image, with iOS 11 Vision api.
Stars: ✭ 479 (-36.39%)
Mutual labels:  face-detection, face-recognition, face
Facifier
An emotion and gender detector based on facial features, built with Python and OpenCV
Stars: ✭ 52 (-93.09%)
Mutual labels:  opencv, face-detection, face
Imagedetect
✂️ Detect and crop faces, barcodes and texts in image with iOS 11 Vision api.
Stars: ✭ 286 (-62.02%)
Mutual labels:  face-detection, face-recognition, face
Multi-Face-Comparison
This repo is meant for backend API for face comparision and computer vision. It is built on python flask framework
Stars: ✭ 20 (-97.34%)
Mutual labels:  face, face-recognition, face-detection
Robovision
AI and machine leaning-based computer vision for a robot
Stars: ✭ 126 (-83.27%)
Mutual labels:  opencv, face-detection, face-recognition
Libfaceid
libfaceid is a research framework for prototyping of face recognition solutions. It seamlessly integrates multiple detection, recognition and liveness models w/ speech synthesis and speech recognition.
Stars: ✭ 354 (-52.99%)
Mutual labels:  opencv, face-detection, face-recognition
Studybook
Study E-Book(ComputerVision DeepLearning MachineLearning Math NLP Python ReinforcementLearning)
Stars: ✭ 1,457 (+93.49%)
Mutual labels:  opencv, numpy, scipy
Marvel
Marvel - Face Recognition With Android & OpenCV
Stars: ✭ 199 (-73.57%)
Mutual labels:  opencv, face-detection, face-recognition
Awesome Face Detection
Compare with various detectors - s3fd, dlib, ocv, ocv-dnn, mtcnn-pytorch, face_recognition
Stars: ✭ 106 (-85.92%)
Mutual labels:  opencv, face-detection, face-recognition
face
[deprecated] 👽 Face Recognition package for Laravel
Stars: ✭ 37 (-95.09%)
Mutual labels:  face, face-recognition, face-detection
Eulerian Remote Heartrate Detection
Remote heart rate detection through Eulerian magnification of face videos
Stars: ✭ 48 (-93.63%)
Mutual labels:  opencv, numpy, scipy
Opencv Face Filters
Snapchat-like Face Filters in OpenCV
Stars: ✭ 51 (-93.23%)
Mutual labels:  opencv, face-detection, face-recognition
Look4Face
Demo of Face Recognition web service
Stars: ✭ 23 (-96.95%)
Mutual labels:  face, face-recognition, face-detection
Autocrop
😌 Automatically detects and crops faces from batches of pictures.
Stars: ✭ 320 (-57.5%)
Mutual labels:  opencv, face-detection, face

Human detection and Tracking

Say Thanks!

Introduction

In this project we have worked on the problem of human detection,face detection, face recognition and tracking an individual. Our project is capable of detecting a human and its face in a given video and storing Local Binary Pattern Histogram (LBPH) features of the detected faces. LBPH features are the key points extracted from an image which is used to recognize and categorize images. Once a human is detected in video, we have tracked that person assigning him a label. We have used the stored LBPH features of individuals to recognize them in any other videos. After scanning through various videos our program gives output like- person labeled as subject1 is seen in video taken by camera1, subject1 is seen in video by camera2. In this way we have tracked an individual by recognizing him/her in the video taken by multiple cameras. Our whole work is based on the application of machine learning and image processing with the help of openCV.This code is built on opencv 3.1.1, python 3.4 and C++, other versions of opencv are NOT SUPPORTED.

Requirements

  • opencv [v3.1.1]

    • Installation in linux: For complete installation of opencv in ubuntu you can refer here.
    • Installation in windows For complete installation of opencv in windows you can refer here
  • python3

    • In Ubuntu python 3.4 can be installed via terminal with the command given below: sudo apt-get install python3
  • python libraries: Here is a list of all the python dependencies

    • Python Image Library (PILLOW)
    • Imutils
    • numpy
  • C++

Approach

  • The code follows the steps given below:
    1. First it reads a video and process each frame one by one.
    2. For each frame it tries to detect a human. If a human is detected it draws a rectangle around it.
    3. after completing step 2 it tries to detect human face.
    4. if a human face is detected it tries to recognize it with a pre-trained model file.
    5. If human face is recognized it puts the label on that human face else it moves to step 2 again for next frame
  • The repository is structured as follows:
    • main.py : This is the main python file that detects and recognizes humans.
    • main.cpp : This is the main C++ file that detects and recognizes humans.
    • create_face_model.py : This python script is used to create model file using the given data in data/ folder
    • model.yaml : This file contains trained model for given data. This trained model contains LBPH features of each and every face for given data.
    • face_cascades/ : This directory contains sample data for testing our codes. This data is prepared by extracting face images of a praticular person from some videos.
    • scripts/ : This directory contains some useful scripts that we used to work on different problems.
    • video/ : This directory contains some of the videos that we used to while testing.

Installation

Python

Don't forget to install the necessary libraries described in the install paragraph above.

First you need to run the create_face_model.py file, which uses the images in /data to create a .yaml file

  • In the project folder run
python create_face_model.py
  • To run the python version of the code you have to put all the input videos in one folder and then provide the path of that folder as command line argument:
python3 main.py -v /path/to/input/videos/  

Example- for our directory structure it is:

 python3 main.py -v /video 

C++

  • To compile the C++ version of the code with openCV the command is:
 g++ -ggdb `pkg-config --cflags opencv` -o `basename name_of_file.cpp .cpp` name_of_file.cpp `pkg-config --libs opencv` 

Example- for our directory structure it is:

 g++ -ggdb `pkg-config --cflags opencv` -o `basename main.cpp .cpp` main.cpp `pkg-config --libs opencv` 
  • To run the C++ version of the code you have to put all the input videos in one folder and then provide the path of that video as command line argument:
./name_of_file /path/to/input/video_file 

Example- for our directory structure it is:

 ./main /video/2.mp4
  • creating your own model file; just follow the steps given below to create your own model file:
    • for each individual rename the images as subjectx.y.jpg for example for person 1 images should be named as subject01.0.jpg , subject01.1.jpg and so on.
    • put all the images of all the persons in a single folder for example you can see data\ folder then run this command given below: python3 create_face_model.py -i /path/to/persons_images/

Performance of code

  • Since this is a computer vision project it requires a lot of computation power and performance of the code is kind of an issue here.
  • The code was tested on two different machines to analyse performace. The input was 30fps 720p video.
    • On a machine with AMD A4 dual-core processor we got an output of 4fps which is quite bad.
    • on a machine with Intel i5 quad-core processor we got an output of 12fps.

Results

alt text alt text alt text alt text

You can find project report here

To do

  • improve the performance of the code
  • improve the accuracy of the code and reducing the false positive rate.
  • improve the face recognition accuracy to over 90 percent

Special Thanks to:

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].