DAY 81-100 DAYS MLCODE: Custom Object Detection and Segmentation

My Tech World

DAY 81-100 DAYS MLCODE: Custom Object Detection and Segmentation

January 30, 2019 100-Days-Of-ML-Code blog 0

In the previous blog, we discussed Object detection and segmentation using Mask R-CNN for live video, in this blog, we’ll try to implement Custom Object Detection and Segmentation in the image.

Custom Object Detection and Segmentation

In this blog, we will use the object which is not in COCO dataset and we’ll try to see how the Mask R-CNN works for the new class.

But before we start, one of the tough task is to prepare the test data. We need to prepare the annotation for our image. And we to prepare a json file in exact the same format as COCO.

I tried to prepare my won dataset using LabelMe. Since it was not easy to prepare the data, for learning purpose I have used the dataset prepared by this website. Our entire task id divided into following:

  • Prepare the annotation of the training image ( downloaded from this website.) in the json format ( exactly like COCO dataset)
  • Create a custom dataset from reading the JSON file from step 1
  • Prepare test and train data set
  • Configure the MASK R-CNN for training
  • Create Model and Load Trained Weights. Keep the model setting to run in training mode.
  • Training: First train only the heads of the network and then fine tune all .
  • Create a configuration for inference run
  • Create the model in inference mode and load the last trained weights.
  • Run inference for test image.

This is end of object detection and segmentation series. We’ll start the NLP from day 82. You can find the entire codes of today’s here.