Ashimamehta
3 min readJul 29, 2020

Problem Statement :

Create a project design to solve the real use case , using either transfer learning example existing Mask-RCNN , RNN , etc. to solve any real case problems or new problems .

Necessary Requirements :

▪︎Make your own custom dataset using supervisely .

▪︎Either create a new model or using existing model as transfer learning.

▪︎Launch the training on AWS cloud .

Here , I have created a machine learning model using supervisely to detect whether a person is wearing a face mask or not.

So, Let’s get started!!

*What is Mask-RCNN?

Mask-RCNN is a deep neural network aimed to solve instance segmentation problem in machine learning or computer vision. In other words, it can separate different objects in a image or a video. You give it a image, it gives you the object bounding boxes, classes and masks.

There are two stages of Mask RCNN.

•It generates proposals about the regions where there might be an object based on the input image.

•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.

Mask RCNN has been the new state of art in terms of instance segmentation.

*What is supervisely?

Supervisely is a powerful platform for computer vision development, where individual researchers and large teams can annotate and experiment with datasets and neural networks.

Supervisely can :-

•Label images, videos, 3D point clouds, volumetric slices and other data in the best labeling tool.

•Manage and track annotation workflow at scale with teams, workspaces, roles and labeling jobs.

•Train and apply Neural Networks on your data — from our Model Zoo or your custom ones.

•Explore our data and automate common tasks with integrated Python Notebooks and Scripts.

Now let’s begin with the procedure.

Step 1 : Login to supervisely. After login , create your own workspace.

Step 2 : Data preprocessing

Firstly , we have to download dataset, I have downloaded dataset from kaggle. After downloading data we have to convert images to grayscale and size (100*100). Then apply them to neural network . Once the dataset is completely uploaded we begin with our next step .

Step 3 : Annotation

After uploading , annotate the images . Annotation is done for all the images. It is important as through annotation the model gets to know which object is to be detected.

Polygon object selector is used for this purpose .

Step 4: Data Augmentation

To train the model large dataset is required . So , we increase the dataset using data augmentation. It actually enables the users to increase the diversity in data without collecting new data .

Some of data augmentation techniques are :

Cropping , flipping , etc.

Then we use

Run DTL > From scratch

Step 5 : Create own agent to train the model .

Supervisely does not provide us an agent for training the model .

So , we go to cluster tab to add agent .

Then in order to get resources required by agent we use AWS cloud .

•Create AWS account.

•Choose an instance type and following the further steps as the account setup is complete , connect to the instance via ssh and run command given by supervisely.

Now as agent is running , we train our neural network.

Step 6 : Training

In supervisely, go to neural networks tab . Then select add then select Mask-RCNN and proceed to train .

Step 7 : Testing

On testing we see the following results.