Vehicle Detection and Tracking Using Machine Learning Techniques: A Master's Thesis, Exams of Data Warehousing

data intelligdata execercices ence and

Typology: Exams

2020/2021

Uploaded on 06/06/2021

rachid-1
rachid-1 🇲🇦

5

(2)

5 documents

1 / 74

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
SIPAN MASOUD MUSTAFA
VEHICLE DETECTION AND TRACKING USING
MACHINE LEARNING TECHNIQUES
A THESIS SUBMITTED TO THE GRADUATE
SCHOOL OF APPLIED SCIENCES
OF
NEAR EAST UNIVERSITY
By
SIPAN MASOUD MUSTAFA
In Partial Fulfillment of the Requirements for
the Degree of Master of Science
in
Software Engineering
NICOSIA, 2019
VEHICLE DETECTION AND TRACKING USING MACHINE
LEARNING TECHNIQUES
NEU
2019
pf3
pf4
pf5
pf8
pf9
pfa
pfd
pfe
pff
pf12
pf13
pf14
pf15
pf16
pf17
pf18
pf19
pf1a
pf1b
pf1c
pf1d
pf1e
pf1f
pf20
pf21
pf22
pf23
pf24
pf25
pf26
pf27
pf28
pf29
pf2a
pf2b
pf2c
pf2d
pf2e
pf2f
pf30
pf31
pf32
pf33
pf34
pf35
pf36
pf37
pf38
pf39
pf3a
pf3b
pf3c
pf3d
pf3e
pf3f
pf40
pf41
pf42
pf43
pf44
pf45
pf46
pf47
pf48
pf49
pf4a

Partial preview of the text

Download Vehicle Detection and Tracking Using Machine Learning Techniques: A Master's Thesis and more Exams Data Warehousing in PDF only on Docsity!

SI

PAN

MASOUD MUSTAFA^ VEHICLE DETECTION AND TRACKING USING

MACHINE LEARNING TECHNIQUES

A THESIS SUBMITTED TO THE GRADUATE

SCHOOL OF APPLIED SCIENCES

OF

NEAR EAST UNIVERSITY

By

SIPAN MASOUD MUSTAFA

In Partial Fulfillment of the Requirements for

the Degree of Master of Science

in

Software Engineering

NICOSIA, 2019

VEHICLE DETECTION AND TRACKING USING MACHINE

LEARNING TECHNIQUES

2019 NEU

VEHICLE DETECTION AND TRACKING USING

MACHINE LEARNING TECHNIQUES

A THESIS SUBMITTED TO THE GRADUATESCHOOL

OF APPLIED SCIENCESOF

NEAR EAST UNIVERSITY

By

SIPAN MASOUD MUSTAFA

In Partial Fulfillment of the Requirements for

the Degree of Master of Science

in

Software Engineering

NICOSIA, 2019

I hereby declare that all information in this document has been obtained and presented in accordance with academic rules and ethical conduct. I also declare that, as required by these rules and conduct, I have fully cited and referenced all material and results that are not original to this work. Name, Last Name: Sipan Mustafa

Signature:

Date:

ii

ACKNOWLEDGMENTS

First and foremost, I give my thanks to an understanding supervisor Assist. Prof. Dr. Boran Şekeroḡlu for his support, directions and for providing me guidance to start and complete this research within the stipulated time. Although, I must express my very profound gratitude to my parents and to myunaffectedfamily for providing me with unfailing support and continuous encouragement throughout my years of study which is actually the whole of my life. This accomplishment would not have been possible without them.

Thank you.

Sipan,

iii

To my family...

v

ÖZET

Bu yüksek lisans tezi, araç algılama ve izlemeye odaklanmaktadır. Araştırma görüntü ve videolardaki araçları tespit etmeye çalışıyor. Algoritmaları eğitmek için Udacity'den bir veri kümesi dağıtıyor. İki makine öğrenme algoritması; Tespit ve izleme görevleri için Destek Vektör Makinesi (SVM) ve Karar Ağacı geliştirilmiştir. Her iki modelin oluşturulması ve eğitimi için Python programlama dili, geliştirme dili olarak kullanılmıştır. Bu iki algoritma, bu ikisi arasında en iyi modeli sunmasına ve önermesine rağmen, her birinin zayıf yönlerini ve güçlerini belirlemek için geliştirildi, eğitildi, test edildi ve birbirleriyle karşılaştırıldı. Değerlendirme amacıyla, daha doğru modeli karşılaştırmak ve tanımlamak için birçok teknik kullanılır. Tezin asıl amacı ve hedefi, sistemin durağan veya hareketli görüntü veya videolarda olup olmadığını otomatik olarak tespit edebilmesi ve izleyebileceği bir sistem geliştirmektir.

Araç tespiti aynı zamanda bilgisayarlı görme nesnesi tanıma, temel olarak bilimsel yöntemler ve makinelerin insan gözünden ziyade nasıl göründüğü olarak da adlandırılır. Bir araç algılama sisteminin asıl görevi, giriş görüntülerinde bir veya daha fazla aracı yerelleştirmektir. Sonuçlar, SVM'nin Karar Ağacı'nı geride bıraktığını ve araç tespit ve izleme görevleri için kabul edilebilir bir doğruluğa sahip olduğunu gösterdi.

Anahtar Kelimeler : Araç algılama; Araç İzleme; SVM; Karar Ağacı; Görüntü algılama ;algılama ve İzleme

vi

TABLE OF CONTENTS

ACKNOWLEDGMENTS ……………………………………………………………… ii ABSTRACT …………………………………………………………………………….. iv ÖZET ……………………………………………………………………………………. v TABLE OF CONTENTS ……………………………………………………………… vi LIST OF TABLES ……………………………………………………………………… viii LIST OF FIGURES ...……………………………………………...…………………... ixx LIST OF ABBREVIATIONS ……………………………………………………...…… x

CHAPTER 1: INTRODUCTION

1.1 Background………………………………………………………………………………… 1 1.2 The Problem………………………………………………………………………………... 2 1.3 Aim of the Study…………………………………………………………………………… 2 1.4 Significance of the Study…………………………………………………………………… 2 1.5 The Limitations of the Study……………………………………………………………….. 3 1.6 Overview of the Study……………………………………………………………………… 3

CHAPTER 2: LITERATURE REVIEW …………………………………...………….. 4

CHAPTER 3: MACHINE LEARNING TECHNIQUES

3.1 Machine Learning…...……………………………………………………………………… 12 3.1.1 SupervisedLearning...……………………………………………………..………….... 13 3.1.2 Unsupervised Learning …………………………………………...………………….... 14 3.1.3 Reinforcement Machine Learning ……………………………...……………….…….. 15 3.2 Used Machine Learning Techniques ………………………………...…………………….. 16 3.2.1 Support Vector Machine (SVM) ………………………………..…………………...... 16 3.2.2 Decision Trees ………………………………………………….....………………….. 17

viii

LIST OF TABLES

Table 5.1: SVC classifier training result …………………………………….………… 34 Table 5.2: Decision Tree classifier training results ...…….……..……………….…….. 40

ix

 - 4.1 Tools Used………………………………………………………………………………..... CHAPTER 4: METHODOLOGY - 4.1.1 Python............................................................................................................................. - 4.1.2 Jupyter Notebook…………………………………………………………………….... - 4.1.3 Computer……………………………………….……………………………………… - 4.1.4 Datasets…………………………………………………………………………….….. - 4.2 Implementation…………………………………………………………………………….. - 4.2.1 Color histogram……………………………………………………….………………. - 4.2.2 Histogram of Oriented Gradients (HOG)………………………………………...….... - 4.2.3 Classifiers……………………………………………………….………………….…. - 4.2.4 Train and Test Split………………………………………………………………….... - 4.2.5 Sliding Window………………………………………………..……………………… 
  • 4.2.6 Pipeline video…………………………………………………………………......... - 4.4 Model Development Summary…………………………………………….………. - 5.1 Experimental Setup…………………………………………………………………………. CHAPTER 5: RESULTS AND DISCUSSION - 5.2.1 SVM implementation............…………………………………………………………... - 5.3 Decision Tree……………………………………………………………………………….. - 5.3.1 Advantages……………………………………………………………………………... - 5.3.2 Decision Tree Training………………………………………………………………… - 6.1 Future Works………………………………………………………………………...……... CHAPTER 6: CONCLUSION AND RECOMMENDATIONS
  • REFERENCES …………………………………………………..…………………….………..
    • APPENDIX 1……………………………………………………………………………. APPENDICES
  • Figure 2.1: Different thresholds using edge featurer………………………………………… LIST OF FIGURES
  • Figure 2.2: Edge and color feature for artificial objects……………………………………...
  • Figure 2.3: Features, training samples and detection results…………………………………
  • Figure 2.4: HoG features, vectors, histograms, background image………………………….
  • Figure 2.5: Extraction process workflow of the bLPS-HoG features………………………..
  • Figure 3.1: Diagram of the Supervised Learning…………………………………………….
  • Figure 3.2: Unsupervised learning model diagram…………………………………………..
  • Figure 3.3: Reinforcement Learning model (UCBWiki, 2016)………………………………
  • Figure 3.4: SVM splittion…………………………………………………………………….
  • Figure 3.5: Decision tree flow chart………………………………………………………….
  • Figure 3.6: Nodes representation……………………………………………………………..
  • Figure 4.1: Vehicle and Non-Vehicle images………………………………………………..
  • Figure 4.2: Model development summary…………………………………………………..
  • Figure 5.1: Dataset few instances…………………………………………………………...
  • Figure 5.2: Histogram and Color feature of Vehicles…………………………………….....
  • Figure 5.3: Histogram and color feature of non-vehicles……………………………………
  • Figure 5.4: HOG features extraction from one sample of the vehicles……………………..
  • Figure 5.5: Sliding window with the refined sliding windows……………………………..
  • Figure 5.6: Heat Map on testing image……………………………………………………..
  • Figure 5.7: Pipeline sample on test images………………………………………………....
  • Figure 5.8: SVC and Decision Tree Comparison result…………………………………….

iii

CHAPTER 1

INTRODUCTION

1.1 Background

Since the population and transport system increase day by day, the demand for managing them increase at the same time. The world is getting populated so fast. Therefore the number of machines from any types including vehicles increased at the same time. That being said, new topics like traffic, accidents and many more issues are needed to be managed. It is hard to manage them with the old methods, new trends and technologies have been found and invented to handle each and every milestone that human kind is trying achieve. One of these challenges is traffic in highways and cities. Many options like traffic light, sign, etc. deployed in order to deal with this phenomena. It seems that these options are not enough or not so efficient alone. New technologies like object detection and tracking are invented in order to utilize automated camera surveillance to produce data that can give meanings for a decision making process. This phenomena have been used for different kind of issues. The new trend Intelligent Transport System (ITS) has many elements which object detection and tracking is one of them. This system is used to detect vehicles, lanes, traffic sign, or vehicle make detection. The vehicle detection and classify ability gives us the possibility to improve the traffic flows and roads, prevent accidents, and registering traffic crimes and violations.

Humans can easily recognize vehicles in videos or images or to identify different types of cars. In computer algorithms and programs it is highly depend on the types of data. Some challenges like the weather or light are also plays important role on making the process easy or much hard. At the same time we have different types and shapes of vehicles. More than that the new challenge could be to identify moving objects in a video in real time where they are different in size and shape.

There are different techniques and methods for vehicle detection and classification. The variety of these techniques are in types of

the city. Having a digitized traffic system which is functioning 24/7 and make the tasks so easy and efficient is crucial for all countries around the globe. Therefore having a computerized traffic system cannot be handled without having an accurate vehicle detection system. The system obviously affects the economy, the life of citizens, the industry, etc.

That being said, it is necessary to contribute in the topic until we reach to a level which the algorithms can accurately detect all kind of objects or vehicles whether they are in images or videos through pipelines.

1.5 The Limitations of the Study

Despite the fact that the thesis reached to its goals, it would have been more accurate if the dataset is improved and the number of objects in vehicles and non-vehicles class increased. At the same time it would be more complete and proper claim if the comparison would have conducted between many more options in the algorithms which are used in computer visionary problems.

1.6 Overview of the Study

The thesis is consist of six chapters in all:

Chapter 1: gives a general introduction and background about the topic. This chapter describes the aim of the thesis, its importance and overview of the research.

Chapter 2: past researches which are related to the topic are reviewed, their techniques and results are also discussed.

Chapter 3: this chapter is focused on machine learning techniques, theory, formula, implementation, and philosophy.

Chapter 4: ML algorithms and models used in this thesis will be explained in details with their backend formulas. Chapter 5: the result and outcome is presented.

Chapter 6: the conclusion is presented with a general view and future recommendations for research topic improvement.

CHAPTER 2

LITERATURE REVIEW

In the past few decades researchers had a great interest in vehicle detection and tracking. The topic attracted the attention quit much. Different sensing modalities have been used for detecting the objects or specifically vehicles. These modalities are LIDAR, radar, and computer vision. The attraction caused by immense progress of image processing. The very first signs and models of image processing goes back to the 1960s’ and 1070s’, after that various methods and techniques have been invented and proposed (Chen, 2015). This chapter briefly discuss the recent related works by researchers regarding vehicle detection and tracking.

At the very beginning we can say that any approach in this topic are classified.

At a glance we have four sections:

 Object recognition and identification from the appearance  Classifying the object into one of the categories.  Object detection or target detection  Tracking the object or the target

Object detection presents some unique attributes of an object that a computer can identify distinctly from other objects. Meanwhile the object classification intend to identify the similarities of an object with an object category at all. From the object detection result, we can assign an object tracker, the tracker is following the target by re-detecting it in the sequence frame following the first point of the target.

The primary goal and target of the thesis is to develop a system in which the system should be able to detect and track the vehicles automatically whether they are static or moving in images and videos.

Vehicle detection also called computer vision object recognition, basically the scientific methods and ways of how machines see rather than human eyes. The main duty of a vehicle detection system is to localize one or more vehicles in input images. There are two methods in vehicle detection system: sliding window method (Yu & Shi, 2015) and local features method (Noh, Shim & Jeon, 2015). In the local features-based method, the system usually find the features of