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

Object_Detection_Using_Machine_Learning (1)

The document discusses the implementation of object detection using machine learning techniques, particularly focusing on deep learning with TensorFlow and OpenCV. It aims to enhance the efficiency and accuracy of object detection systems, particularly in retail environments to reduce billing times. The paper outlines the significance of machine learning and deep learning in automating processes and improving business operations in the digital era.

Uploaded by

BARITOR WILSON
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
4 views

Object_Detection_Using_Machine_Learning (1)

The document discusses the implementation of object detection using machine learning techniques, particularly focusing on deep learning with TensorFlow and OpenCV. It aims to enhance the efficiency and accuracy of object detection systems, particularly in retail environments to reduce billing times. The paper outlines the significance of machine learning and deep learning in automating processes and improving business operations in the digital era.

Uploaded by

BARITOR WILSON
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 5

I nternational Research Journal of Computer Science ( IRJCS) ISSN: 2393-9842

Issue 04, Volume 07 ( April 2020) www.irjcs.com

OBJECT DETECTION USI NG MACHINE LEARNING


Amita Chauhan
Depar tment of Infor mation Technology
Meer ut Institute of Engineer ing and Technology, Meer ut, INDIA
[email protected]
Meenakshi Verma
Depar tment of Infor mation Technology
Meer ut Institute of Engineer ing and Technology, Meer ut, INDIA
meenakshi.ver [email protected]
Simran Gupta
Depar tment of Infor mation Technology
Meer ut Institute of Engineer ing and Technology, Meer ut, INDIA
simr [email protected]
Varsha Srivastava
Depar tment of Infor mation Technology
Meer ut Institute of Engineer ing and Technology, Meer ut, INDIA
var sha.sr [email protected]
Ajay Kumar
Depar tment of Infor mation Technology
Meer ut Institute of Engineer ing and Technology, Meer ut, INDIA
ajay.kumar @miet.ac.in
Manuscript History
Number : IRJCS/ RS/ Vol.07/ Issue04/ APCS10083
Received: 03, Apr il 2020
Final Cor r ection: 17, Apr il 2020
Final Accepted: 25, Apr il 2020
Published: April 2020
Citation: Amita, Meenakshi, Simr an, Var sha & Ajay (2020). Object Detection Using Machine Lear ning. Inter national
Resear ch Jour nal of Computer Science (IRJCS), Volume VII, 41-45. doi:/ / 10.26562/ IRJCS.2020.APIS10084
Editor: Dr .A.Ar ul L.S, Chief Editor , IRJCS, AM Publications, India
Copyr ight: © 2020 This is an open access ar ticle distr ibuted under the ter ms of the Cr eative Commons Attr ibution
License, Which Per mits unr estr icted use, distr ibution, and r epr oduction in any medium, pr ovided the or iginal author
and sour ce ar e credited
Abstract: Accur ate Object Detection w as alw ays a big deal and an impor tant par t of the Infor mation Technology er a.
After the ar r ival of Machine Lear ning and Deep Lear ning technologies, the efficiency and accur acy for Object
Detection incr eased significantly. These technologies gr eatly assisted in the evolution of the computer vision
systems. This pr oject focuses to integr ate state-of-the-ar t technique for object detection w ith the aim of the achieving
high accur acy. In this pr oject w e ar e using a deep lear ning par t w hich is Tensor flow and OpenCV, w hich is a libr ar y of
pr ogr amming functions mainly aimed at r eal-time computer vision. Ther e ar e few other libr ar ies used w hich helped
in object detection to make the system mor e accur ate and r eliabl e in the long r un. We tr ained the netw or k on var ious
objects w hich ar e or dinar y and easily available in the mar ket. This pr ojects aim to r educe the billi ng time in super
mar kets w ith fast and accur ate detection.
Keywords: OpenCV; Tensor Flow ; Image AI; Deep Lear ning; lear ning; machine detection; object based;
I. INTRODUCTION
To have complete under standing, w e ought to not only focus on classifying var ious images, but also t r y to
meticulously estimate the concepts and positions of objects contained in each image. This task is consider ed as
Object Detection and this gener ally consists of pedestr ian detection, face detection and skeleton detection. In this
pr oject ther e is a r etail stor e looking for mor e digitalized w ay of expanding their business. We used a mor e
systematic w ay of checkout system and r educe their human w or k for ce at billing counter s. In this w e devised a
system that allow s automatic detection of pr oduct using camer a. The detection of pr oduct must be w it h r espect to
the size of the pr oduct, type of pr oduct and automatically take the cost of pr oduct to make a bill of mater ials at
checkout. This has to be done in r eal-time w ithout sending the data to cloud for pr ocessing as some of these stor es
can be in r emote ar eas w ith the inter mittent connectivity so that customer s do not have to w ait due to latency issues
for connectivity. Just for an example if toothpaste is placed in fr ont of the camer a,
____________________________________________________________________________________________________________________________
IRJCS: Mendeley (Elsevier Indexed) CiteFactor Jour nal Citations Impact Factor 3.11 (2019-20) –SJIF: Innospace,
Mor occo (2019): 6.281 Indexcoper nicus: (ICV 2019): 188.80
© 2014-20, I RJCS- All Rights Reserved Page-41
I nternational Research Journal of Computer Science ( IRJCS) ISSN: 2393-9842
Issue 04, Volume 07 ( April 2020) www.irjcs.com

It w ill detect the pr oduct, accor ding to the size and w eight of toothpaste it w ill under stand w hat the pr ice of the
pr oduct is. The details of each pr oduct scanned ar e then pr esented at the bill of mater ials for payment. We ar e at the
apex of a massive tectonic shift and a br and new technological er a is coming into existence upon us. Ther efor e, it is of
gr eat significance for us to focus on the influence that numer ous technologies have on businesses now and in the
futur e. Today, many tech giants acr oss this planet ar e highly investing in lear ning developing techn ologies such as
Ar tificial Intelligence, Machine Lear ning and Inter net of Things including IIoT (IoT in industr ial setting). These
technologies have alr eady initiated to br ing a r evolutionar y change in the w ay br ands do business and ar e gr ow ing in
leaps and bounds acr oss ver ticals. This is incor por ated w ith the fact that the am ount of data being pr oduced is
exceptional, an appr oximate 20 billion connected devices by the year 2020, and w e w ill be looking at one tr illion
associated devices and things by 2050.
Amalgamate all this data being pr oduced, w ith the pr ogr esses being made in the r eckon pow er , AI and ML, w ill lead
to next w ave innovation. In fact, the day is not far w hen businesses, w ill tackle AI to do data-dr iven “thinking tasks”
for them, notably r educing the time they spend testing new inventions and in alter cating and scoping options. It has
become cr ucial for ever y business to explor e AI and ML in pr oviding distinguishing solutions, to hel p meet the
diver sified and ever -changing needs of their customer s. What exactly w e need to under stand and per ceive is that
tasks that ar e tedious, voluminous and r epetitive in natur e w ill be deployed to machines, consequently r educing
flaw s, saving time on mundane r ecur r ent jobs. In fact, pr oduct plan as a task is most likely to be outsour ced to
machines by 2030 as per Indian business master s follow ed by administr ation tasks such as scheduling meetings and
diar y management. How ever , tactical thinking and emotional fr agment ar e ar eas w her e w e w ill alw ays n eed human
inter cession.
Machine Lear ning is the intention that ther e ar e gener ic algor ithms that can pr edict something inter esting about a
set of data w ithout any need to w r ite custom code specific to the pr oblem. Instead of penning dow n t he code, one can
feed data to the gener ic algor ithm and it builds its ow n logic based on the data. Machine lear ning is an application of
Ar tificial Intelligence (AI) that pr ovides systems the capability to automatically lear n and impr ove fr om exper ience
w ithout being vividly pr ogr ammed. Machine Lear ning emphasises on the development of computer pr ogr am s that
can access data and use it lear n for themselves. The pr ocedur e of lear ning begins w ith obser vations or data, such as
examples, dir ect exper ience, or instr uction, in or der to look for patter ns in data and make better d ecisions in the
futur e based on the examples that w e pr ovide. The chief aim is to allow the computer s lear n automatically w ithout
human inter vention or assistance an adjust actions cor r espondingly.
For example, one kind of algor ithm is a classification algor ithm. It can put data into di ssimilar gr oups. The same
classification algor ithm used to agonize handw r itten number s could also be used to classify emails into spam and not
spam w ithout alter ing a line of code. It’s the same algor ithm but it’s fed diver sified tr aining data so it comes up w ith
differ ent classification logic. Machine lear ning algor ithms ar e often categor ized as super vised or unsuper vised.
A. Supervised Machine Learning Algorithms
These algor ithms can be applied on w hat has been lear ned and per ceived in the past to new data using
categor ized examples to pr edict futur e events. Beginning fr om the analysis of a know n tr aining dataset, the
lear ning algor ithm gener ates a r esulted function to make pr edictions about the output values. The system
has potential to pr ovide tar gets for any new input after adequate tr aining. The lear ning algor ithm can also
compar e its output with the tr ue, intended output and sear ch er r or s in or der to r ectify the model
consequently.
B. Unsupervised Machine Leaning Algorithms
These algor ithms ar e used w hen t he infor mation used to tr ain is neither classified nor labelled.
Unsuper vised lear ning studies how systems can r esult a function to elabor ate a hidden str uctur e fr om
unlabelled data. The system doesn’t featur e out the r ight output, but it explor es the data and can dr aw
infer ences fr om datasets to descr ibe hidden str uctur es fr om unclassified data.
C. Reinforcement Machine Learning Algorithms
This is a lear ning method that inter connects w ith its envir onment by gener ating actions and discover s flaw s
or r ew ar ds. Tr ial and er r or sear ch and r etar ded r ew ar d ar e the most per tinent char acter istics of
r einfor cement lear ning. This method allow s machines and softw ar e agents to automatically deter mine t he
supr eme behaviour w ithin specific factor s in or der to maximize its per for mance. Simple r ewar d r esponse is
r equir ed for the agent to lear n w hich action is supr eme; this is know n as the r einfor cement signal.
Deep lear ning is an ar tificial intelligence function that emulates the wor kings of the human br ain in pr ocessing data
and cr eating patter ns for use in decision making. Deep lear ning is a sub r ange of machine lear ning in ar tificial
intelligence (AI) that has netw or ks capable of gr asping unsuper vised fr om data that is unstructur ed or unclassified.
Also know n as deep neur al lear ning or deep neur al netw or k.
____________________________________________________________________________________________________________________________
IRJCS: Mendeley (Elsevier Indexed) CiteFactor Jour nal Citations Impact Factor 3.11 (2019-20) –SJIF: Innospace,
Mor occo (2019): 6.281 Indexcoper nicus: (ICV 2019): 188.80
© 2014-20, I RJCS- All Rights Reserved Page-42
I nternational Research Journal of Computer Science ( IRJCS) ISSN: 2393-9842
Issue 04, Volume 07 ( April 2020) www.irjcs.com

Deep lear ning has evolved hand-in-hand w ith the digital er a, w hich has br ought about an er uption of data in all
for ms and fr om ever y possible ar ea of the w or ld. This data, know n simply as Big Data, is dr aw n fr om sour ces like
social media, inter net sear ch engines, e—commer ce platfor ms, and online cinemas and many mor e. This huge
amount of data is r eadily accessible and can be distr ibuted thr ough applications like cloud computin g. How ever , the
data w hich usually is unstr uctur ed is so vast that it could take decades for humans to appr ehend it and extr act
r elevant documentation. Companies r ealize the r emar kable potential that can infer fr om unr avelling t his w ealth of
data and ar e incr easingly adapting to AI systems for automat ed suppor t.
Object Detection Object Detection is the pr ocess of finding r eal- w or ld instances like car , cycle, TV, bir ds and humans
in still images or videos. It allow s for the r ecognition, localization and detection of multiple obj ects w ithin an image
w hich helps us w ith a much better under standing of an image. It is commonly used in applications such as image
r etr ieval, secur ity and advanced dr iver assistance systems. Her e w e ar e using Object Detection using tensor flow
w hich is a deep lear ning libr ar y.

Block Diagr am of Object Detection Using Deep lear ning

II. OTHER TECHNOLOGIES


Numer ous other technologies ar e used in this pr oject. Python pr ogr amming language is used for coding and Python
IDE is used for w r iting the code and numer ous other technologies t hat w e w ill talk about.

A. Python
Python is one of those languages w hich is simple and pow er ful at the same time. One can get sur pr ised to
find that how easy it is to focus on the solution to the pr oblem r ather than the syntax and str uctur e of the
language in w hich pr ogr amming is to be done. Guido van Rossum, the cr eator of the python language, named
the language after the BBC show “Monty Python’s Flying Cir cus”. He doesn’t par ticular ly liked snakes that
kill animals for food by w inding their long bodies ar ound them and squeeze them r uthlessly.

Python is extr emely easy to get along w ith. Python has extr aor dinar y simple syntax. One mor e special ity of
python is, you can fr eely distr ibute copies of this softw ar e then r ead it’s code, make changes to it , and use
pieces of it in new fr ee pr ogr ams. Whenever w e ar e w r iting code, no need to w or r y about the low -level
details such as managing the memor y used by our pr ogr am.

Due to its open-sour ce natur e, Python has been por ted to many platfor ms. All your python pr ogr ams can
w or k on any of these platfor ms w ithout r equir ing ant changes at all. Python is an inter pr eted language and
not a compiled language. Python suppor ts pr ocedur e-or iented pr ogr amming as w ell as object -or iented
languages, the pr ogr am is built ar ound funct ions and pr ocedur es w hich ar e nothing but r eusable par ts of
pr ogr ams. In object-or iented languages, the pr ogr am is built around objects w hich w r ap data and
functionality. Python has a ver y pow er ful but simplistic w ay of doing OOP.

It has embeddable pr oper ty; one can embed Python w ithin your C/ C++ pr ogr ams to give scr ipting
capabilities for your pr ogr am’s user s. The Python Standar d Libr ar y is huge indeed. It can help in per for ming
var ious actions involving r egular expr essions, documentation gener ation, w eb br ow ser s, databases,
thr eading, unit testing, email, GUI, cr yptogr aphy and other system-dependent stuff.

____________________________________________________________________________________________________________________________
IRJCS: Mendeley (Elsevier Indexed) CiteFactor Jour nal Citations Impact Factor 3.11 (2019-20) –SJIF: Innospace,
Mor occo (2019): 6.281 Indexcoper nicus: (ICV 2019): 188.80
© 2014-20, I RJCS- All Rights Reserved Page-43
I nternational Research Journal of Computer Science ( IRJCS) ISSN: 2393-9842
Issue 04, Volume 07 ( April 2020) www.irjcs.com

B. Python IDE
An integr ated development envir onment is an application w hich pr ovides pr ogr ammer s and developer s
w ith basic tools to w r ite and test softw ar e. Python is a w idely used high-level, gener al-pur pose, inter pr eted,
dynamic pr ogr amming language. Python is dilapidated and extensively popular language. Text editor s ar e
not sufficient for building lar ge systems w hich r equir e integr ating modules and libr ar ies and best IDE is
r equir ed. Python Jupyter star ted as a der ivative of IPython in 2014 to suppor t scientific computing and
inter active data science acr oss all pr ogr amming languages.
C. ImageAI
ImageAI is a python libr ar y built to entitle developer s to build applications and systems w ith self-contained
deep lear ning and Computer Vision abilities using a few lines of code. ImageAI makes use of compar atively
small codes. ImageAI contains a python execution of almost all of the state-of-the-ar t deep lear ning
algor ithms. ImageAI makes use of numer ous APIs that w or k offline – it has object detection, video detection
and var ious object tr acking APIs that can be called w ithout inter net connection. ImageAI makes use of a pr e-
tr ained model and can easily be modified. The Object Detection class of the ImageAI libr ar y includes
functions to per for m object detection on any image or set of images, using pr e-tr ained models. With
ImageAI, one can detect and identify 80 differ ent kinds of common and easily available objects.

D. OpenCV ( Open Source Computer Vision Libr ary)


It is an open sour ce computer vision and machine lear ning softw ar e libr ar y. OpenCV w as built to pr ep ar e a
common infr astr uctur e for computer vision applications and to acceler ate the use of machine cognizan ce in
the commer cial and daily use pr oducts. OpenCV makes it easy for businesses to utilize and modify the code.
The libr ar y has mor e than 2500 optimized algor ithms, w hich includes an extensive set of both classic and
state-of-the-ar t computer vision and machine lear ning algor ithms. These algor ithms ar e used to detect and
r ecognize faces, identify objects, tr ack camer a movements, tr acking moving objects, classify human actions
in videos, pr oduce 3D point clouds fr om ster eo camer as, extr act 3D models of object s, follow eye
movements, find similar images fr om an entire scene, stitch images together to pr oduce a high r esolution
image of an entir e scene, r emove r ed eyes fr om images taken using flash, r ecognize scener y and insti tute
mar ker s to over lay it w ith augmented r eality and many mor e other applications.The libr ar y is used
compr ehensively in companies, r esear ch gr oups and by gover nmental bodies.

E. TensorFlow
This is the most famous and popular Deep Lear ning libr ar y in the w or ld w hich is addr essed as Google’s
Tensor Flow . Google pr oduct uses machine lear ning in almost all of its pr oducts to optimize the sear ch
engine, tr anslation, image captioning or r ecommendations. Tensor Flow ar chitectur e w or ks in thr ee par ts:
Pr e-pr ocessing the data, Build the model and Tr ain and estimate the model. It is called Tensor Flow because
it takes input as a multi-dimensional ar r ay, also know n as tensor s. You can build a sor t of flow char t of
oper ations (called a gr aph) that you desir e to per for m on that input. The input goes in at one end and then ir
flow s thr ough this system of multiple oper ations and comes out the other end as a r esult. This is w hy It is
named as Tensor Flow because the tensor goes in it flow s thr ough a list of oper ations and then it com es out
the other side. TensorFlow .js is a javascr ipt libr ar y for tr aining and deploying machine lear ning in the
br ow ser and in Node.js. It is a companion libr ar y to Tensor Flow , a popular ML libr ar y for python. It is
har dw ar e – acceler ated because it uses WebGL (a JavaScr ipt gr aphics API), so it has sur pr isingly good
per for mance. Tensor Flow .js also allow s you to load models you have tr ained in the Python ver sion of
Tensor Flow . That means you can w r ite a model and tr ain it using Python, then save it to a location available
on the w eb and load it in your JS. In Tensor Flow .js, you can cr eate and r un AI models in a static HTML
document. You can use AI w ithout setting up a ser ver or even a database. As long as the user ’s br ow ser
suppor ts JavaScr ipt you can tr ain and use ML models, all client -side.
F. WebCam
A w ebcam is a video camer a that str eams or feeds an image or video in r eal time to or thr ough a computer to
a computer netw or k, just like the inter net. Webcams ar e actually small camer as that sit on a bench, attach to
a user ’s monitor or ar e built into the har dw ar e. The popular use of w ebcams is the constr uction of video
links, per mitting computer s to act as videophones or videoconfer ence stations. Other uses like computer
vision, video br oadcasting, secur ity and for r ecor ding social videos.
G. Windows 10
Window s 10 is a ser ies of oper ating systems produced by Micr osoft and r eleased as par t of its Window s NT
Family of oper ating systems. It is the successor to Window s 8.1, launched near ly tw o year s ago and w as
r eleased to manufactur ing on July 15, 2015 and br oadly r eleased for r etail sale on July 29, 2015.

____________________________________________________________________________________________________________________________
IRJCS: Mendeley (Elsevier Indexed) CiteFactor Jour nal Citations Impact Factor 3.11 (2019-20) –SJIF: Innospace,
Mor occo (2019): 6.281 Indexcoper nicus: (ICV 2019): 188.80
© 2014-20, I RJCS- All Rights Reserved Page-44
I nternational Research Journal of Computer Science ( IRJCS) ISSN: 2393-9842
Issue 04, Volume 07 ( April 2020) www.irjcs.com

III. APPROACH
A. Step 1
Our fir st task is to cr eate the necessar y folder s. Folder s like Object Detection as r oot folder ; Models as stor es pr e-
tr ained model; Input as stor es image file on which w e desi r e to per for m object detection; Output as stor es image
file w ith detected objects
B. Step 2
Open your pr efer r ed IDE for penning dow n the python code and cr eate a new file, detector .py.
C. Step 3
Impor t Object Detection class fr om the ImageAI libr ar y.
D. Step 4
Now that one has impor ted imageAI libr ar y and the Object Detection class, the next most impor tant task is to
cr eate an instance of the class Object Detection.
E. Step 5
Now specify the path fr om our input image, output image and model.
F. Step 6
After instantiating the Object Detection class one can now call for var ious functions fr om the class. The class
contains the functions to call pr e-tr ained models.
G. Step 7
Next you w ill call the function, w hich accepts a str ing w hich contains the path to the pr e-tr ained model.
H. Step 8
This steps calls the function load Model() fr om the detector instance. It loads the model fr om the path specified
using some class method.
I. Step 9
To detect objects in the image, w e need to call the detect Object fr om Image function using the detector object
that w e cr eated.
J. Step 10
The dictionar y items can be accessed by tr aver sing thr ough each item in the dictionar y.
Now complete the object detection code.

III. CONCLUSIONS
It is safe to conclude that one can automate the billing system like w e scan the images of our pr oducts and using ML
Model w e compute the pr ices for all your pr oducts and total cost in consider ably less time than befor e and that too
w ithout cr eating a fuss at the billing counter . By using this w e need not to w or r y about the bar code and looking at
the pr ice of the pr oduct w hich is usually w r itten in the cor ner and that too minutely.

ACKNOWLEDGEMENT
The author s w ould like to thank our faculty guide, Mr . Ajay Kumar , Assistant Pr ofessor at Depar tment of IT at Meer ut
Institute of Engineer ing and Technology, Meer ut for facilitating the development of the paper , making available
r esour ces and also for final deployment.

REFERENCES
1. Tom M. Mitchell – Machine Lear ning, Mc Gr aw Hill Education (India Pr ivate Limited), 2013.
2. Ethem Alpaydin – Intr oduction to Machine Lear ning (Adaptive Computation and Machine Lear ning), The MIT
Pr ess 2014.
3. Stephen Mar sland – Machine Lear ning : An algor ithmic per spective, CRC Pr ess 2009.
4. Bishop C, Patter n Recognition and Machine Lear ning, Ber lin Spr inger - Ver lag.
5. Cosma Rohilla Shalizi, Advanced Data Analysis fr om an elementar y point of view , 2015.
6. Ian Goodfellow , Yoshua Bengio, Aar on cour ville, Deep Lear ning MIT, Pr ess.
7. Rittinghouse, John W, and James F r ansome, - Cloud Computing: Implementation, Management and Secur i ty, CRC
Pr ess 2017.
8. Toby Velte, Anthony Velte, Rober t Elsenpeter , Cloud Computing: A pr actical Appr oach, Tata Mc Gr aw Hi ll, 2009

____________________________________________________________________________________________________________________________
IRJCS: Mendeley (Elsevier Indexed) CiteFactor Jour nal Citations Impact Factor 3.11 (2019-20) –SJIF: Innospace,
Mor occo (2019): 6.281 Indexcoper nicus: (ICV 2019): 188.80
© 2014-20, I RJCS- All Rights Reserved Page-45

You might also like