Deep Learning with supervise.ly and cloud computing
Task 6:-
Create a project designed to solve the real use case, using either transfer learning example existing Mask-RCNN, VGG16, etc. or creating new model of Mask-RCNN, GANs, RNN, etc. to solve any real case problems or new problems.
Pipeline :
1. Make your own custom dataset using supervisely
2. Either create a new model or using existing model with transfer learning
3. Launch the training on aws cloud / gcp clould with GPU instance support
Step 1:
Register on supervisely and create your own workspace and upload custom image dataset onto the created workspace.
Step 2 : Import data
Step 3: Annotate the images
Step 4 : Data Augementation
Supervisely has special language named DTL that allows to fully automate data manipulation and augmentation i.e mutiple number of images in the dataset by flipping(horizontal and vertical), resize, rotat and much more.
This code is defined in JSON format.
DTL Code
[
{
"dst": "$sample",
"src": [
"image annotate/Pothole Detection"
],
"action": "data",
"settings": {
"classes_mapping": "default"
}
},
{
"dst": "$fv",
"src": [
"$sample"
],
"action": "flip",
"settings": {
"axis": "vertical"
}
},
{
"dst": "$fv",
"src": [
"$sample"
],
"action": "flip",
"settings": {
"axis": "horizontal"
}
},
{
"dst": "$fv",
"src": [
"$sample"
],
"action": "rotate",
"settings": {
"black_regions": {
"mode": "crop"
},
"rotate_angles": {
"max_degrees": 45,
"min_degrees": 45
}
}
},
{
"dst": "$fv",
"src": [
"$sample"
],
"action": "rotate",
"settings": {
"black_regions": {
"mode": "crop"
},
"rotate_angles": {
"max_degrees": 60,
"min_degrees": 60
}
}
},
{
"dst": "$data3",
"src": [
"$sample2"
],
"action": "resize",
"settings": {
"width": 256,
"height": 256,
"aspect_ratio": {
"keep": false
}
}
},
{
"dst": "$sample2",
"src": [
"$fv"
],
"action": "multiply",
"settings": {
"multiply": 3
}
},
{
"dst": [
"$totrain",
"$toval"
],
"src": [
"$data3"
],
"action": "if",
"settings": {
"condition": {
"probability": 0.9
}
}
},
{
"dst": "$train",
"src": [
"$totrain"
],
"action": "tag",
"settings": {
"tag": "train",
"action": "add"
}
},
{
"dst": "$val",
"src": [
"$toval"
],
"action": "tag",
"settings": {
"tag": "val",
"action": "add"
}
},
{
"dst": "image annotate-instance-segmentation",
"src": [
"$train",
"$val"
],
"action": "supervisely",
"settings": {}
}
]
Step 5 : Add model to train on the dataset
We have to use your own agent
Step 6 : Using AWS instance with GPU for agent
We will be using the p2.xlarge nstance type which has 4 CPU and 16 gb Ram with GPU
Now run the code provide by supervisely
Once the agent is ready then train the model save it and test it.
Input image
Output Image
Commendable!