Professional Documents
Culture Documents
MINOR PROJECT
SUBMITTED in PARTIAL FULFILLMENT of
THE REQUIREMENTS FOR THE AWARD OF THE DEGREE of
BACHELOR OF TECHNOLOGY
(INFORMATION TECHNOLOGY)
SUBMITTED BY
We truly acknowledge the cooperation and help made by Ms. Nishtha Jatana , Assistant
Professor Department of Computer Science and Engineering, Maharaja Surajmal Institute
of Technology, C-4 Janakpuri , Delhi, Guru Gobind Singh Indraprastha University, Delhi.
She has been a constant source of guidance throughout the course of this project in
understanding Object Recognition System. We are also thankful to our friends and family
whose silent support led us to complete our project.
(Signature)
Ankush Bhalla (04596303113)
(Signature)
Sambhav Jain (00296303113)
(Signature)
Shyam Prasad Gupta (02696303113)
i
Object Recognition System
CERTIFICATE
This is to certify that the project entitled OBJECT RECOGNITION SYSTEM is a bona
fide work carried out by Mr. Ankush Bhalla, Mr. Sambhav Jain and Mr. Shyam Prasad
Gupta under my guidance and supervision and submitted in partial fulfillment of B.Tech
degree in Information Technology of Guru Gobind Singh Indraprastha University, Delhi.
The work embodied in this project has not been submitted for any other degree or diploma.
ii
Object Recognition System
ABSTRACT
Computer vision has become one of the most appealing domains of recent research. It is
concerned with using computers to mimic the human visual system. Pattern recognition is
considered to be an important problem in the field of image analysis and computer vision.
Automatic (machine) recognition, description, classification, and grouping of patterns are
the major activities in a variety of engineering and scientific disciplines such as biology,
medicine, marketing, computer vision, artificial intelligence, and remote sensing.
iii
Object Recognition System
LIST OF FIGURES
iv
Object Recognition System
LIST OF TABLE
v
Object Recognition System
TABLE OF CONTENTS
ACKNOWLEDGEMENT.............................................................................. i
CERTIFICATE .............................................................................................. ii
ABSTRACT ...................................................................................................iii
LIST OF FIGURES ...................................................................................... iv
LIST OF TABLE ........................................................................................... v
CHAPTER 1
INTRODUCTION TO MACHINE LEARNING AND OBJECT
RECOGNITION ............................................................................................ 1
1.1 LEARNING TYPES .................................................................................................. 2
1.2 OBJECT DETECTION .............................................................................................. 3
1.3 OBJECT RECOGNITION ......................................................................................... 3
1.4 RECOGNITION PROCESS ...................................................................................... 4
1.5 APPLICATIONS ....................................................................................................... 4
CHAPTER 2
SOFTWARE REQUIREMENT SPECIFICATION .................................. 6
2.1 INTRODUCTION ...................................................................................................... 7
2.1.1 PURPOSE............................................................................................................ 7
2.1.2 SCOPE ................................................................................................................. 7
2.1.3 OPERATING ENVIRONMENT ........................................................................ 8
2.1.4 METHODLOGY ................................................................................................. 9
2.1.5 DESIGN AND IMPLEMENTATION CONSTRAINTS.................................. 11
2.2 SPECIFIC REQUIREMENTS ................................................................................. 11
2.2.1 USER INTERFACE REQUIREMENTS:-........................................................ 11
2.3 LITERATURE SURVEY ........................................................................................ 12
2.3.1 ABSTRACT OF PAPERS REFERED .............................................................. 12
2.3.2 FINDING FROM THE RESEARCH PAPER .................................................. 14
2.3.3 PROBLEM STATEMENT................................................................................ 15
2.4 SOLUTION PROPOSED ........................................................................................ 15
2.4.1 OBJECTIVES TO ACHIEVE ........................................................................... 16
2.4.2 METHODOLOGY TO ACHIEVE OBJECTIVE ............................................. 16
vi
Object Recognition System
CHAPTER 3
IMPLEMENTATION AND RESULT ...................................................... 20
3.1 SOFTWARE DESIGN ............................................................................................. 24
3.1.1 DFD LEVEL - 0 ................................................................................................ 24
3.1.2 FLOW DIAGRAM ............................................................................................ 24
3.1.3 SYSTEM FLOW DIAGRAM ........................................................................... 25
3.2 RESULT ................................................................................................................... 26
CHAPTER 4
SCREENSHOTS .......................................................................................... 27
4.1 GUI ........................................................................................................................... 28
4.2 UPLOAD IMAGE.................................................................................................... 28
4.3 DETECT TREE........................................................................................................ 29
4.4 DETECT APPLE ..................................................................................................... 30
4.5 DETECT CAR ......................................................................................................... 31
CHAPTER 5
CONCLUSION AND FUTURE SCOPE ................................................... 33
5.1 CONCLUSION ........................................................................................................ 34
5.2 FUTURE SCOPE ..................................................................................................... 34
CHAPTER 6
REFERENCES............................................................................................. 35
vii
Object Recognition System
CHAPTER 1
1
Object Recognition System
Machine learning is a type of artificial intelligence (AI) that provides computers with the
ability to learn without being explicitly programmed. Machine learning focuses on the
development of computer programs that can teach themselves to grow and change when
exposed to new data.
Over the past two decades Machine Learning has become one of the mainstays of
information technology and with that, a rather central, albeit usually hidden, part of our
life. With the ever increasing amounts of data becoming available there is good reason to
believe that smart data analysis will become even more pervasive as a necessary ingredient
for technological progress[1]
The process of machine learning is similar to that of data mining. Both systems search
through data to look for patterns. However, instead of extracting data for human
comprehension -- as is the case in data mining applications -- machine learning uses that
data to detect patterns in data and adjust program actions accordingly. Machine learning
algorithms are often categorized as being supervised or unsupervised. Supervised
algorithms can apply what has been learned in the past to new data. Unsupervised
algorithms can draw inferences from datasets.
Facebook's News Feed uses machine learning to personalize each member's feed. If a
member frequently stops scrolling in order to read or "like" a particular friend's posts, the
News Feed will start to show more of that friend's activity earlier in the feed [2].
voice recognition.
2
Object Recognition System
There are many supervised learning algorithms such as neural networks,
Support Vector Machines (SVMs), and Naive Bayes classifiers. Mahout
implements Naive Bayes classifier.
Unsupervised learning
Unsupervised learning makes sense of unlabeled data without having any
predefined dataset for its training. Unsupervised learning is an extremely
powerful tool for analyzing available data and look for patterns and trends. It is
most commonly used for clustering similar input into logical groups. Common
approaches to unsupervised learning include:
k-means
hierarchical clustering
3
Object Recognition System
1.4 RECOGNITION PROCESS
The steps involved in recognition process is as follow:
PREPROCESSING:
Image cropping and converting them in same size.
Features extraction; using extractors like LBP (Linear Binary Pattern), HOG
(Histograms of Oriented Gradients , inbuilt in matlab) .
Dimension Reduction Process (only if necessary).
TRAINING
We give train cases to system (same object has same label no.)
Plotting the features of the train cases in multidimensional space.
Objects differentiated by drawing curve in the plot.
Plot is drawn by the classifier e.g SVM.
TESTING
Test case is provided to the system.
Uses classifier to plot the object features.
Object is recognized by checking the curve space it belongs to.
1.5 APPLICATIONS
Biometric recognition: Biometric technology uses human physical or behavioral
traits to recognize any individual for security and authentication. Biometrics is the
identification of an individual based on distinguished biological features such as
finger prints, hand geometry, retina and iris patterns, DNA, etc.
Surveillance: Objects can be recognized and tracked for various video surveillance
systems. Object recognition is required so that the suspected person or vehicle for
example be tracked.
Human computer interaction: Human gestures can be stored in the system, which
can be used for recognition in the real-time environment by computer to do
interaction with humans. The system can be any application on mobile phone,
interactive games, etc.
4
Object Recognition System
Intelligent vehicle systems: Intelligent vehicle systems are needed for traffic sign
detection and recognition, especially for vehicle detection and tracking [3]. In such
a system is developed. In detection phase, a color-based segmentation method is
used to scan the scene in order to quickly establish regions of interest (ROI). Sign
candidates within ROIs are detected by a set of Haar wavelet features obtained from
AdaBoost training.
5
Object Recognition System
CHAPTER 2
6
Object Recognition System
2.1 INTRODUCTION
The object recognition system provide the machine an ability to detect, describe
and understand an object from an image.
Given some knowledge of how certain objects may appear and an image of a scene
possibly containing those objects, report which objects are present in the scene and
where.
Input is an image containing unknown object(s) possibly, the position of the object
can be marked in the input, or the input might be only a clear image of (not-
occluded) object.
Output is the position(s) and label(s) (names) of the objects in the image. The
positions of objects are either acquired form the input, or determined based on the
input image.
When labeling objects, there is usually a set of categories/labels which the system
"knows" and between which the system can differentiate (e.g. object is either
apple, car, horse or tree).
2.1.1 PURPOSE
2.1.2 SCOPE
7
Object Recognition System
Automotive sector: In developing advanced drivers assist for semi-
autonomous cars and also heavily used in autonomous/driver-less cars.
Surveillance: Objects can be recognized and tracked for various video
surveillance systems. Object recognition is required so that the suspected
person or vehicle for example be tracked.
Manufacturing & Logistics: To identify defects in objects.
Robotics: The research of autonomous robots is one of the most important
issues in recent years. The humanoid robot soccer competition is very
popular. The robot soccer players rely on their vision systems very heavily
when they are in the unpredictable and dynamic environments. The vision
system can help the robot to collect various environment information as the
terminal data to finish the functions of robot localization, robot tactic, barrier
avoiding, etc. It can decrease the computing efforts, to recognize the critical
objects in the contest field by object features which can be obtained easily by
object recognition techniques [3].
Gaming: Advanced gaming consoles like Xbox Kinect uses image
processing from motion analysis of the human player.
Human machine interface: machine are made smart by adding gestural
interface, or human action response interfaces, which decodes the actions of
the human user to perform certain tasks.
Camera simulates the eyes of the human being, which is one of the main sensor
of the human body using which brain takes decisions. Camera is relatively cheap
and decoding the image from it can give enormous amount of information which
can be used to perform certain actions/tasks. So image processing is one of the
emerging and is a future tool, so it has lot of scope.
8
Object Recognition System
Distortion in the picture should not be exceedingly much.
Noise reduction will be limited.
2.1.4 METHODLOGY
A single image may consist of single or multiple objects. If all the objects in
an image need to be detected the method shown in fig.7 can be used.
The method trains different object detectors with individual objects, as shown
in fig. there are N object detectors which are trained to detect N different
objects. Any of the above mentioned object recognition techniques can be used
depending upon the application area. An image is provided as input to the
system. The same image is given as input to all object detectors. Each detector
will determine if the object is present or not. We propose to use object detector
along with boundary detector. If the object is present, the detector will find its
boundary and tag the object name in the image. So, after the image has passed
via all the detectors all objects will be detected along with object boundary and
its tag displayed in the output image. Also, when the output image is displayed,
we can move the cursor over the image. The tag shown for an object inside the
complete boundary of the object remains same. Such multi-object detection in
the image can greatly improve the performance of the content based image
retrieval systems. The performance can further be improved by letting the
object detectors run in parallel.
9
Object Recognition System
Figure 2.1: Multiple object detection
Multi-component object detection method is good indistinguishable and
powerful.
10
Object Recognition System
2.1.5 DESIGN AND IMPLEMENTATION CONSTRAINTS
The user will feel at ease using the system as it is very convenient and easy to
use. The GUI of the system shows 4 buttons with the help of which one can
easy detected the object of interest. The buttons are:
Upload – It opens the new window through which user can choose the
image for detection.
Detect Tree – It detected the tree in the uploaded image and return a new
window with the image having boundary box on the object and tree written
on it.
Detect Apple – This button detected the Apple in the uploaded image and
return a new window with the image having boundary box on the object
and tree written on it.
Detect Car – It detected the Car in the uploaded image and return a new
window with the image having boundary box on the object and tree written
on it.
11
Object Recognition System
2.3 LITERATURE SURVEY
It detected the tree in the uploaded image and return a new window with the image
having boundary box on the object and tree written on it. Literature possesses
wider studies on the field of object recognition. Here in this research, we have
reviewed some of the techniques available in the literature for the recognition
of objects in digital images.
This paper describes a machine learning approach for visual object detection
which is capable of processing images extremely rapidly and achieving high
detection rates. This work is distinguished by three key contributions. The first
is the introduction of a new image representation called the “Integral Image”
which allows the features used by our detector to be computed very quickly.
The second is a learning algorithm, based on AdaBoost, which selects a small
number of critical visual features from a larger set and yields extremely efficient
classifiers. The third contribution is a method for combining increasingly more
complex classifiers in a “cascade” which allows background regions of the
12
Object Recognition System
image to be quickly discarded while spending more computation on promising
object-like regions. The cascade can be viewed as an object specific focus-of-
attention mechanism which unlike previous approaches provides statistical
guarantees that discarded regions are unlikely to contain the object of interest.
In the domain of face detection the system yields detection rates comparable to
the best previous systems. Used in real-time applications, the detector runs at
15 frames per second without resorting to image differencing or skin color
detection.
We study the question of feature sets for robust visual object recognition,
adopting linear SVM based human detection as a test case. After reviewing
existing edge and gradient based descriptors, we show experimentally that grids
of Histograms of Oriented Gradient (HOG) descriptors significantly outperform
existing feature sets for human detection. We study the impudence of each stage
of the computation on performance, concluding that _ne-scale gradients,
_reorientation binning, relatively coarse spatial binning, and high-quality local
contrast normalization in overlapping descriptor blocks are all important for
good results. The new approach gives near-perfect separation on the original
MIT pedestrian database, so we introduce a more challenging dataset containing
over 1800 annotated human images with a large range of pose variations and
backgrounds.
13
Object Recognition System
different techniques and methods for detecting or recognizing object with
various benefits like efficiency, accuracy, robustness etc.
The techniques stated in [4] ranges from very basic algorithm to state of the art
published techniques categorized based on speed, memory requirements and
accuracy. They used methods such as frame difference technique, Real time
background subtraction and shadow detection technique, adaptive background
mixture model for real time tracking technique. They used algorithms ranges
from varying levels of accuracy and computational complexity. Some of them
can also deal with real time challenges like snow, rain, moving branches, objects
overlapping, light intensity or slow moving objects.
14
Object Recognition System
In [6] cascade-of-rejecters approach with the Histograms of Oriented Gradients
features to achieve a fast and accurate human detection system. The features used
are Histograms of Oriented Gradients of variable-size blocks that capture salient
features of humans automatically. Using algorithm for feature selection, it
identifies the appropriate set of blocks, from a large set of possible blocks. It uses
the integral image representation and a rejection cascade which significantly
speed up the computation. For an image, the system can process 5 to 30 frames
per second depending on the density in which it scans the image, while
maintaining an accuracy level similar to existing methods.
From very past time all the machine regardless how advanced and complex it is,
it requires human to guide it, to operate and interact in environment. In
manufacturing unit’s humans detects the defect in product which is a slow
process. Surveillance cameras and machines needs to be smart to detect the faces
and other objects. So there is a need to give the machine an ability to detect and
recognize an object so it can interact accordingly because every object requires
different kind of attention and interaction.
15
Object Recognition System
detect the object of interest and return the boundary box on the object with a label of
its name.
2.4.2.a PREPROCESSING
Image cropping and converting them in same size.
HOG: HOG stands for Histograms of Oriented Gradients [9]. A
gradient vector can be computed for every pixel an image. It’s simply
a measure of the change in pixel values along the x-direction and the y-
direction around each pixel. HOG is a type of “feature descriptor”. The
intent of a feature descriptor is to generalize the object in such a way
that the same object produces as close as possible to the same feature
descriptor when viewed under different conditions. This makes the
classification task easier. The essential thought behind the histogram of
oriented gradients descriptor is that local object appearance and shape
within an image can be described by the distribution of intensity
gradients or edge directions. The image is divided into small connected
regions called cells, and for the pixels within each cell, a histogram of
gradient directions is compiled.
The first step of calculation is the computation of the gradient values.
The most common method is to apply the 1-D centered, point discrete
derivative mask in one or both of the horizontal and vertical directions.
16
Object Recognition System
computation. The cells themselves can either be rectangular or radial in
shape, and the histogram channels are evenly spread over 0 to 180
degrees or 0 to 360 degrees, depending on whether the gradient is
“unsigned” or “signed”.
2.4.2.b TRAINING
In the training phase, we use the dataset of images. The dataset contains
the positive and negative images of a specific object. The images are
provided to the classifier for classification as object and non-object. For
17
Object Recognition System
this purpose we use Viola Jone algorithm. The problem to be solved is
detection of objects in an image [10]. A human can do this easily, but a
computer needs precise instructions and constraints. To make the task
more manageable, Viola–Jones requires full views of the object. Thus in
order to be detected, the entire object must point towards the camera and
should not be tilted to either side. While it seems these constraints could
diminish the algorithm's utility somewhat, because the detection step is
most often followed by a recognition step, in practice these limits on pose
are quite acceptable.
Robust – very high detection rate (true-positive rate) & very low false-
positive rate always.
Real time – For practical applications at least 2 frames per second must
be processed.
2.4.2.c TESTING
In this phase we give test cases to the system which will check for the
object in the image. We creates a System object that detects objects using
the Viola-Jones algorithm. Bounding box is returned on the detected
object and an annotation is made on the bbox.
19
Object Recognition System
CHAPTER 3
20
Object Recognition System
In this project we have taken 3 classes of objects namely CAR, TREE and APPLE. We
have trained the system for each object separately. Separate cascade classifiers have to be
trained for every rotation that is not in the image plane and will have to be retrained or run
on rotated features for every rotation that is in the image plane. For Tree class we have
taken around 150 positive images and around 350 negative images for training. Each
positive image is pre-processed and resized to specific pixel dimensions. Each object
positive image is labelled using Training Image Labeler. Similar is for the Apple. Both the
classes have colored positive and negative samples.
The Car class has positive samples in grayscale format and dimension of 100x50. The
number of positive images are around 600 and number of negative images are around
25,000. The cascade classifier for Car is trained up to 12 stages. And 8 stages for apple and
tree.
The object is chosen as such their aspect ratio does not change as much. The cascade
classifier consists of stages, where each stage is an ensemble of weak learners. The weak
learners are simple classifiers called decision stumps. Each stage is trained using a
technique called boosting. Boosting provides the ability to train a highly accurate classifier
by taking a weighted average of the decisions made by the weak learners.
Each stage of the classifier labels the region defined by the current location of the sliding
window as either positive or negative. Positive indicates that an object was found and
negative indicates no objects were found. If the label is negative, the classification of this
region is complete, and the detector slides the window to the next location. If the label is
positive, the classifier passes the region to the next stage. The detector reports an object
found at the current window location when the final stage classifies the region as positive.
21
Object Recognition System
Terminologies:
i. True positive: When a positive sample is correctly classified.
ii. False positive: When a negative sample is mistakenly classified as
positive.
iii. False negative: When a positive sample is mistakenly classified as
negative.
Condition Consideration
A large training set (in the thousands). Increase the number of stages and set a higher false
positive rate for each stage.
A small training set. Decrease the number of stages and set a lower false
positive rate for each stage.
To reduce the probability of missing an Increase the true positive rate. However, a high true
object. positive rate can prevent you from achieving the
desired false positive rate per stage, making the
detector more likely to produce false detections.
To reduce the number of false detections. Increase the number of stages or decrease the false
alarm rate per stage.
We have implemented the technique with 0.2 False alarm rate, for fewer false detection
and this makes the training phase more time consuming.
The merge threshold is chosen such that it removes multiple detection of same object in the
image. Groups of collocated detections that meet the threshold are merged to produce one
bounding box around the target object. When we set this property to 0, all detections are
returned without performing thresholding or merging operation. This property is tunable.
22
Object Recognition System
Figure 3.2: Multiple detection at lower threshold
23
Object Recognition System
3.1 SOFTWARE DESIGN
24
Object Recognition System
3.1.3 SYSTEM FLOW DIAGRAM
25
Object Recognition System
3.2 RESULT
As our projects aim is to find the object of interest from the given images. So a user
inputs any random image and our system processes the image, applies the Feature
extraction and classification algorithms to the image and shows the result. As a result
it surrounds the object in a yellow rectangular box with objects class name specified,
if it is present in the image.
We have tested our system on various images from the above mentioned 3 object
classes. As can be seen our system efficiently recognize instances of object in the
images but there are certain cases due to noise , unclear image, occlusion the system
is not able to recognize the object or causes multiple detection. Our Recognition
technique can be applied to both gray-scale and color images. The table here below
shows the efficiency of our project in different circumstances.
Apple Detection
Condition Efficiency
Bright image 79.8
Dull image with noise 56.1
Table 3.2: Apple detector
Condition Efficiency
Bright image 82.9
Dull image with noise 60.1
Table 3.3: Car detector
Tree Detection
Condition Efficiency
Bright image 74.6
Dull image with noise 50.6
Table 3.4: Tree detector
26
Object Recognition System
CHAPTER 4
SCREENSHOTS
27
Object Recognition System
4.1 GUI
This is the User Interface of the application with four buttons namely,
• Upload
• Detect Tree
• Detect Car
• Detect Apple
28
Object Recognition System
Figure 4.2: Upload Image
This detect the tree in the image and open a new window with tree labeled.
29
Object Recognition System
Figure 4.4: Tree Detected
This detect the APPLE in the image and open a new window with APPLE labeled.
30
Object Recognition System
Figure 4.6: Apple Detected
31
Object Recognition System
Figure 4.8: Car Detected
32
Object Recognition System
CHAPTER 5
33
Object Recognition System
5.1 CONCLUSION
Object recognition system is a new technology in the market and is very promising
technology. Object recognition system can give machines the ability to see and
recognize the objects like human do. The technique of object recognition has been
successfully carried out. The object recognition problem can be defined as a labeling
problem based on models of known objects. Formally, given an image containing one
or more objects of interest and a set of labels corresponding to a set of models known
to the system, the system should assign correct labels to the object instances. There are
immense possibility to increase the efficiency of the system by changing in the
parameters and by training the system with huge image database.
Object detection systems can be applied in every field and in every industry like
in manufacturing to detect the imperfections, computer vision to make intelligent
robots, to make smart surveillance systems etc.
The system can also be installed at traffic lights, which can be used to fine the
violators.
The highly trained recognition system can be used in driver less car, metro.
It can be used in smartphones to detect the historical monuments and provide their
details directly on the user’s smartphones. This will help the tourists and promote
tourism.
34
Object Recognition System
CHAPTER 6
REFERENCES
35
Object Recognition System
[1] Alex Smola and S.V.N. Vishwanathan, “AN INTRODUCTION TO MACHINE
LEARNING”, Cambridge University Press 2008, UK, 2008.
[2] http://whatis.techtarget.com/definition/Facebook-Like-button
[4] Mr. Deepjoy Das and Dr. Sarat Saharia,” Implementation and Performance
Evaluation of Background Subtraction Algorithms”, International Journal on
Computational Sciences & Applications (IJCSA) Vol.4, No.2, April 2014.
[5] Divya Patel and Pankaj Kumar Gautam “A Review Paper on Object Detection for
Improve the Classification Accuracy and Robustness using different Techniques
by”, International Journal of Computer Applications (0975 – 8887) Volume 112 –
No 11, February 2015
[6] Qiang Zhu, Shai Avidan, Mei-Chen Yeh, Kwang-Ting Cheng,” Fast Human
Detection Using a Cascade of Histograms of Oriented Gradients”, June 2006.
[7] Astha Gautam, Anjana Kumari, Pankaj Singh, “The Concept of Object
Recognition”, Volume 5, Issue 3, March 2015
[9] http://mccormickml.com/2013/05/09/hog-person-detector-tutorial/
[10] Viola, P., and M. J. Jones. "Rapid Object Detection using a Boosted Cascade of
Simple Features." Proceedings of the 2001 IEEE Computer Society Conference.
Volume 1, 15 April 2001, pp. I-511–I-518.
36
Object Recognition System