eyedetect - hofstra university€¦ · analytics, the process gained from visualization. people...

1
RESEARCH POSTER PRESENTATION DESIGN © 2012 www.PosterPresentations.com Detecting human behaviors in video surveillance is a daunting task for real world applications. For example, if a security guard is on the job while monitoring multiple live video streams, and they’re supposed to make sure that nothing odd is going on, let alone if there are any human activity, then there’s certainly room for error for that security guard to make. They can mistakenly spot a human for something else, or even look away from monitoring the screen. Another example is if a room can only fit a certain amount of people and anything more than that threshold is a fire hazard, one person would certainly try to do a head count to see if they are breaking the law or not. For these reasons, an interactive tool that is designed to support this task to abstract and automate the complexity and process of manual surveillance is an important step towards the capabilities of surveillance. This poster is about the construction of EyeDetect and its implementation. We introduce the concept of integrating human-detecting algorithms to a Raspberry Pi with an attached camera and the benefits it produces towards Data Analytics which presents the potential it has towards automated Visual Analytics. ABSTRACT INTRODUCTION Setup EyeDetect system in the Raspberry Pi where human shape would be detected in a video stream Transition the process of manual surveillance to automated video surveillance i.e. if EyeDetect detects X amount of people in a room, then send an automated email notification to the user Be able to be notified even if there’s no one at the premise. An example would be if a person is away from his/her house but has EyeDetect installed. They then would know if the mailman dropped off their mail, or even if someone was trying to get in their car! GOALS There was heavy use of the OpenCV library in our EyeDetect code. Implementation flow of EyeDetect is: Detecting motion in the video stream We detect motion by computing the absolute difference between the current frame and the last frame Min_area -> variable or threshold value to determine if EyeDetect should ignore this type of movement or not Draw bounding box of that motion After detecting motion, now run human-detecting algorithm The reason we detect motion first is because the Raspberry Pi is very limited in terms of resources, so running the human detection algorithm on every frame would hurt the quality of performance of the system. Therefore we pre-process the frame by using a motion detection algorithm and if there is motion detected then run the human detection algorithm. Integrating Dropbox upload was implemented by using the Dropbox API. One thing to mention here is we used OAuth 2.0 authentication through Dropbox. This is a way for users to share account information with third party applications, in this case EyeDetect. Some basic configuration settings can also be tweaked such as the fps that the Pi should run, the resolution of the frame, the time difference between each dropbox upload, the minimum area for the system to consider motion, and more. METHODS Conclusions Although results of the EyeDetect code shows good results of human detection, they aren’t perfect. We get multiple bound bounding boxes even though there is only one person moving around the room – this is far from ideal. We do have a fix for this using the non-maxima suppression technique, but if we’re able to detect one one human person per one bounding object detected by the algorithm, then that would be perfect. In the motion detection technique, we also see some false-positives when there’s shadows and reflections on a wall. In order to relieve these problems, there’s more pre-processing that needs to happen using the OpenCV library, but that takes away a lot of resources that the Pi needs. By keeping our motion detection and human detection simple and fast, the system is a compact and light weight framework for automated surveillance. Admittingly, it is not a perfect detection system, but it still does a fairly good job considering the resources provided by the Raspberry Pi. REFERENCES 1. Itseez, OpenCV Reference Manual, 2.4.9.0, http://opencv.org 2. Dropbox, Python Dropbox Core API https://www.dropbox.com/developers-v1/core/start/python 3.Raspberry Pi, Raspberry Pi Documentation, https://github.com/raspberrypi/documentation 4. Adrian Rosebrock, OpenCV3 Tutorials, www.pyimagesearch.com Acknowledgements Marvin Dizon – Owner of EyeDetect Ameer Humza Malik – Co-Owner of EyeDetect Dr. Simona Doboli – Senior Seminar Advisor Dr. Krishnan Pillaipakkamnatt – Marvin’s Advisor Dr. Ed Currie – Ameer’s Advisor Over the years, surveillance systems have allowed humans to track and monitor a certain area for the purpose of managing, protecting, or influencing that certain area. Currently, surveillance systems have to be manually overlooked and monitored by people such as security guards in order to decipher data from the video stream itself. This is key to Visual Analytics, the process gained from visualization. People have used technology to amplify the ability of surveillance through methods such as automated analysis. When automated analysis is used, then data gathering methods are used which is then applied to generate predictive models of the original data. EyeDetect brings everything in full circle as it focuses on visual analytics that produces results that ultimately increases a user’s capability of surveillance. The core of EyeDetect is it’s ability to detect human shape in live video streams. Data can then be gathered from this such as how many people in a room, if someone shouldn’t be in a room, or if the mailman is delivering the mail, and the user can act upon this information. Advisors: Dr. Krishnan Pillaipakkamnat, Dr. Edward H. Currie Spring 2017 Marvin Dizon and Ameer Humza Malik EyeDetect SYSTEM DESIGN When running human detection algorithm our CPU was using around 65%-80% of it’s resources. With the algorithm of detecting motion first, then human detection, our CPU was using around 40%-60%. Definitely an improvement. Another optimization technique we used was the preprocessing of frames before motion was detected. There were three transformations done before trying to detect motion: 1. Rescale the frame to the lowest possible resolution (set the width = 500) 2. Convert the image to greyscale (for less color) 3. Apply the Gaussian Filter on the image. The Gaussian Filter just blurs the image. Not every frame will be 100% the same, therefore we need to blur the image in order to lessen the possibility of false-positives so that the system doesn’t detect any non-important small movements, high noise frequency, etc The results definitely showed improvement as there was previous detections where there was clearly no movement. Results showing positive detection of human shape RESULTS IMPLEMENTATION Algorithms that was used in our methods included functions from the OpenCV library, Dropbox API integration, the picamera package for easy access to the modular camera, imutils package for simple image processing operations (like rescaling, color translation, and more) and many built in functions in python such as: smtplib, email, json, time, and more. Histogram of Oriented Gradients and Linear Support Vector Machines We used the technique Histogram of Oriented Gradients and Linear Support Vector Machines from OpenCV to detect a certain object we want to detect. In this case, EyeDetect wants to detect humans. OpenCV is very simple, yet powerful that, to initialize a function that detects an object, the simple call is setSVMDetector(cv2.HOGDescriptor_getDefaultPeopleDetecter()) What this means is that we are passing, as arguments, the data set for what a shape for a person is based on the very popular INRIA Person dataset. Non-Maxima Suppression Another method used from OpenCV is the non-maxima suppression technique to threshold bounding boxes. Although OpenCV provides the functions to detect human shape, it most certainly will have many false- positives, therefore there would be many bounding boxes that would consider one person, to be many persons. Applying non-maxima suppression takes care of this and maintains any overlapping boxes that is the same person. A Raspberry Pi is a small, lightweight but compact computer. It will use a camera module. The EyeDetect code will then be ran on the Raspberry Pi and will be processing images frame by frame from the camera. EyeDetect uses many functionalities from the OpenCV library along with infusing Dropbox integration using it’s Core API technology. FUTURE Make a simple GUI to be able to access EyeDetect and configure settings remotely Make Raspberry Pi video stream accessible via smartphone Upgrade Pi and implement server-side live data processing in order to eliminate the problem of CPU being a limited resource

Upload: others

Post on 17-Jul-2020

0 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: EyeDetect - Hofstra University€¦ · Analytics, the process gained from visualization. People have used technology to amplify the ability of surveillancethrough methods such as

RESEARCH POSTER PRESENTATION DESIGN © 2012

www.PosterPresentations.com

Detecting human behaviors in video surveillance is a daunting task for realworld applications. For example, if a security guard is on the job whilemonitoring multiple live video streams, and they’re supposed to make surethat nothing odd is going on, let alone if there are any human activity, thenthere’s certainly room for error for that security guard to make. They canmistakenly spot a human for something else, or even look away frommonitoring the screen. Another example is if a room can only fit a certainamount of people and anything more than that threshold is a fire hazard,one person would certainly try to do a head count to see if they arebreaking the law or not. For these reasons, an interactive tool that isdesigned to support this task to abstract and automate the complexity andprocess of manual surveillance is an important step towards the capabilitiesof surveillance. This poster is about the construction of EyeDetect and itsimplementation. We introduce the concept of integrating human-detectingalgorithms to a Raspberry Pi with an attached camera and the benefits itproduces towards Data Analytics which presents the potential it hastowards automated Visual Analytics.

ABSTRACT

INTRODUCTION

• Setup EyeDetect system in the Raspberry Pi where human shape wouldbe detected in a video stream

• Transition the process of manual surveillance to automated videosurveillance

• i.e. if EyeDetect detects X amount of people in a room, thensend an automated email notification to the user

• Be able to be notified even if there’s no one at the premise. An examplewould be if a person is away from his/her house but has EyeDetectinstalled. They then would know if the mailman dropped off their mail,or even if someone was trying to get in their car!

GOALS

There was heavy use of the OpenCV library in our EyeDetect code.Implementation flow of EyeDetect is:• Detecting motion in the video stream• We detect motion by computing the absolute difference between the

current frame and the last frame• Min_area -> variable or threshold value to determine if EyeDetect

should ignore this type of movement or not• Draw bounding box of that motion• After detecting motion, now run human-detecting algorithm

The reason we detect motion first is because the Raspberry Pi is verylimited in terms of resources, so running the human detection algorithm onevery frame would hurt the quality of performance of thesystem. Therefore we pre-process the frame by using a motion detectionalgorithm and if there is motion detected then run the human detectionalgorithm.

Integrating Dropbox upload was implemented by using the DropboxAPI. One thing to mention here is we used OAuth 2.0 authenticationthrough Dropbox. This is a way for users to share account informationwith third party applications, in this case EyeDetect.

Some basic configuration settings can also be tweaked such as the fps thatthe Pi should run, the resolution of the frame, the time difference betweeneach dropbox upload, the minimum area for the system to consider motion,and more.

METHODS

Conclusions

Although results of the EyeDetect code shows good results of humandetection, they aren’t perfect. We get multiple bound bounding boxes eventhough there is only one person moving around the room – this is far fromideal. We do have a fix for this using the non-maxima suppressiontechnique, but if we’re able to detect one one human person per onebounding object detected by the algorithm, then that would be perfect.In the motion detection technique, we also see some false-positives whenthere’s shadows and reflections on a wall. In order to relieve theseproblems, there’s more pre-processing that needs to happen using theOpenCV library, but that takes away a lot of resources that the Pi needs.By keeping our motion detection and human detection simple and fast, thesystem is a compact and light weight framework for automatedsurveillance. Admittingly, it is not a perfect detection system, but it stilldoes a fairly good job considering the resources provided by the RaspberryPi.

REFERENCES1. Itseez, OpenCV Reference Manual, 2.4.9.0, http://opencv.org

2. Dropbox, Python Dropbox Core API https://www.dropbox.com/developers-v1/core/start/python

3.Raspberry Pi, Raspberry Pi Documentation, https://github.com/raspberrypi/documentation

4. Adrian Rosebrock, OpenCV3 Tutorials, www.pyimagesearch.com

AcknowledgementsMarvin Dizon – Owner of EyeDetectAmeer Humza Malik – Co-Owner of EyeDetectDr. Simona Doboli – Senior Seminar AdvisorDr. Krishnan Pillaipakkamnatt – Marvin’s AdvisorDr. Ed Currie – Ameer’s Advisor

Over the years, surveillance systems have allowed humans to track andmonitor a certain area for the purpose of managing, protecting, orinfluencing that certain area. Currently, surveillance systems have to bemanually overlooked and monitored by people such as security guards inorder to decipher data from the video stream itself. This is key to VisualAnalytics, the process gained from visualization. People have usedtechnology to amplify the ability of surveillance through methods such asautomated analysis. When automated analysis is used, then data gatheringmethods are used which is then applied to generate predictive models ofthe original data. EyeDetect brings everything in full circle as it focuses onvisual analytics that produces results that ultimately increases a user’scapability of surveillance. The core of EyeDetect is it’s ability to detecthuman shape in live video streams. Data can then be gathered from thissuch as how many people in a room, if someone shouldn’t be in a room, orif the mailman is delivering the mail, and the user can act upon thisinformation.

Advisors:Dr.KrishnanPillaipakkamnat,Dr.EdwardH.Currie Spring2017MarvinDizonandAmeerHumzaMalik

EyeDetect

SYSTEMDESIGN

When running human detection algorithm our CPU was using around65%-80% of it’s resources. With the algorithm of detecting motion first,then human detection, our CPU was using around 40%-60%. Definitely animprovement.Another optimization technique we used was the preprocessing of framesbefore motion was detected. There were three transformations done beforetrying to detect motion:1. Rescale the frame to the lowest possible resolution (set the width =

500)2. Convert the image to greyscale (for less color)3. Apply the Gaussian Filter on the image. The Gaussian Filter just blurs

the image. Not every frame will be 100% the same, therefore we needto blur the image in order to lessen the possibility of false-positives sothat the system doesn’t detect any non-important small movements,high noise frequency, etc

The results definitely showed improvement as there was previousdetections where there was clearly no movement.

Results showing positive detection of human shape

RESULTS

IMPLEMENTATION

Algorithms that was used in our methods included functions from theOpenCV library, Dropbox API integration, the picamera package foreasy access to the modular camera, imutils package for simple imageprocessing operations (like rescaling, color translation, and more) andmany built in functions in python such as: smtplib, email, json, time,and more.

Histogram of Oriented Gradients and Linear Support VectorMachinesWe used the technique Histogram of Oriented Gradients and LinearSupport Vector Machines from OpenCV to detect a certain object wewant to detect. In this case, EyeDetect wants to detect humans.OpenCV is very simple, yet powerful that, to initialize a function thatdetects an object, the simple call issetSVMDetector(cv2.HOGDescriptor_getDefaultPeopleDetecter())What this means is that we are passing, as arguments, the data set forwhat a shape for a person is based on the very popular INRIA Persondataset.

Non-Maxima SuppressionAnother method used from OpenCV is the non-maxima suppressiontechnique to threshold bounding boxes. Although OpenCV provides thefunctions to detect human shape, it most certainly will have many false-positives, therefore there would be many bounding boxes that wouldconsider one person, to be many persons. Applying non-maximasuppression takes care of this and maintains any overlapping boxes thatis the same person.

A Raspberry Pi is a small, lightweight but compact computer. Itwill use a camera module. The EyeDetect code will then be ran onthe Raspberry Pi and will be processing images frame by framefrom the camera. EyeDetect uses many functionalities from theOpenCV library along with infusing Dropbox integration using it’sCore API technology.

FUTURE

• MakeasimpleGUItobeabletoaccessEyeDetectandconfiguresettingsremotely

• MakeRaspberryPivideostreamaccessibleviasmartphone

• UpgradePiandimplementserver-sidelivedataprocessinginordertoeliminatetheproblemofCPUbeingalimitedresource