Smart parking for future using Open CV and Deep learning AI
Sometimes ,it is very difficult to find parking to park vehicle.
what we can do ????
think ,think and Think..
we got an solution …Use deep learning to find where we can park our vehicle …
Lets, divide the smart parking problem into bit of sections.
- Get the Rough view of the Parking image and fix parking spot as they are continue to be remains constant.
- Generate the Training Data to train the model from parking images for classification of empty and occupied space
- Run the pre-trained Model on Training Data and obtain accuracy above 95%
- Save best model weights
- Predict empty or occupied parking on the given image
- Run prediction model on the video
Note: Dont forget to visit my github profile for the same project,where i uploaded all the files,in this blog i only shown the important code not all…Link:
1.Get the Rough view of the Parking image and fix parking spot as they are continue to be remains constant.
To,generate the fix parking spots ,we need to define the end co-ordinates of the parking lot
I wrote following code to generate parking spots…
given ,end coordinates of the parking lot
2.Generate the Training Data to train the model from parking images for classification of empty and occupied space
To ,generate the data i collect multiple parking images for an interval of time and then from that images i get the training data containing all individual image of parked and non parked vehicle
and then i classify that data into train and test and further empty and occupied
To generate the data i wrote the following code…
Note:Here we are making this problem as 2 class classification problem
3.Run the pre-trained Model on Training Data and obtain accuracy above 95%
Then ,after data augamentation i used pretrained Resnet-50 and VGG16 model on training data and run then model
plotted accuracy and loss curve
4.Save best model weights
save the best model weight and reuse for prediction
5.Predict empty or occupied parking on the given image
i also run code on video,
for further doubt you can visit my github profile,where i have uploaded all model script along with the trained model ipynb
Final result i get is,….
Akshay Bhor: Deep learning Engineer
an Data Scientist