Creation of Machine Learning Project Model without any coding
Today let’s understand the tool which is quite useful in cases where you are facing difficulties in building and training Machine Learning models or searching for an alternative to manual work of training, augmenting , annotating and creating the datasets.
Let’s understand the tool which makes the implementation of these manual work in an easier and faster manner and that too without prior experience in AI.
So let’s get started….
So, basically the tool I was emphasizing about is Supervise.ly which is a web platform which provides everything needed for building of Deep Learning solution.
Supervise.ly Workflow
Let’s understand the workflow of this tool by the pictorial representation of the same
Overview
In our demo, we are going to build a Brain Tumour Detection Model and the dataset used for the same is Kaggle’s Brain MRI Images for Brain Tumor Detection dataset, and out of which sampling of 25 MRI Scan of healthy patients is done and the other 25 is done from the patients of the same. Using Supervise.ly, we would built our own datasets from the given data and then a highly accurate model would be built from the same.
Upload Step :
First create an account in Supervise.ly, you can do so by clicking here.
After creating your account in Supervise.ly ,go to the Team, and under it use First Workspace or create a new one and use it
After setting up the Workspace , we need to import the dataset to be annotated, the Import page looks like this
Then , the folder containing containing the dataset could be uploaded or could be dragged and dropped to start the upload
After the above screen appears , click on “Start Import” to finish the process of uploading , after the process is finished , click on Tasks and this screen appears
Annotation Step :
Supervise.ly makes it easier to implement annotation by providing various plugin like polygon, line and many more for the same and to an extent that a person without any technical background could do it easily.
In our case , we annotate the white patches observed in MRI scan of Brain which is an indicator that a tumour is present.Tools are provided out of which , the tool used in this case is “Add Polygon”, further it could be tagged to make classification easier.
Augmentation Step :
After annotating our 50 image dataset ,next step is augmentation
Data Augmentation is the step that involves creation of new training data from existing training dataset. Supervise.ly makes it easier to perform by providing a JSON format language known as DTL , thereby reducing the manual work involved in the process
DTL is a special language 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.
JSON Code for Augmentation using Scratch
Note: This step only works if annotation has been performed successfully
Training Step :
After the Augmentation step has been performed successfully, next step is training of dataset created using Neural Network Models , Supervise.ly provides multiple option for the same and could be used as per user’s requirement , in our case , the model used is Faster R-CNN Inception ResNet v2 (COCO)
From Menu , Click on Neural Networks -> Add -> Plugin -> No Agents Available
The reason behind this is that Supervise.ly doesn’t provide GPU for Model Training and thereby needs to be provided by the user itself.There are two ways in which GPU could be obtained namely GPU in Local System or obtaining GPU using Cloud Services like AWS, GCP etc.
In case the GPU is available in the local system , then it’s enough , but if not , AWS could be used in this case
AWS Setup
After finishing with the registration in AWS Console
Click on Services -> EC2 -> Create an Instance -> Choose AMI -> Type
Note :
AMI : Deep Learning AMI containing Docker , GPU etc.
Storage : Minimum 100 GB
Instance Type : All P Instances
But to our surprise , it fails , Why ???
This kind of failure is not due to any logical error , but due to a constraint new users have i.e., they can’t use more than 1 vCPU and to use more than that , a support case for requesting a Limit Increase needs to be placed to the AWS Support Center.
After this , let us connect our Instance to the Agent from Supervise.ly and for that the instance needs to be accessed from Command Prompt and moving to the directory containing the key needed to launch the instance.
cd Downloads
ssh -l ec2-user -i <key.pem> <Your Instance's Public IP>
After connection has been established with the Instance, some commands needs to be run initially to avoid encountering any issue afterwards.
sudo yum update
sudo su - root
yum install docker
systemctl restart docker
So as to connect our own Agent i.e., Amazon Linux 2 Deep Learning AMI , first go to Clusters and then checkout Bring Your Own Agent, the screen it would show would look like this.
Copy the command specified to start Supervisely Agent to the instance connected via SSH and then the connection would be established.
After the connection has been established , go to the Neural Network , then click on the Neural Network Model required for training , then the following screen would appear
After this setup , if the steps has been properly followed till now , the training would start successfully
Quick Tip : After the required task has been accomplished , please do not forget to terminate the instance otherwise it would give you a big surprise by the end of the month!!!