Instance Segmentation Using Mask R CNN
Here I am going to perform instance segmentation of Cars using Mask R-CNN model. I will be using the Supervisely a Web UI for building different object detection and segmentation modles.
So lets begin by logging into sepervisely and creating a work space. I have created a workspace named as "mlops_work". You can name as per your own wish.
Now click on the workspace and in the project start importing the dataset. Supervisely is a tool that lets you upload dataset folder containing the images by simple drag and drop method.
Next comes the data preprocessing part which will also be done using supervisely. We need to segregate the required objects/instances using supervisely which is also known as annotation. To do that just click on the imported data folder in supervisely and it will let you be at the image annotation page. Now start annotating the images and for doing that I will use polygon from the left side pannel of supervisely.
Now we will ferform DTL which will expand your dataset and also tag the images with "train' and "val".
After DTL is done, go to neural networks at the left panel of supervisely and add Mask R-CNN (Keras+Tensorflow)_(COCO) from the availabe neural networks. Then comes the part of training the model but before that we need to add an agent to supervisely cluster at the Cluster page with required configuration. You will know more from the image below.
I am using Deep Learning AMI (Ubuntu 18.04)Versio 30.2 as an agent from amazon clouds but you can use whichever you want but having required configuration. The highlighted command will be used to connect the agent to supervisely.
Then go neural network again and click the train button. The process of training the model will start.
After training we will be testing the model on testing. So upload your testing dataset as done previously Remember that the testing data does not require to be annotated as it is for testing only so we will use it is. After uploading your data click the test button and begin the testing part. You will get the following output in your dataset.
We can also create the the model from different check points with diffent loss and choose the optimum one. We can also check the graph of the training process.
This is the overall workflow and for any query feel free to dm for the same.