Tyre Pressure Detection using CNN

Photo by Nikolay Ivanov for Lobster on Dribbble

This Model uses Images of car’s tyre to predict whether the tyre is Full or Flat or if no tyre is detected.

The Dataset contains 3 classes — :

Full Tyre

It contains Images of car Tyres who have proper air pressure and hence they are considered full. Here is an example of how a full tyre looks -:

Full Tyre

Flat Tyre

These tyres don’t have enough air pressure so they are flat i.e. they need to be filled again and checked or else it may become the very reason of an accident. Here is an example of how a flat tyre looks -:

Flat Tyre

No- Tyre

These images represent the scenario when the image contains something else other than a tyre or it may not contain proper image of tyre. Here is an example of no- tyre class :-

No-Tyre

Here is a demonstration of how to build this model using Tensorflow and Keras using Python.

Importing Libraries

https://gist.github.com/tanmayymishra/6729a9d267df55828dcd861913127690

Loading the Dataset

https://gist.github.com/tanmayymishra/8aa7199f81e1a7876b06997fda2172c5

Preprocessing

https://gist.github.com/tanmayymishra/34d1b5ce29fa1b1529069488c7d7f510

Model Building

https://gist.github.com/tanmayymishra/54707aea535aa9c95a1ec48c602a6659

Model Fitting

https://gist.github.com/tanmayymishra/3d569221621a2672a81839f14ce335a2

Plotting Accuracy of Model

https://gist.github.com/tanmayymishra/dc72044add5f629a50a743bdb1d39306

Plotting Loss of Model

https://gist.github.com/tanmayymishra/c6c667f64a4e9293b9a2071ff8f247d4

Predictions

https://gist.github.com/tanmayymishra/7c386605c85c8f4708f39369f7762220

No Tyre
Full Tyre
Full Tyre

We can see that our Model is performing well which the Predictions are verifying also. Now we will save our Model.

Saving and deepCC

deepCC is a framework which converts the Deep Learning Models into an executable file which can be used in IOT devices like Arduino, MCU’s, etc.

https://gist.github.com/tanmayymishra/9d677cb11d10297966e51977dc0a388b

Here is the link for the Notebook — Click Here

Thank you for reading this article, have a great day!

Credit : Tanmay Mishra