Pathole Detction Using Machine Learning
Pathole Detction Using Machine Learning
Patholes on road surfaces pose a serious hazard to vehicles and passengers due to the
difficulty detecting them and the short response time. Therefore, many government agencies
are applying various pothole-detection algorithms for road maintenance. However, current
methods based on object detection are unclear in terms of real-time detection when using low-
spec hardware systems. In addition, the risk assessment based on the proposed YOLOv3 was
calculated by comparing the tire contact patch size with pothole size by applying the pinhole
algorithm that can detect patholes and classify the risks in real-time using YOLOv3 algorithm.
Moreover, their location can be logged and shared to aid other drivers and road maintenance
1
CHAPTER-1
INTRODUCTION
The number of vehicles drastically increases every year, and the number of accidents
proportionally does too. The condition of road surface affects directly on our safety. The
American Automobile Association estimated in the five years prior to 2016 that 16 million
drivers in the United States had suffered damage from potholes to their vehicle with a
cost of 3 billion USD a year. In India, 3,000 people per year are killed in accidents
involving potholes. Britain has estimated that the cost of fixing all roads with potholes in the
country would cost 12 billion EURO. According to the World Health Organization, road
traffic injuries caused an estimated 1.25 million deaths worldwide in the year 2010. That is,
one person is killed every 25 seconds. Only 28 countries, representing 449 million people
(seven percent of the world's population), have adequate laws that address all five risk factors
(speed, drunk driving, helmets, seat-belts and child restraints). By the way, there is close
relationship between the accident and road condition including a pothole. According to
Austroads, road accidents occur as the result of one, or more than one of the following
factors: human factors, vehicle factors, road and environment factors. Vogel and Bester
introduced risk factors (human, vehicle and environment factors) for 14 accident types that
can be used as a reference point to determine the likely cause of an accident of a specific type.
A research had been done from a little bit different point of view, where the researchers
proposed a cost-effective solution to identify the potholes and humps on roads and
provide timely alerts to drivers to avoid accidents or vehicle damages. Ultrasonic sensors are
used to identify the potholes and humps. A low cost model for analyzing 3D pavement images
was proposed, which utilizes a low cost Kinect sensor which gives the direct depth
2
measurements, thereby reducing computing costs. Lin and Liu have proposed a method for
have been done but they require some specific devices or tools to acquire sensor data. In this
paper, we propose an hany way to implement pothole detection using a smartphone, and
theproposed approach provides us efficiency from the view point of implementation and
performance.
CHAPTER 2
4
SYSTEM ANALYSIS
road maintenance and safety issues. Existing systems employ various machine learning
techniques to identify and locate potholes on road surfaces. These systems typically
involve the use of cameras, sensors, and image processing algorithms to detect
2.1.1 DISADVANTAGES
datasets for training, which can be challenging to acquire and may not fully
conditions such as heavy rain, snow, or fog. Machine learning models trained
on clean, well-lit datasets may struggle to adapt to the unpredictable and varied
adverse weather.
5
Moreover, the real-time nature of pathole detection systems is crucial for
timely interventions, but many existing models may exhibit high computational
activities or, conversely, overlook actual pathole, impacting the system's overall
sensors including gyroscope and accelerator. Fortunately, almost all of the recent
mobile smart phones have the two sensors, which is easy to handle and has advantages
acquire movement information, and the sensed data will be fed into a classifier to
detect the status of a road. In this point, a classifier is one of the key component to
2.2.1 ADVANTAGES
6
Secondly, the implementation of machine learning in pothole detection
This efficiency not only saves time and resources but also ensures that road
2.3 ALGORITHM
YOLO (You Only Look Once) is a real-time object detection algorithm developed by
Joseph Redmon and Ali Farhadi in 2015. It is a single-stage object detector that uses a
convolutional neural network (CNN) to predict the bounding boxes and class probabilities of
Processor –Core i3
Hard Disk – 160 GB
Memory – 1GB RAM
Monitor
Windows 7 or higher
Python 3.8+
Pycharm IDE
7
CHAPTER-3
MODULE DESCRIPTION
Data preprocessing module for pathole detection involves preparing the dataset for
machine learning. It includes tasks such as cleaning and annotating the data, resizing and
normalizing images, augmenting the dataset for variety, splitting it into training and testing
sets, extracting relevant features, handling class imbalances, serializing the data for efficient
training.
deep learning model into a programming environment. This module facilitates the integration
of pre-trained models into applications, allowing users to leverage the learned features and
manipulate, analyze, and enhance digital images. This module is responsible for applying
various techniques to extract information, improve visual quality, or prepare images for
further analysis. Image processing modules are commonly used in computer vision, machine
learning, and various applications such as medical imaging, remote sensing, and multimedia
processing.
8
3.4 PATHOLE DETECTION MODULE
techniques to automatically identify and locate potholes on road surfaces from images or
video data. The module involves preprocessing the data, extracting relevant features, and
training a model to distinguish between road surfaces with and without potholes. Once trained,
the module can analyze new images or video frames and accurately identify the presence and
9
CHAPTER 4
SYSTEM DESIGN
4.1ARCHITECTURE DESIGN
Software design sits at the technical kernel of the software engineering process and is
applied regardless of the development paradigm and area of application. Design is the first
10
step in the development phase for any engineered product or system. The designer’s goal is to
produce a model or representation of an entity that will later be built. Beginning, once system
requirement have been specified and analyzed, system design is the first of the three technical
activities -design, code and test that is required to build and verify software.
The importance can be stated with a single word “Quality”. Design is the place where
software that can assess for quality. Design is the only way that we can accurately translate a
customer’s view into a finished software product or system. Software design serves as a
foundation for all the software engineering steps that follow. Without a strong design we risk
building an unstable system – one that will be difficult to test, one whose quality cannot be
procedural details are developed reviewed and documented. System design can be viewed
from either technical or project management perspective. From the technical point of view,
design is comprised of four activities – architectural design, data structure design, interface
4.3 NORMALIZATION
handle the problems that can arise due to data redundancy i.e. repetition of data in the
database, maintain data integrity as well as handling problems that can arise due to insertion,
11
Decomposing is the process of splitting relations into multiple relations to eliminate
anomalies and maintain anomalies and maintain data integrity. To do this we use normal
1. Insertion anomaly: Inability to add data to the database due to absence of other data.
3. Update anomaly: Data inconsistency resulting from data redundancy and partial
update
4. Normal Forms: These are the rules for structuring relations that eliminate anomalies.
A relation is said to be in first normal form if the values in the relation are atomic for
every attribute in the relation. By this we mean simply that no attribute value can be a set of
A relation is said to be in second Normal form is it is in first normal form and it should
3) Every non key attribute is fully functionally dependent on full set of primary key.
Transitive Dependency:
12
If two non key attributes depend on each other as well as on the primary key then they
The above normalization principles were applied to decompose the data in multiple
4.4 E – R DIAGRAMS
The relation upon the system is structure through a conceptual ER-Diagram, which not
only specifics the existential entities but also the standard relations through which the
system exists and the cardinalities that are necessary for the system state to continue.
The entity Relationship Diagram (ERD) depicts the relationship between the data
objects. The ERD is the notation that is used to conduct the date modeling activity the
attributes of each data object noted is the ERD can be described resign a data object
descriptions.
The set of primary components that are identified by the ERD are
1. Data object
2. Relationships
3. Attributes
The primary purpose of the ERD is to represent data objects and their relationships.
13
FIGURE: 2 E-R DIAGRAM
A data flow diagram is graphical tool used to describe and analyze movement of data
through a system. These are the central tool and the basis from which the other components
are developed. The transformation of data from input to output, through processed, may be
described logically and independently of physical components associated with the system.
These are known as the logical data flow diagrams. The physical data flow diagrams show the
actual implements and movement of data between people, departments and workstations. A
14
full description of a system actually consists of a set of data flow diagrams. Using two
familiar notations Yourdon, Gane and Sarson notation develops the data flow diagrams. Each
Process is further identified with a number that will be used for identification purpose.
The development of DFD’S is done in several levels. Each process in lower level diagrams
can be broken down into a more detailed DFD in the next level. The lop-level diagram is
often called context diagram. It consists a single process bit, which plays vital role in studying
the current system. The process in the context level diagram is exploded into other process at
The idea behind the explosion of a process into more process is that understanding at
one level of detail is exploded into greater detail at the next level. This is done until further
explosion is necessary and an adequate amount of detail is described for analyst to understand
the process.
A DFD is also known as a “bubble Chart” has the purpose of clarifying system
requirements and identifying major transformations that will become programs in system
design. So it is the starting point of the design to the lowest level of detail. A DFD consists of
15
1. A square defines a source(originator) or destination of system data
2. An arrow identifies data flow. It is the pipeline through which the information flows
3. A circle or a bubble represents a process that transforms incoming data flow into
outgoing data flows.
4. An open rectangle is a data store, data at rest or a temporary repository of data
Data flow
Data Store
1. Process should be named and numbered for an easy reference. Each name should be
2. The direction of flow is from top to bottom and from left to right. Data traditionally flow
from source to the destination although they may flow back to the source. One way to
indicate this is to draw long flow line back to a source. An alternative way is to repeat the
16
source symbol as a destination. Since it is used more than once in the DFD it is marked
3. When a process is exploded into lower level details, they are numbered.
4. The names of data stores and destinations are written in capital letters. Process and
A DFD typically shows the minimum contents of data store. Each data store should
Questionnaires should contain all the data elements that flow in and out. Missing
interfaces redundancies and like is then accounted for often through interviews.
1. The DFD shows flow of data, not of control loops and decision are controlled
considerations do not appear on a DFD.
2. The DFD does not indicate the time factor involved in any process whether the
dataflow take place daily, weekly, monthly or yearly.
3. The sequence of events is not brought out on the DFD.
the names of computer systems that might provide some of the overall system-processing
label includes an identification of the technology used to process the data. Similarly data
17
flows and data stores are often labels with the names of the actual physical media on which
data are stored such as file folders, computer files, business forms or computer tapes.
The physical aspects at the system are removed as much as possible so that the current
system is reduced to its essence to the data and the processors that transform them regardless
This is exactly like a current logical model if the user were completely happy with he
user were completely happy with the functionality of the current system but had problems
with how it was implemented typically through the new logical model will differ from current
logical model while having additional functions, absolute function removal and inefficient
flows recognized.
The new physical represents only the physical implementation of the new system.
1) Data cannot move directly from one data store to another data store, a process
must move data.
18
2) Data cannot move directly from an outside source to a data store, a process,
which receives, must move data from the source and place the data into data
store
3) A data store has a noun phrase label.
1) Data cannot move direly from a source to sink it must be moved by a process
2) A source and /or sink has a noun phrase land.
3)
4.7.4 DATA FLOW
1) A Data Flow has only one direction of flow between symbols. It may flow in both
directions between a process and a data store to show a read before an update. The
later is usually indicated however by two separate arrows since these happen at
different type.
2) A join in DFD means that exactly the same data comes from any of two or more
3) A data flow cannot go directly back to the same process it leads. There must be atleast
one other process that handles the data flow produce some other data flow returns the
6) A data flow has a noun phrase label more than one data flow noun phrase can appear
on a single arrow as long as all of the flows on the same arrow move together as one
package.
19
4.7.5 DATA DICTONARY
After carefully understanding the requirements of the client the the entire data storage
requirements are divided into tables. The below tables are normalized to avoid any anomalies
during the course of data entry
4.8.1Actor:
A coherent set of roles that users of use cases play when interacting with the use cases.
FIGURE: 3 ACTOR
UML stands for Unified Modeling Language. UML is a language for specifying,
visualizing and documenting the system. This is the step while developing any product after
analysis. The goal from this is to produce a model of the entities involved in the project which
later need to be built. The representation of the entities that are to be used in the product being
20
They are as follows:
Sequence Diagram
Class diagram
Activity Diagram
Use case diagrams model behavior within a system and helps the developers
understand of what the user require. The stick man represents what’s called an actor.Use case
diagram can be useful for getting an overall view of the system and clarifying who can do and
more importantly what they can’t do. Use case diagram consists of use cases and actors and
The purpose is to show the interactions between the use case and actor.
21
CHAPTER 5
SYSTEM DEVELOPMENT
5.2INTRODUCTION TO PYTHON:
programs generally are smaller than other programming languages like Java. Programmers have
to type relatively less and the indentation requirement of the language, makes them readable all
the time.
Python language is being used by almost all tech-giant companies like – Google,
The biggest strength of Python is huge collection of standard library which can be used
Machine Learning
Test frameworks
Multimedia
Scientific computing
22
Text processing and many more.
programs generally are smaller than other programming languages like Java. Programmers
have to type relatively less and the indentation requirement of the language, makes them
Now that we know what makes Python a high level language, l et us also have a look
5.2.1 Function annotations: Python allows you to add annotations to function parameters and
return types. These annotations are optional and do not affect the function’s behaviour, but
they can be used to provide additional information to developers working on the language.
5.2.2 Coroutines: Python supports coroutines, which are functions that can be paused and
resumed. Coroutines are useful for writing asynchronous code, such as in web servers or
networking applications.
5.2.3 Enumerations: Python has a built-in Enum class that allows you to define symbolic
names for values. Enumerations are useful for improving the readability and maintainability of
your code.
5.2.4 List comprehensions: Python allows you to create lists in a concise and readable way
using list comprehensions. For example, you can create a list of squares of numbers using
23
5.2.5 Extended iterable unpacking: Python allows you to unpack iterable (e.g., lists, tuples,
and dictionaries) into variables using the * and ** operators. This feature makes it easy to
5.2.6 The with statement: Python’s with statement allows you to manage resources (such as
files or network connections) cleanly and concisely. The with statement automatically opens
5.2.7 The walrus operator: Python 3.8 introduced the walrus operator (:=), which allows you
to assign a value to a variable as part of an expression. This feature is usedful for simplifying
5.2.8 The slots attribute: Python allows you to optimize memory usage by using the slots
attribute in classes. This attribute tells Python to allocate memory only for the specified
Python is a popular programming language for multiple reasons, some of which include:
1. Simplicity: Python is easy to learn and read, making it a number one choice for
3. Large community: Python has a large and active community of developers who
contribute to its development and offer support to new users. This community has
24
created a vast array of libraries and frameworks that make development faster and
easier.
freely available and can be modified and distributed by anyone. This has led to the
creation of many useful libraries and frameworks that have made Python even
more popular.
5. Scalability: Python can be used to build both small and large-scale applications.
Its scalability makes it an attractive choice for startups and large organizations
alike.
These are just a few of the lesser-known features of Python as a language. Python is a
powerful and flexible language that offers many more features and capabilities that can help
developers write efficient, maintainable, and scalable code with ease and efficiency.
are stored to be used later. Similarly, in the programming world, a library is a collection of
precompiled codes that can be used later on in a program for some specific well-defined
A Python library is a collection of related modules. It contains bundles of code that can
convenient for the programmer. As we don’t need to write the same code again and again for
25
different programs. Python libraries play a very vital role in fields of Machine Learning, Data
that we can use in a program for specific operations. We use libraries so that we don’t need to
write the code again in our program that is already available. But how it works. Actually, in
the MS Windows environment, the library files have a DLL extension (Dynamic Load
Libraries). When we link a library with our program and run that program, the linker
automatically searches for that library. It extracts the functionalities of that library and
interprets the program accordingly. That’s how we use the methods of a library in our
program. We will see further, how we bring in the libraries in our Python programs.
The Python Standard Library contains the exact syntax, semantics, and tokens of
Python. It contains built-in modules that provide access to basic system functionality like I/O
and some other core modules. Most of the Python Libraries are written in the C programming
language. The Python standard library consists of more than 200 core modules. All these work
together to make Python a high-level programming language. Python Standard Library plays a
very important role. Without it, the programmers can’t have access to the functionalities of
Python. But other than this, there are several other libraries in Python that make a
programmer’s life easier. Let’s have a look at some of the commonly used libraries:
5.5.1 TensorFlow: This library was developed by Google in collaboration with the Brain
Team. It is an open-source library used for high-level computations. It is also used in machine
26
learning and deep learning algorithms. It contains a large number of tensor operations.
Researchers also use this Python library to solve complex computations in Mathematics and
Physics.
5.5.2 Matplotlib: This library is responsible for plotting numerical data. And that’s why it is
used in data analysis. It is also an open-source library and plots high-defined figures like pie
5.5.3 Pandas: Pandas are an important library for data scientists. It is an open-source machine
learning library that provides flexible high-level data structures and a variety of analysis tools.
It eases data analysis, data manipulation, and cleaning of data. Pandas support operations like
Aggregations, etc.
5.5.4 Numpy: The name “Numpy” stands for “Numerical Python”. It is the commonly used
library. It is a popular machine learning library that supports large matrices and multi-
dimensional data. It consists of in-built mathematical functions for easy computations. Even
libraries like TensorFlow use Numpy internally to perform several operations on tensors.
5.5.5 SciPy: The name “SciPy” stands for “Scientific Python”. It is an open-source library
used for high-level scientific computations. This library is built over an extension of Numpy.
It works with Numpy to handle complex computations. While Numpy allows sorting and
indexing of array data, the numerical data code is stored in SciPy. It is also widely used by
27
5.5.6 Scrapy: It is an open-source library that is used for extracting data from websites. It
provides very fast web crawling and high-level screen scraping. It can also be used for data
5.5.7 Scikit-learn: It is a famous Python library to work with complex data. Scikit-learn is an
open-source library that supports machine learning. It supports variously supervised and
unsupervised algorithms like linear regression, classification, clustering, etc. This library
5.5.8 PyGame: This library provides an easy interface to the Standard Directmedia Library
(SDL) platform-independent graphics, audio, and input libraries. It is used for developing
video games using computer graphics and audio libraries along with Python programming
language.
5.5.9 PyTorch:PyTorch is the largest machine learning library that optimizes tensor
computations. It has rich APIs to perform tensor computations with strong GPU acceleration.
5.5.10 PyBrain: The name “PyBrain” stands for Python Based Reinforcement Learning,
Artificial Intelligence, and Neural Networks library. It is an open-source library built for
beginners in the field of Machine Learning. It provides fast and easy-to-use algorithms for
machine learning tasks. It is so flexible and easily understandable and that’s why is really
There are many more libraries in Python. We can use a suitable library for our purposes.
28
As we write large-size programs in Python, we want to maintain the code’s
modularity. For the easy maintenance of the code, we split the code into different parts and we
can use that code later ever we need it. In Python, modules play that part. Instead of using the
same code in different programs and making the code complex, we define mostly used
functions in modules and we can just simply import them in a program wherever there is a
requirement. We don’t need to write that code but still, we can use its functionality by
importing its module. Multiple interrelated modules are stored in a library. And whenever we
need to use a module, we import it from its library. In Python, it’s a very simple job to do due
Guido van Rossum began working on Python in the late 1980s as a successor to
the ABC programming language and first released it in 1991 as Python 0.9.0. Python 2.0 was
released in 2000. Python 3.0, released in 2008, was a major revision not
completely backward-compatible with earlier versions. Python 2.7.18, released in 2020, was
Python was conceived in the late 1980s by Guido van Rossum at Centrum
language, which was inspired by SETL, capable of exception handling and interfacing with
the Amoeba operating system. Its implementation began in December 1989. Van Rossum
shouldered sole responsibility for the project, as the lead developer, until 12 July 2018, when
dictator for life", a title the Python community bestowed upon him to reflect his long-term
29
commitment as the project's chief decision-maker. In January 2019, active Python core
Python 2.0 was released on 16 October 2000, with many major new features such
features backported to Python 2.6.x and 2.7.x. Releases of Python 3 include the 2to3 utility,
Python 2.7's end-of-life was initially set for 2015, then postponed to 2020 out of
concern that a large body of existing code could not easily be forward-ported to Python 3. No
further security patches or other improvements will be released for it. Currently only 3.7 and
later are supported. In 2021, Python 3.9.2 and 3.8.8 were expedited as all versions of Python
(including 2.7) had security issues leading to possible remote code execution and web cache
poisoning.
In 2022, Python 3.10.4 and 3.9.12 were expedited and 3.8.13, and 3.7.13, because of
many security issues. When Python 3.9.13 was released in May 2022, it was announced that
the 3.9 series (joining the older series 3.8 and 3.7) would only receive security fixes in the
future. On September 7, 2022, four new releases were made due to a potential denial-of-
service attack: 3.10.7, 3.9.14, 3.8.14, and 3.7.14. As of November 2022, Python 3.11.0 is the
current stable release. Notable changes from 3.10 include increased program execution speed
30
Python is a multi-paradigm programming language. Object-oriented
programming and structured programming are fully supported, and many of their features
Python uses dynamic typing and a combination of reference counting and a cycle-
detecting garbage collector for memory management. It uses dynamic name resolution (late
binding), which binds method and variable names during program execution.
Its design offers some support for functional programming in the Lisp tradition. The
standard library has two modules (itertools and functools) that implement functional tools
Its core philosophy is summarized in the document The Zen of Python (PEP 20),
Readability counts.
Rather than building all of its functionality into its core, Python was designed to be
highly extensible via modules. This compact modularity has made it particularly popular as a
31
small core language with a large standard library and easily extensible interpreter stemmed
from his frustrations with ABC, which espoused the opposite approach.
Python strives for a simpler, less-cluttered syntax and grammar while giving
developers a choice in their coding methodology. In contrast to Perl's "there is more than one
way to do it" motto, Python embraces a "there should be one—and preferably only one—
obvious way to do it" philosophy. Alex Martelli, a Fellow at the Python Software
Foundation and Python book author, wrote: "To describe something as 'clever'
Python's developers strive to avoid premature optimization and reject patches to non-
critical parts of the CPython reference implementation that would offer marginal increases in
speed at the cost of clarity. When speed is important, a Python programmer can move time-
critical functions to extension modules written in languages such as C; or use PyPy, a just-in-
time compiler. Cython is also available, which translates a Python script into C and makes
Python's developers aim for it to be fun to use. This is reflected in its name—a tribute
to the British comedy group Monty Pythonand in occasionally playful approaches to tutorials
and reference materials, such as the use of the terms "spam" and "eggs" (a reference to a
Monty Python sketch) in examples, instead of the often-used "foo" and "bar".
A common neologism in the Python community is pythonic, which has a wide range of
meanings related to program style. "Pythonic" code may use Python idioms well, be natural or
show fluency in the language, or conform with Python's minimalist philosophy and emphasis
on readability. Code that is difficult to understand or reads like a rough transcription from
32
5.8 SYNTAX AND SEMANTICS
and often uses English keywords where other languages use punctuation. Unlike many other
languages, it does not use curly brackets to delimit blocks, and semicolons after statements are
allowed but rarely used. It has fewer syntactic exceptions and special cases than C or Pascal.
indentation signifies the end of the current block. Thus, the program's visual structure
accurately represents its semantic structure. This feature is sometimes termed the off-side rule.
Some other languages use indentation this way; but in most, indentation has no semantic
The for statement, which iterates over an iterable object, capturing each element to a
The while statement, which executes a block of code as long as its condition is true
The try statement, which allows exceptions raised in its attached code block to be
caught and handled by except clauses (or new syntax except* in Python 3.11 for
33
exception groups[85]); it also ensures that clean-up code in a finally block is always run
The raise statement, used to raise a specified exception or re-raise a caught exception
The class statement, which executes a block of code and attaches its local namespace
The with statement, which encloses a code block within a context manager (for
example, acquiring a lock before it is run, then releasing the lock; or opening and closing
The continue statement, which skips the rest of the current iteration and continues with
the next
The del statement, which removes a variable—deleting the reference from the name to
the value, and producing an error if the variable is referred to before it is redefined
The pass statement, serving as a NOP, syntactically needed to create an empty code
block
The assert statement, used in debugging to check for conditions that should apply
The yield statement, which returns a value from a generator function (and also an
The import and from statements, used to import modules whose functions or variables
34
The assignment statement (=) binds a name as a reference to a separate, dynamically
allocated object. Variables may subsequently be rebound at any time to any object. In Python,
a variable name is a generic reference holder without a fixed data type; however, it always
refers to some object with a type. This is called dynamic typing—in contrast to statically-
typed languages, where each variable may contain only a value of a certain type.
Python does not support tail call optimization or first-class continuations, and, according
to Van Rossum, it never will. However, better support for coroutine-like functionality is
provided by extending Python's generators. Before 2.5, generators were lazy iterators; data
was passed unidirectionally out of the generator. From Python 2.5 on, it is possible to pass
data back into a generator function; and from version 3.3, it can be passed through multiple
stack levels.
5.9 DEVELOPMENT
Proposal (PEP) process, the primary mechanism for proposing major new features, collecting
community input on issues, and documenting Python design decisions. Python coding style is
covered in PEP 8 Outstanding PEPs are reviewed and commented on by the Python
reference implementation. The mailing list python-dev is the primary forum for the language's
development. Specific issues were originally discussed in the Roundup bug tracker hosted at
by the foundation. In 2022, all issues and discussions were migrated to GitHub. Development
originally took place on a self-hosted source-code repository running Mercurial, until Python
35
CPython's public releases come in three types, distinguished by which part of the
manually ported. The first part of the version number is incremented. These releases
happen infrequently—version 3.0 was released 8 years after 2.0. According to Guido
van Rossum, a version 4.0 is very unlikely to ever happen. Major or "feature" releases
are largely compatible with the previous version but introduce new features. The second
part of the version number is incremented. Starting with Python 3.9, these releases are
expected to happen annually. Each major version is supported by bug fixes for several
Bugfix releases, which introduce no new features, occur about every 3 months and are
made when a sufficient number of bugs have been fixed upstream since the last release.
Security vulnerabilities are also patched in these releases. The third and final part of the
Many alpha, beta, and release-candidates are also released as previews and for testing
before final releases. Although there is a rough schedule for each release, they are often
delayed if the code is not ready. Python's development team monitors the state of the code by
The major academic conference on Python is PyCon. There are also special Python
Python 3.10 deprecated wstr (to be removed in Python 3.12; meaning Python
extensions need to be modified by then), and added pattern matching to the language.
36
5.9.1 API documentation generators
Tools that can generate documentation for Python API include pydoc (available as part
of the standard library), Sphinx, Pdoc and its forks, Doxygen and Graphviz, among others.
5.9.2 Naming
Python's name is derived from the British comedy group Monty Python, whom Python
creator Guido van Rossum enjoyed while developing the language. Monty Python references
appear frequently in Python code and culture; for example, the metasyntactic variables often
used in Python literature are spam and eggs instead of the traditional foo and bar. The official
Python documentation also contains various references to Monty Python routines. The
prefix Py- is used to show that something is related to Python. Examples of the use of this
Python (commonly used to create games); PyQt and PyGTK, which bind Qt and GTK to
PopularitSince 2003, Python has consistently ranked in the top ten most popular
December 2022 it was the most popular language (ahead of C, C++, and Java). It was selected
Programming Language of the Year (for "the highest rise in ratings in a year") in 2007, 2010,
2018, and 2020 (the only language to have done so four times as of 202).An empirical study
found that scripting languages, such as Python, are more productive than conventional
languages, such as C and Java, for programming problems involving string manipulation and
search in a dictionary.
5.10 OPEN CV
37
OpenCV (Open Source Computer Vision Library) is an open source computer vision
and machine learning software library. OpenCV was built to provide a common infrastructure
for computer vision applications and to accelerate the use of machine perception in the
commercial products. Being an Apache 2 licensed product, OpenCV makes it easy for
The library has more than 2500 optimized algorithms, which includes a comprehensive
set of both classic and state-of-the-art computer vision and machine learning algorithms.
These algorithms can be used to detect and recognize faces, identify objects, classify human
actions in videos, track camera movements, track moving objects, extract 3D models of
objects, produce 3D point clouds from stereo cameras, stitch images together to produce a
high resolution image of an entire scene, find similar images from an image database, remove
red eyes from images taken using flash, follow eye movements, recognize scenery and
establish markers to overlay it with augmented reality, etc. OpenCV has more than 47
million. The library is used extensively in companies, research groups and by governmental
bodies
Along with well-established companies like Google, Yahoo, Microsoft, Intel, IBM,
Sony, Honda, Toyota that employ the library, there are many startups such as Applied Minds,
VideoSurf, and Zeitera, that make extensive use of OpenCV. OpenCV’s deployed uses span
the range from stitching streetview images together, detecting intrusions in surveillance video
in Israel, monitoring mine equipment in China, helping robots navigate and pick up objects at
38
interactive art in Spain and New York, checking runways for debris in Turkey, inspecting
labels on products in factories around the world on to rapid face detection in Japan.
It has C++, Python, Java and MATLAB interfaces and supports Windows, Linux,
Android and Mac OS. OpenCV leans mostly towards real-time vision applications and takes
interfaces are being actively developed right now. There are over 500 algorithms and about 10
times as many functions that compose or support those algorithms. OpenCV is written
natively in C++ and has a templated interface that works seamlessly with STL containers.
This module covers the basic data structures such as Scalar, Point, Range, etc., that are
used to build OpenCV applications. In addition to these, it also includes the multidimensional
array Mat, which is used to store the images. In the Java library of OpenCV, this module is
This module covers various image processing operations such as image filtering,
geometrical image transformations, color space conversion, histograms, etc. In the Java library
5.11.3 Video
39
This module covers the video analysis concepts such as motion estimation,
background subtraction, and object tracking. In the Java library of OpenCV, this module is
This module explains the video capturing and video codecs using OpenCV library. In
the Java library of OpenCV, this module is included as a package with the name
org.opencv.videoio.
5.11.5 calib3d
single and stereo camera calibration, object pose estimation, stereo correspondence and
elements of3D reconstruction. In the Java library of OpenCV, this module is included as a
5.11.6 features2d
This module includes the concepts of feature detection and description. In the Java
org.opencv.features2d.
5.11.7 Objdetect
This module includes the detection of objects and instances of the predefined classes
such as faces, eyes, mugs, people, cars, etc. In the Java library of OpenCV, this module is
40
5.11.8 Highgui
OpenCV, the features of this module is included in two different packages namely,
5.12 PILLOW
Digital Image processing means processing the image digitally with the help of a
computer. Using image processing we can perform operations like enhancing the image,
blurring the image, extracting text from images, and many more operations. There are various
ways to process images digitally. Here we will discuss the Pillow module of Python.
Python Pillow is built on the top of PIL (Python Image Library) and is considered as the
fork for the same as PIL has been discontinued from 2011.
Pillow supports many image file formats including BMP, PNG, JPEG, and TIFF. The
library encourages adding support for newer formats in the library by creating new file
decoders.
The Pillow module provides the open() and show() function to read and display the
image respectively. For displaying the image Pillow first converts the image to a .png format
(on Windows OS) and stores it in a temporary buffer and then displays it. Therefore, due to
the conversion of the image format to .png some properties of the original image file format
might be lost (like animation). Therefore, it is advised to use this method only for test
purposes.
41
5.13 TENSORFLOW
comprehensive, flexible ecosystem of tools, libraries, and community resources that lets
researchers push the state-of-the-art in ML, and gives developers the ability to easily build and
TensorFlow provides a collection of workflows with intuitive, high-level APIs for both
beginners and experts to create machine learning models in numerous languages. Developers
have the option to deploy models on a number of platforms such as on servers, in the cloud,
on mobile and edge devices, in browsers, and on many other JavaScript platforms. This
enables developers to go from model building and training to deployment much more easily.
Build and train ML models easily using intuitive high-level APIs like Keras with eager
execution, which makes for immediate model iteration and easy debugging.
Easily train and deploy models in the cloud, on-prem, in the browser, or on-device no
A simple and flexible architecture to take new ideas from concept to code, to state-of-
42
TensorFlow was originally developed by researchers and engineers working on the
Google Brain Team within Google’s Machine Intelligence research organization for
the purposes of conducting machine learning and deep neural networks research, but
well! Let us first try to understand what the word TensorFlow actually
Edges in the graph represent the multidimensional data arrays (called tensors)
communicated between them. (Please note that tensor is the central unit of data in
TensorFlow).
5.14 TORCH
Deep Learning is a branch of Machine Learning where algorithms are written which
mimic the functioning of a human brain. The most commonly used libraries in deep learning
are Tensorflow and PyTorch. As there are various deep learning frameworks available, one
might wonder when to use PyTorch. Here are reasons why one might prefer using Pytorch
Pytorch is an open-source deep learning framework available with a Python and C++
interface. Pytorch resides inside the torch module. In PyTorch, the data that has to be
43
CHAPTER 6
SYSTEM TESTING
Software testing is a critical element of software quality assurance and represents the
ultimate review of software specification, design and coding. The increasing visibility of
software as a system element and the attendant “costs” associated with a software failure are
motivating forces for conference management system project well planned, thorough testing.
organization to expend 40 percent of total project effort on testing. Hence the importance of
software testing and its implications with respect to software quality can not be
overemphasized. Different types of testing have been carried out for conference management
system project this system, and they are briefly explained below.
Unit testing involves the design of test cases that validate that the internal program logic
is functioning properly, and that program inputs produce valid outputs. All decision branches
and internal code flow should be validated. It is the testing of individual software units of the
application .it is done after the completion of an individual unit before integration.
44
This is a structural testing, that relies on knowledge of its construction and is invasive.
Unit tests perform basic tests at component level and test a specific business process,
application, and/or system configuration. Unit tests ensure that each unique path of a business
process performs accurately to the documented specifications and contains clearly defined
they actually run as one program. Testing is event driven and is more concerned with the
basic outcome of screens or fields. Integration tests demonstrate that although the components
components is correct and consistent. Integration testing is specifically aimed at exposing the
Tests were performed to find conformity with the requirements. Plans and procedures
were designed to ensure that all functional requirements are satisfied. The software was alpha-
tested there are two goals in preparing test plans. Firstly, a properly detailed test plan
demonstrates that the program specifications are understood completely. Secondly, the test
plan is used during program testing to prove the correctness of the program.
45
CHAPTER 7
CONCLUSION
the viewpoint of cost and implementation. This is handy way because sensor data is acquired
using a smartphone everybody has nowadays. To make the implementation easier, we utilized
Inception V3 and Transfer Learning which gives us a very flexible way for application.
Interesting thing about this research is that general knowledge works for a specific domain
problem. That is, the knowledge acquired in Inception V3 to recognize common objects
46
CHAPTER 8
REFERENCES
[2.] Bad roads killed over 10k people in 2015; 3,416 deaths due to potholes.
https://timesofindia. indiatimes.com/india/Bad-roads-killed-over-10k-people-in-2015-3416-
deaths-due-to-potholes/articleshow/53482615.cms. (2015)
[5.] L. Vogel, C. J. Bester : A Relationship between accident types and causes. (1999)
Automatic Detection and Notification of Potholes and Humps on Roads to Aid Drivers.
visualization of potholes using the Microsoft Kinect sensor. Proc.16th Int. IEEE Conf.
[8.] J. Lin, Y. Liu : Potholes detection based on SVM in the pavement distress
image. Proc. 9th Int. Symp.Distrib.Comput. Appl. Bus. Eng. Sci., pp. 544—547. (2010)
47
CHAPTER 9
SOURCE CODE
import cv2 as cv
import time
importgeocoder
importos
class_name = []
net1.setPreferableBackend(cv.dnn.DNN_BACKEND_CUDA)
net1.setPreferableTarget(cv.dnn.DNN_TARGET_CUDA_FP16)
model1 = cv.dnn_DetectionModel(net1)
# defining the video source (0 for camera or file name for video)
width = cap.get(3)
height = cap.get(4)
result = cv.VideoWriter('result.avi',
48
cv.VideoWriter_fourcc(*'MJPG'),
g = geocoder.ip('me')
result_path = "pothole_coordinates"
starting_time = time.time()
Conf_threshold = 0.5
NMS_threshold = 0.4
frame_counter = 0
i=0
b=0
# detection loop
while True:
frame_counter += 1
if ret == False:
break
label = "pothole"
x, y, w, h = box
49
recarea = w * h
# drawing detection boxes on frame for detected potholes and saving coordinates txt and
photo
cv.putText(frame, "%" + str(round(scores[0] * 100, 2)) + " " + label, (box[0], box[1] - 10),
if (i == 0):
f.write(str(g.latlng))
i=i+1
if (i != 0):
f.write(str(g.latlng))
b = time.time()
i=i+1
50
cv.FONT_HERSHEY_COMPLEX, 0.7, (0, 255, 0), 2)
cv.imshow('frame', frame)
result.write(frame)
key = cv.waitKey(1)
if key == ord('q'):
break
# end
cap.release()
result.release()
cv.destroyAllWindows()
51
OUTPUT SCREEN:
52