Making Mask-RCNN model for this pandemic situation.

In this project I am making my own Mask-RCNN model for detecting the mask on people face that He/She wears the masks or not. As we all know in this pandemic situation this is very important to wear the mask for our safety as well as others safety also.

Here my project starts but first I would like to explain you something on Mask-RCNN..

What is Mask-RCNN?

There are two stages of Mask RCNN-

  1. It generates proposals about the regions where there might be an object based on the input image.
  2. It predicts the class of the object, refines the bounding box and generates a mask in pixel level of the object based on the first stage proposal.

FPN (Feature Pyramid Network):-

RPN (Region Proposal Network):-

Prerequisites for making this model:-

  1. Download your dataset for training the model. As I downloaded from kaggle.
  2. Account on AWS and know how to use it.

About Supervisely:-

With Supervisely you can:-

  1. Manage and track annotation workflow at scale with teams, workspaces, roles and labeling jobs.
  2. Train and apply Neural Networks on your data — from our Model Zoo or your custom ones.
  3. Explore your data and automate common tasks with integrated Python Notebooks and Scripts.

Now Here I started for creating the model.

First Login into your account in supervisely.

Then choose where you want to work-

Now import your dataset in supervisely.

Then go to your projects and you will that your dataset is their.

Here click on the option and click on Start annotation.

click on the image dataset uploaded and then you have to annotate or select the region where we can see mask in the image. We need to do this for all images. This is called annotation of image through which the model will come to know which object we need to detect. For this we will use polygon object selector.

Now after completing this click on the option and choose Run DTL and another option choose From Scratch.

Then go to clusters and you have to create your own cluster.

So it require a agent with Linux OS, Docker, CUDA GPU and NVIDIA Docker GPU. It also gives us the command to run on the agent machine so that it can connect.

Now to get those resources we can use AWS Cloud, even you see it gives an option of Ready AMI with AWS symbol. If you click it it will give all the specification to host the agent on AWS cloud but I will show a different way to do this on AWS itself.

First of all create a AWS account of free type. Then follow the steps below.

Make the region to be Mumbai.

Now, Wait for the confirmation mail regarding this case.

After you got the mail then start launching the Instance as I do.

Choose this ami.

Now, select your keys.

Now click on launch and go to Ec2 instance and you will see your instance is launched.

Now click on connect.

Open the CMD and navigate to downloads because there we have downloaded the key and run the command given in this pop up, you just have to run the ssh command nothing else.

Choose the option “yes”

Here you go inside the instance and go to root permission.

Now, run the command that is shown in supervisely cluster.

After that you will see that it starts.

Now go to supervisely and go to Neural networks tab and select Mask-RCNN and then press train.This will train the model and finally it will create the model.

The whole workflow of machine learning training will be:-

This model help the government to find the person without mask in this pandemic situation.

Thank You…