Skip to content

Commit d74eb63

Browse files
Created Pothole Detection System
1 parent 7ec6d84 commit d74eb63

14 files changed

+109
-0
lines changed
+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
# The dataset
2+
The dataset used for training the pothole detection system can be found on Kaggle:
3+
https://www.kaggle.com/datasets/atulyakumar98/pothole-detection-dataset
4+
5+
## About the dataset
6+
The dataset consists of two folders:
7+
1. **Normal**: 352 photos of smooth streets from various angles;
8+
2. **Potholes**: 329 photos of street with potholes.
9+
10+
The images are all coloured and have different sizes.
29 KB
Loading
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
# Images
2+
This folder contains some images generated during the model training and analysis.
3+
4+
For explanantions, please, refer to the provided notebook in the Model folder.
27.3 KB
Loading
28.3 KB
Loading
185 KB
Loading
208 KB
Loading
320 KB
Loading
Loading
Loading
Loading
+88
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,88 @@
1+
# Pothole Detection System
2+
3+
## Goal
4+
5+
The goal of the project is creating a Deep Learning model that can be used to detect potholes in a street.
6+
7+
## Dataset
8+
The dataset used for training the pothole detection system can be found on Kaggle:
9+
https://www.kaggle.com/datasets/atulyakumar98/pothole-detection-dataset
10+
11+
## Description
12+
13+
Because of the dataset nature, the detection task is treated as a classification problem: the DL models are trained to classify photos of streets depending on whether they contain a pothole or not.
14+
15+
## What I had done
16+
The project involved the following steps:
17+
18+
1. **Data exploration**: understanding the dataset by visualizing some images and calculating class distribution.
19+
2. **Data preprocessing**: resizing the images to the same 150x150x3 size.
20+
3. **Data augmentation**: adding the flipped version of each image to the dataset to increase the training data.
21+
4. **Model creation and training**: Choice of three types of Deep Learning models and their training.
22+
5. **Model evaluation**: Evaluation of the trained models based on accuracy and AUC.
23+
24+
## Models used
25+
26+
The following models where used in the project:
27+
- **Artficial Neural Network**: Although ANNs aren't specificlly meant for tasks involving images, they can still perform well and be used as benchmarks to evaluate other models.
28+
- **Convolutional Neural Network**: CNNs are a type of deep neural network architecture designed for tasks such as image recognition, computer vision, and pattern recognition. They are highly effective in these domains due to their ability to automatically learn hierarchical representations of features from input data.
29+
- **InceptionV3**: InceptionV3 is a pre-trained CNN model designed for image classification and object recognition tasks. It was trained on the ImageNet dataset (14 million images). I have fine-tuned it for the potholes detection task.
30+
31+
## Libraries needed
32+
33+
The following libraries are required to run this project:
34+
- keras==2.13.1
35+
- matplotlib==3.7.4
36+
- numpy==1.24.3
37+
- tensorflow==2.13.0
38+
39+
## Visualization
40+
41+
Some of the dataset images:
42+
43+
<p align="left">
44+
<img src="../Images/dataset1.png" width="300" alt="Image 1">
45+
<img src="../Images/dataset2.png" width="300" alt="Image 2">
46+
<img src="../Images/dataset3.png" width="300" alt="Image 3">
47+
</p>
48+
49+
Results of data preprocessing and augmentation:
50+
51+
<p align="left">
52+
<img src="../Images/preprocessed1.png" width="400" alt="Image 1">
53+
<img src="../Images/preprocessed2.png" width="400" alt="Image 2">
54+
</p>
55+
56+
Training histories (ANN, CNN, InceptionV3):
57+
58+
<p align="left">
59+
<img src="../Images/ann_history.png" width="400" alt="Image 1">
60+
<img src="../Images/cnn_history.png" width="400" alt="Image 2">
61+
<img src="../Images/inception_history.png" width="400" alt="Image 3">
62+
</p>
63+
64+
Models' AUCs:
65+
66+
<p align="left">
67+
<img src="../Images/AUCs.png" width="400" alt="Image 1">
68+
</p>
69+
70+
71+
## Accuracies
72+
73+
| Model | Accuracy | AUC |
74+
| --------------|:---------------------:|:---------:|
75+
| ANN | 84.56% |0.904 |
76+
| CNN | 93.75% |0.976 |
77+
| InceptionV3 | 98.16% |0.998 |
78+
79+
80+
81+
## Conclusion
82+
83+
- Despite not being specifically designed for image analysis, the ANN model still manages to perform relatively well (85% accuracy) in this classification task.
84+
- The CNN architecture and ability to learn hierarchical representations of features allow it to outperfom the ANN model and achieve a 94% accuracy.
85+
- The particular architecture of InceptionV3 combined with its large-scale training on the ImageNet dataset makes the model capable of more accurate image analysis. Fine-tuning it thus results in the highest accuracy: 98%.
86+
87+
## Author
88+
This project was done by Mattia Ferrarini (https://github.com/MattiaFerrarini).

Pothole Detection System/Model/potholes-detection-system.ipynb

+1
Large diffs are not rendered by default.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
The following libraries are required to run this project:
2+
3+
1. keras==2.13.1
4+
2. matplotlib==3.7.4
5+
3. numpy==1.24.3
6+
4. tensorflow==2.13.0

0 commit comments

Comments
 (0)