Number Plate Detection With Supervise.ly
What is Supervisely?
There are many open-sourced implementations of state of the art neural network architectures. But deep learning models are very “data-hungry”.
“ Deep learning algorithms have many parameters that need to be tuned and therefore need a lot of data in order to come up with somewhat generalizable models. So, in that sense, having a lot of data is key to coming up with good training sets for those approaches.” Xavier Amatriain, VP of Engineering at Quora.
And it is not a secret that in most cases data scientist spends most of the time on training data preparation:
- Creating private datasets
- Merging their with several public datasets in different formats
- Adding various data augmentations
And while he does these, there is a high probability of making a lot of mistakes or doing something wrong during data preparation.
Supervisely solves these problems. It offers the best of simplicity and performance — it is the web-based framework that allows to import all the most famous public datasets, to create own datasets with integrated annotation tool, merge and export datasets to different formats with various number of augmentations and much more.
The first step is to register on Supervise.ly.
Create a Workspace.
Click on the Workspace to navigate to Projects.
Here, We can Upload the Image data we want to annotate.
I used images of rear view of car for Number plate detection.
Annotating the Images:
For Annotation, We have to annotate every image one by one.
Data preparation for training takes most of data scientists's time. In addition, there is a high probability of mistakes while performing such process. Supervisely solved this issue by designing a special language named DTL that allows to fully automate data manipulation: merge projects and datasets, make classes mapping, various augmentations of images and annotations, save to different formats and more.
We can add DTL plugin in Supervisely and use it to increase our prepared dataset.
To use DTL , navigate to Projects and click on the 3-dot menu. There you can see the option to run DTL. As we want to train our dataset in future, we will select "Create train set"
Here, DTL asks how we want to increase our dataset. Click on Start and Supervisely will start creating new dataset.
Till here, We have successfully increased and annotated our dataset.
Next, we have to train a new model on our own dataset. For this, Just navigate to Neural Networks and select "Add Neural Network"
Here, It gives us a library of pre-trained models. Each model here is a combination of model weights and neural network architecture also known as NN plugin.
Asoon as we Click on Train, Suervisely shows an error "No agents available". This is because we have to use our own machine to train the model.
Adding Our own Cluster to Supervisely:
To add our own Cluster, just navigate to Cluster and click on Add. Now we just have to run this command on our machine and supervisely will automatically do all the setup for us.
Note : The machine we are adding should have a GPU otherwise we will not be able to use Neural Nework
As i don't have GPU in my laptop, I used AWS instance as an agent.
If everything goes right, You can will your cluster status "Running"
Now, Lets again go to Neural Networks and train our dataset:
It asks for the agent that we just added.
We also have to select input project.
It asks for the name for output model. After that it shows the code configuration of Mask R-CNN that will be used to train the dataset. Click on run and it will start training the Dataset.
After the model is successfully trained, Lets test it :
Test Image
Output
We can download the trained model and further use it to test on other images.
We can further improve this project by Extracting text from the detected Plate. This problem can be solved using OCR(Optical Character Recognition) which can be helpful in extracting alphanumeric characters from cropped Number Plate images.
Note:
- By default, AWS doesn't allow everyone to create GPU instances, for this we have to request a limit increase using the Amazon EC2 console. You will get an e-mail as soon as your limit increase request gets approved.
Android Developer | 4+ Years | Kotlin, Java, Jetpack, MVVM, Firebase, REST APIs | Open to Work
4 年Great.
Software Engineer @ Rapyuta Robotics || NIT-B'2023
4 年Great work
DevOps Engineer @Fiftyfive Technologies
4 年Nice one ?? ...it will really save lot of time building rcnns
Web Development | RHEL8 | MLOps | DevOps | Python |
4 年well done bro