0% found this document useful (0 votes)
44 views

Final

This document summarizes a 5th semester project on real-time human detection and counting using computer vision techniques. The project uses image and video processing along with deep learning models like convolutional neural networks. Three methods were used - Haar cascade classifier, HOG descriptor, and TensorFlow/CNN which provided increasing accuracy. A GUI was developed for user interaction. The CNN model with TensorFlow achieved the best results with over 90% accuracy in detecting and counting humans.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
44 views

Final

This document summarizes a 5th semester project on real-time human detection and counting using computer vision techniques. The project uses image and video processing along with deep learning models like convolutional neural networks. Three methods were used - Haar cascade classifier, HOG descriptor, and TensorFlow/CNN which provided increasing accuracy. A GUI was developed for user interaction. The CNN model with TensorFlow achieved the best results with over 90% accuracy in detecting and counting humans.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
You are on page 1/ 25

REAL-TIME HUMAN

DETECTION ㅤㅤㅤㅤ
& COUNTING
5th Semester PROJECT (CS591)
Submitted to….
Indian Institute of Information Technology Kalyani

Mentored By – Mr. Anirban Lakshman


MEMBERS
Name Reg No. Roll No.
Akash Ramanand Rajak 435 19008

Amaan Khan 438 19011

Kumar Saurabh 470 19043

Pallav Dubey 481 19054


INTRODUCTION
 A real life application of human object detection model.
 Use of Image Processing, Video Processing, Object
Detection and Deep neural networks are used which are
rigorous parts of modern Artificial Intelligence.

The project will focus on human object detection and
count of people in an image or in a real time video
through camera or some other source.
 We’ve worked on three different methods and
algorithms to detect a human object in order of their
increasing accuracy.
HAAR CASCADE CLASSIFIER

The first one is Haar Cascade Classifier method in which
classifier for some objects are predefined.

This method uses a xml file consisting of functions and
definitions of Image and Video processing.
 Since the most popular programming language featuring
AI is Python hence it is used.

Usage of cv2 library helped linking with the xml cascade
file easily.
CREATING OUR OWN HAAR CLASSIFIER

THERE ARE FOUR SIMPLE STEPS O CREATE OUR OWN


CUSTOMIZED HAAR CASCADE CLASSIFIER FOR A
PARTICULAR OBJECT.
1.)CALCULATING HAAR FEATURES
2.)CREATING INTEGRAL IMAGES
3.)USING ADABOOST
4.)IMPLEMENTING CASCADING CLASSIFIERS
HAAR CASCADE CLASSIFIER

An additional library Open CV is used to detect and
make program understand functions related to object
detection.
 Some of these functions are cvtColor(),
detectMultiScale(), rectangle() etc.
 The program is flexible and can be used with any video
extension(.mp4, .mkv, .ovi, etc.) which is taken as input
for human detection.

First test video is used of a open area covering a large
number of people.
SAMPLE OUTPUT
FURTHER IMPROVEMENT
• Further we have improved some user interfaces and added
some additional features.
• Used additional libraries like
• Imutils - a series of convenience functions to make basic image
processing functions such as translation, rotation, resizing,
skeletonization, and displaying Matplotlib images easier with OpenCV
and Python.
• Argparse – this module makes it easy to write user-friendly command-
line interfaces.
• Also worked on the labelling of the human body detected by
the program by the counter which tells us the count of the
number of people at that particular instance in the video.
FURTHER IMPROVEMENT
• Executed the program and got the output as
below with more accuracy on numbers
detected and got the labelling also.
SAMPLE OUTPUT
GUI
• Added frontend part in the project. For this we used Tkinter
GUI and added different buttons and labels.

• Additional Libraries used:


• Tkinter – for frontend GUI window
• PIL – for adding images to the tkinter GUI window
• Messagebox from tkinter – to show any message using dialog box
• Filedialog – to select images and video using select buttons.

• When we run the code, a GUI window will open with START
and EXIT button on it.
GUI SAMPLE OUTPUT
GUI SAMPLE OUTPUT
GUI SAMPLE OUTPUT
• When we click on select button on image option, we get
option to select image from the local system and when click
on the detect button, an output image is shown which
detected human and their count.
DETECTION IN AN IMAGE

• In the same way when we select video from the local system,
it will give the output by detecting the humans in the video.
ANALYSIS OF FIRST TWO METHODS

• We studied on how to increase the accuracy of no. of people


count in videos or images.
1. Using Haar Cascade Classifier
• Here we make use of .xml file for human detection, and using that we
detect the humans in real time videos and images.
• At the first we used this method to detect the persons, but the
accuracy was not good.

2. Using Histograms of Oriented Gradients (HOG)


• is a feature descriptor used in computer vision and image processing
for the purpose of object detection. 
• We used this method, but got no measurable difference in accuracy
as in Haar Cascade Classifier method.
ANALYSIS OF FIRST TWO METHODS
• Along with HOG descriptor we also added the preview
button, with which it allows us to see the preview of the
image, video selected.
• After detecting, we also printed the max human count in the
window.
• And finally we’ve used a third method using tensorflow which
uses deep learning and convolutional neural network.
3. Using TensorFlow and CNN with Deep Learning
• This is the for various computer vision problems such
as Image Classification , Object Detection and Object
Localization.
 TensorFlow is an open-source API from Google, which
is widely used for solving machine learning tasks that
involve Deep Neural Networks.
• CNNs were widely adapted third method which we are
learning to detect the humans using Deep Learning.
• This method gives better accuracy as compared to first
two methods, so further we are going to apply this
method for detecting and will definitely see some positive
result on the accuracy.
3.Using TensorFlow and CNN with Deep Learning
• We implemented the tensorflow method of detecting the
human using neural networks.
• And we got better accuracy as compared to the 1st method
that was Haar Cascade Classifier and the 2nd method that
was using HOG descriptor.
• Both the earlier method, gave almost the same accuracy and
only few humans are only getting detected but with tensorflow
method, accuracy increased very much and almost all the
humans got detected.
• And along with detecting and counting no. of humans, we
also got the accuracy of each human with which it is getting
detected.
SAMPLE OUTPUT
• The sample screenshot accuracy increased with tensorflow is
as follows:

• Here for each detected human, the first term is count and the
second term is the accuracy of detection.
GRAPH PLOTTING
• After detection and counting process, we plotted the two
following plot using the data collected.
• 1st is Enumeration Plot :
GRAPH PLOTTING
• 2nd is Avg. Accuracy plot :
CROWD REPORT
• And finally we are
preparing a pdf report in
which we are putting
max. human detected,
max. accuracy and max.
average accuracy.
• In the final pdf report,
we are commenting
according to the crowd
status in that particular
real time video.
CONCLUSION

• Conclusively, the project was a real fun throughout


the semester. We have learned a lot in the field of
computer vision and object detection techniques.
• this can be implemented in the commercial and
rushed areas for having an accurate human data and
for controlling the crowd.
REFRENCES
[1] Programming Computer Vision with Python, 1st Edition,
Jan Eric Solem, 2012, O’ Reily

[2] Learning OpenCv, Adrian Kaehler and Gary Rost Bradski,


2008, O’Reily

[3] Deep Learning with Tensorflow, Giancarlo Zaccone, Md.


Rezaul Karim, Ahmed Menshawy, 2017

[4] Python GUI Programming with Tkinter, Alan D. Moore,


2018

[5] Python Standard Library, Fredrik Lundh, 2001, O’ Reily

THANK YOU

You might also like