PHD_FYP
A web app for The Pot Hole Detection on images and open CV and TensorFlow.
The web app would include a way to upload the image that the user took of the pothole at certain location and our model would predict if there exist any pothole and then updates the database. So, that whenever Other person logs into the webpage, he will be notified that there is a pothole day by showing the marker over the location that the picture was taken.
By using this markers on the location one could easily find out that the road that they are taking Contains a pothole, so They can slow down the vehicle or if they really want to avoid such potholes and don’t, Make any damage to the vehicle, They could take another path which has the less potholes.
Testing custom images
extract the zip file into training_demo\ folder & then run
extract ’exported_models’ into training_demo\ folder. (be careful while extracting, it should not create ’exported_models’ folder 2 times)
install python-3.9.X ( prefer 3.9.12 ) go to the root folder of the project and run the command below (it is recommended to use a venv for testing the project)
Anaconda
install the anaconda to make the env creation easy Download Here!
setting up
open the Anaconda Command Prompt or Anaconda Powershell Prompt after installtion
Navigate to project dir
| |
Creating v-env to run project
| |
NOTE : POSSIBLE ERROR while running the app
The tensorflow usual throws an error as tf.gfile.GFile not found or tf has no attribute named gfile. check reslving techniques here in
simply , Replace tf.gfile.GFile to tf.io.gfile.GFile at line number 137
End User Product
Setup
the setup file is also included with requirements.txt, but I have wrote the script in such a way that it ensures all the dependencies are installed on FIRST TIME RUN , ALL AT ONCE and no more installing or configuring is required except for the mentioned above
Note : if one wants to delete entire database run python main.py, which deletes all the entries till now.
Web App
make sure you are in root directory i.e, PHD_FYP and extracted the zip file into training_demo\ so that the structure will be training_demo\exported-models\models\ (be careful since it might be the case that it extracts training_demo\exported-models\exported-models\models\ if it’s a windows OS)
| |
go to the web link it provides probably http://127.0.0.1:8080/ , or better open which flask provides dynamically
web app interface images
Running app

website walk through

Results - WEB app

Running app in mobile
website walk through in mobile
| Demo | Images |
|---|---|
![]() | ![]() |
![]() | ![]() |
Results and maps
| WEB app in mobile | MAPS view in mobile |
|---|---|
![]() | ![]() |
Running as a product for an image (CLI)
By running this python script it opens the Input image and the output image generated in separate window.
Note : Replace the <image_path> with the actual image path while running the Script.
| |
CLI app interface images
running cli app

Results - CLI

Running as a product for an image (GUI)
Select the image form the drop down and click Run.
| |
GUI app interface images
running gui app

Results - GUI


Build your custom app using our model
Yes, you can integrate pothole detection system into any custom app which is already written as an API in the file named as phd_api.py.
just import as
| |
The Results
the Resulting image will be saved in Dataset\Result folder
Demo
Result for an image





