Alt text

Smart (Ai) Pothole Detector (Powered by "Tensorflow/TensorRT" on "Google Colab" and or "Jetson Nano" via a Convolutional Artificial Neural Network)

Alt text

Author

Jordan Bennett (Website).

Thanks Google, TensorRt creators, thanks jhasuman, for his desktop-version yolo-v2 based pothole detector.

  • This project by Jordan essentially converts jhasuman's neural network based desktop pothole detector above (fp32 aka single precision floating point/32 bits), to jetson nano neural network based pothole detector (fp16 half precision floating point 16 bits). (Purpose of which is to add the jetson nano with the trained half precision pothole detector to my car, and perhaps offer to others for sale?)

Success

There were lots of head scratching moments, but the tensorRT/jetson nano-mini computer version works fine, with seemingly similar accuracy to full Desktop version, as seen in Part B/4 Prediction.

Background

Why do this? There is a lot to say about how damaging surprise potholes can be while driving, but instead I will leave this nice quick to the point summary here: "Youtube/Hitting a pothole in a Tesla costs 2600 US dollars". This doesn't only happen to teslas either!

Alt text

That said, this Google Colab code is separate from the final product code I prepared for the jetson nano, although the nano code uses some of this colab code.

The jetson nano is a portable device, and hence this may be attached to a vehicle to do pothole detection, based on convolutional neural networks.

This project is featured by NVIDIA.

NVIDIA is a multi-billion dollar artificial intelligence involved company. Their technology has been central to a large degree of humanity's progress so far.

Either go to this quick NVIDIA Jestson link to my project, or go to NVIDIA's jetson project page, and scroll down until you see "Smart Pothole Detector" by Jordan. There you will also see many exciting/intriguing artificial intelligence/machine learning aligned projects.

Below is a screenshot of my pothole project on Nvidia's jetson project page:

Alt text

I. Instructions to run on Jetson nano neural computer

Please follow all instructions outlined in this separate Readme.md file, found in the "jetson-nano-source-code" folder of this repository.

II. Alternatively, Instructions/steps to run on Google Colab in your browser, if you don't have a jetson nano device.

The first 4 steps below were added by Jordan, and other steps added/modified to align with custom pothole model, based on this original blog/colab code.

Part A: Prequisites

  1. Connect to Jordan's Google drive to access saved neural network weights etc

  2. Backend

  3. Utils

  4. Frontend

Part B: TensorRT Conversion & Usage steps

  1. Frozen graph creation

  2. TensorRT graph conversion of frozen graph

  3. Load tensor rt graph

  4. Use loaded tensor rt graph to make predictions

Part C: Quick Test Order (I use the order below to run files to run pothole prediction test, based on how I organized all files in this google colab project and on my google drive)

Performance comparison, between Desktop and TensorRT/Nano version:

  1. See screenshot of fps count using TensorRT/Nano neural network pothole detector: https://drive.google.com/file/d/1LoWDsX75ehQ7HwcL1asz_EnRTZfHvrEs/view?usp=sharing

Alt text

  1. See screenshot of fps count using Desktop neural network pothole detector: https://drive.google.com/file/d/1xnp304UfWpSWSLvqLvGDNGTHPFyBh9FN/view?usp=sharing

Alt text

Future work:

  1. Find out how costly it would be to incoroprate a dark to bright neural network converter, to enable pothole detection at night.

  2. Live speedbump detection. (Especially those haphazzardly painted ones that are painted black like road)

  3. Other obstacle detection, that may be to thin for car sensors to pick up.

Youtube clip of Pothole TensorRT Ai in action on Google Colab

https://www.youtube.com/watch?v=MgsK3UrYEOI