Pedestrian Detection Using FPGA

You might also like

Download as pptx, pdf, or txt
Download as pptx, pdf, or txt
You are on page 1of 20

Pedestrian Detection

using FPGA

SAINATH REDDY C - 16ECE1006


MANIDEEP P - 16ECE1017
UNDER THE SUPERVISION OF
DR. VASANTHA MH
ECE DEPARTMENT
NIT GOA
Problem Statement

 The presence of cameras in our surroundings grows every day, allowing


object detection, and more specifically pedestrian detection, to be used in
a broad amount of applications

 A pedestrian recognition and warning system could save lives by warning


the driver about possible pedestrian hazard

 Due to their inherently parallel architecture Field Programmable Gate


Arrays(FPGA) are ideal for accelerating image processing tasks.
Algorithm

 Read an image from the camera

 Compute the Histogram of Oriented Gradients for the image

 Calculate the Feature Vector using Histogram of Oriented Gradients

 Pass the descriptor through Support Vector Machine(SVM)

 SVM is a classification machine learning algorithm

 SVM classifies whether there is human or not


Block Diagram

Host machine  DDR  Processing unit 


DDRRAM
Processing unit:

Horizontal and Histogram Normali Feature SVM


Image  Resize(1:2) 
vertical gradients of 
gradients zation
 Vector
 
 Yes
data /NO
from
DDRRAM
How to calculate Histogram of
Oriented Gradients ?
Preprocessing:
 HOG feature descriptor used for pedestrian detection is calculated on a
64×128 patch of an image.
 Of course, an image may be of any size. Typically patches at multiple
scales are analyzed at many image locations.
 The only constraint is that the patches being analyzed have a fixed aspect
ratio.
 The patches need to have an aspect ratio of 1:2. For example, they can be
100×200, 128×256, or 1000×2000 but not 101×205.
 Calculate the Gradient Images
 To calculate a HOG descriptor, we need to first calculate the horizontal and
vertical gradients; after all, we want to calculate the histogram of gradients
 This is easily achieved by filtering the image with the following kernels

 For horizontal gradient image the kernel is

-1 0 1
 For vertical gradient image the kernel is

-1
0
1
Horizontal and vertical gradient images
of an example
Calculate Histogram of Gradients in
8×8 cells
 In this step, the image is divided into 8×8 cells and a histogram of
gradients is calculated for each 8×8 cells
 The histogram is essentially a vector ( or an array ) of 9 bins ( numbers )
corresponding to angles 0, 20, 40, 60 … 160.
Final Feature Vector

 To calculate the final feature vector for the entire image patch, the 9x1
vectors are concatenated into one giant vector.

 There are 15 horizontal and 31 vertical positions making a total of 15 x


31= 465 positions.

 Each 8x8 block is represented by a 9×1 vector. So when we concatenate


them all into one giant vector we obtain a 9x465= 4185 dimensional
vector.
Support Vector machine(SVM )
Support Vector Machine(SVM)

 Support Vector Machine (SVM) is a supervised machine learning algorithm which can


be used for both classification or regression challenges

 In SVM, we plot each data item as a point in n-dimensional space (where n is number


of features you have) with the value of each feature being the value of a particular
coordinate

 Then, we perform classification by finding the hyper-plane that differentiate the two


classes very well (look at the below snapshot)

 Support Vectors are simply the co-ordinates of individual observation. Support Vector
Machine is a frontier which best segregates the two classes (hyper-plane/ line).
ZYNQ Architecture
Work Done
Image after applying
Original Image Horizonatal edge kernel
Image after applying
vertical kernel Magnitude gradient
Direction gradient Final feature vector size
Future Work
 Validation of SVM and HOG descriptor using python present – Jan

 Start porting to FPGA Jan – Feb


1) Interfaces 2) HOG

 Interfacing Host machine and DDR Feb


HOG algorithm on FPGA

 SVM March
Interface of DMA from DDR to module

 Testing, Timing closure, data verification March – April


References:
THANK YOU

You might also like