/Pothole-Detection-With-Mask-R-CNN

This repository contains the project from the article "Pothole Detection with Mask RCNN".

Primary LanguageJupyter Notebook

Pothole-Detection-With-Mask-R-CNN

TensorFlow 1.13

This repository contains the project from the article "Pothole Detection with Mask RCNN". You can find the article on my personal website or medium. You can find the detailed tutorial to this project in those blog articles.

Note: The tensorflow version used for this project is 1.15.2.

Installation

  1. Clone the entire repository into your local machine.
  2. Clone the contents of the tensorflow models folder from Github and place all the contents in the models folder.
  3.  C:\> git clone https://github.com/tensorflow/models.git
    
  4. Place all the contents inside models from this repository inside models/research/object_detection folder.
  5. Download the training configuration file from the Tensorflow Model Zoo. We are going to be using "mask_rcnn_inception_v2_coco" because of it's speed compared to the others. Download it and place the extracted file also inside models/research/object_detection folder
  6. Open Anaconda Command Prompt and Setup a new environment
  7.  C:\> conda create -n pothole pip python=3.6
    
  8. Activate the environment and upgrade pip
  9. C:\> activate pothole
    (pothole) C:\>python -m pip install --upgrade pip
    
  10. All other requirements can be installed using requirements.txt
  11.  (pothole) C:\>pip install -r requirements.txt
    
  12. Replace "YOURPATH" below and Set The Python Path Location to where you have place the tensorflow models folder.
  13. (pothole) C:\>set PYTHONPATH=YOURPATH\models;YOURPATH\models\research;D:\Projects\Pothole\MaskRCNN\models\research\slim
    
  14. Install the coco api library
  15.  (pothole) C:\>  pip install git+https://github.com/philferriere/cocoapi.git#subdirectory=PythonAPI
    
  16. After all the package installations has been done navigate to the directory where the project has been downloaded and run "app.py":
  17. (pothole) C:\> python app.py
    

Results

  1. After running the above command you should get a screen that looks like this.

  2. Copy the url right after Running on and paste it in your browser. After selecting an image you should get this output shared below.
  3. Final Result Ouput: