{
  "id": 114942,
  "title": "Keras Mask-RCNN for Instance Segmentation 2019",
  "url": "/competitions/open-images-2019-instance-segmentation/discussion/114942",
  "author_name": "ZFTurbo",
  "post_date": "2019-10-30T07:05:56.420000",
  "votes": 43,
  "comment_count": 12,
  "views": 0,
  "content": "<p>I made a release of my Mask-RCNN code for Instance Segmentation task:</p>\n\n<p><a href=\"https://github.com/ZFTurbo/Keras-Mask-RCNN-for-Open-Images-2019-Instance-Segmentation\">https://github.com/ZFTurbo/Keras-Mask-RCNN-for-Open-Images-2019-Instance-Segmentation</a></p>\n\n<p>It wasn’t used in our best submit because I finished training too late. But it gives good result on LB, so I decided to release it. </p>\n\n<p><img src=\"https://raw.githubusercontent.com/ZFTurbo/Keras-Mask-RCNN-for-Open-Images-2019-Instance-Segmentation/master/img/mask_rcnn_prediction_example.jpg\" alt=\"\"></p>\n\n<p>Repository contains:</p>\n\n<ul>\n<li>Pre-trained Mask R-CNN models (ResNet50, ResNet101 and ResNet152 backbones)</li>\n<li>Example code to get predictions with these models for any set of images</li>\n<li>Code to train (continue training) model based on Keras Mask R-CNN and OID dataset</li>\n</ul>\n\n<p>I was able to get <strong>0.4670</strong> Public LB and <strong>0.4311</strong> Private LB using ensemble of these 3 models.</p>\n\n<p>There are 3 graphics with training process for each model. I changed parameters of training over some epochs (Freeze Backbone, ReduceLR, AdamAccumulate, different image sampling strategy). Fast growth of score are in places where I switched to uniform classes sampling. Also to speed up the ResNet101 training, I copied weights for decoder from trained Mask-RCNN with ResNet152 backbone. So ResNet101 got good score for much lower number of epochs.</p>\n\n<p><img src=\"https://storage.googleapis.com/kaggle-forum-message-attachments/661345/14368/ResNet50.png\" alt=\"\"></p>\n\n<p><img src=\"https://storage.googleapis.com/kaggle-forum-message-attachments/661345/14369/ResNet101.png\" alt=\"\"></p>\n\n<p><img src=\"https://storage.googleapis.com/kaggle-forum-message-attachments/661345/14370/ResNet152.png\" alt=\"\"></p>",
  "messages": [
    {
      "id": 661345,
      "postDate": "2019-10-30T07:05:56.420Z",
      "content": "<p>I made a release of my Mask-RCNN code for Instance Segmentation task:</p>\n\n<p><a href=\"https://github.com/ZFTurbo/Keras-Mask-RCNN-for-Open-Images-2019-Instance-Segmentation\">https://github.com/ZFTurbo/Keras-Mask-RCNN-for-Open-Images-2019-Instance-Segmentation</a></p>\n\n<p>It wasn’t used in our best submit because I finished training too late. But it gives good result on LB, so I decided to release it. </p>\n\n<p><img src=\"https://raw.githubusercontent.com/ZFTurbo/Keras-Mask-RCNN-for-Open-Images-2019-Instance-Segmentation/master/img/mask_rcnn_prediction_example.jpg\" alt=\"\"></p>\n\n<p>Repository contains:</p>\n\n<ul>\n<li>Pre-trained Mask R-CNN models (ResNet50, ResNet101 and ResNet152 backbones)</li>\n<li>Example code to get predictions with these models for any set of images</li>\n<li>Code to train (continue training) model based on Keras Mask R-CNN and OID dataset</li>\n</ul>\n\n<p>I was able to get <strong>0.4670</strong> Public LB and <strong>0.4311</strong> Private LB using ensemble of these 3 models.</p>\n\n<p>There are 3 graphics with training process for each model. I changed parameters of training over some epochs (Freeze Backbone, ReduceLR, AdamAccumulate, different image sampling strategy). Fast growth of score are in places where I switched to uniform classes sampling. Also to speed up the ResNet101 training, I copied weights for decoder from trained Mask-RCNN with ResNet152 backbone. So ResNet101 got good score for much lower number of epochs.</p>\n\n<p><img src=\"https://storage.googleapis.com/kaggle-forum-message-attachments/661345/14368/ResNet50.png\" alt=\"\"></p>\n\n<p><img src=\"https://storage.googleapis.com/kaggle-forum-message-attachments/661345/14369/ResNet101.png\" alt=\"\"></p>\n\n<p><img src=\"https://storage.googleapis.com/kaggle-forum-message-attachments/661345/14370/ResNet152.png\" alt=\"\"></p>",
      "rawMarkdown": "I made a release of my Mask-RCNN code for Instance Segmentation task:\n\nhttps://github.com/ZFTurbo/Keras-Mask-RCNN-for-Open-Images-2019-Instance-Segmentation\n\nIt wasn’t used in our best submit because I finished training too late. But it gives good result on LB, so I decided to release it. \n\n![](https://raw.githubusercontent.com/ZFTurbo/Keras-Mask-RCNN-for-Open-Images-2019-Instance-Segmentation/master/img/mask_rcnn_prediction_example.jpg)\n\nRepository contains:\n\n- Pre-trained Mask R-CNN models (ResNet50, ResNet101 and ResNet152 backbones)\n- Example code to get predictions with these models for any set of images\n- Code to train (continue training) model based on Keras Mask R-CNN and OID dataset\n\nI was able to get **0.4670** Public LB and **0.4311** Private LB using ensemble of these 3 models.\n\nThere are 3 graphics with training process for each model. I changed parameters of training over some epochs (Freeze Backbone, ReduceLR, AdamAccumulate, different image sampling strategy). Fast growth of score are in places where I switched to uniform classes sampling. Also to speed up the ResNet101 training, I copied weights for decoder from trained Mask-RCNN with ResNet152 backbone. So ResNet101 got good score for much lower number of epochs.\n\n![](https://storage.googleapis.com/kaggle-forum-message-attachments/661345/14368/ResNet50.png)\n\n![](https://storage.googleapis.com/kaggle-forum-message-attachments/661345/14369/ResNet101.png)\n\n![](https://storage.googleapis.com/kaggle-forum-message-attachments/661345/14370/ResNet152.png)",
      "votes": 43
    },
    {
      "id": 1069368,
      "postDate": "2020-11-04T11:08:29.220Z",
      "content": "<p><a href=\"https://www.kaggle.com/zfturbo\" target=\"_blank\">@zfturbo</a> , just wanted to know , what are the training size for the model (<a href=\"https://github.com/ZFTurbo/Keras-Mask-RCNN-for-Open-Images-2019-Instance-Segmentation\" target=\"_blank\">github</a>). </p>",
      "rawMarkdown": "@zfturbo , just wanted to know , what are the training size for the model ([github](https://github.com/ZFTurbo/Keras-Mask-RCNN-for-Open-Images-2019-Instance-Segmentation)). ",
      "replies": [
        {
          "id": 1069371,
          "postDate": "2020-11-04T11:13:28.707Z",
          "content": "<p>What do you mean by \"training size\"?</p>",
          "rawMarkdown": "What do you mean by \"training size\"?"
        },
        {
          "id": 1069393,
          "postDate": "2020-11-04T11:53:04.803Z",
          "content": "<p>on how many data you have trained</p>",
          "rawMarkdown": "on how many data you have trained"
        },
        {
          "id": 1069399,
          "postDate": "2020-11-04T12:05:07.713Z",
          "content": "<p>All data from Open Images Dataset which were available.</p>",
          "rawMarkdown": "All data from Open Images Dataset which were available."
        }
      ]
    },
    {
      "id": 1069200,
      "postDate": "2020-11-04T07:37:54.567Z",
      "content": "<p><a href=\"https://www.kaggle.com/zfturbo\" target=\"_blank\">@zfturbo</a> could you suggest version of tensorflow and keras for running pretained models?</p>",
      "rawMarkdown": "@zfturbo could you suggest version of tensorflow and keras for running pretained models?",
      "replies": [
        {
          "id": 1069274,
          "postDate": "2020-11-04T09:24:29.190Z",
          "content": "<p>It must work with [keras 2.3 + tensorflow 1.15]</p>",
          "rawMarkdown": "It must work with [keras 2.3 + tensorflow 1.15]"
        }
      ]
    },
    {
      "id": 663360,
      "postDate": "2019-11-01T21:35:59.623Z",
      "content": "<p>good!</p>",
      "rawMarkdown": "good!"
    },
    {
      "id": 661834,
      "postDate": "2019-10-30T18:50:15.440Z",
      "content": "<p>great work!!!</p>",
      "rawMarkdown": "great work!!!"
    },
    {
      "id": 665185,
      "postDate": "2019-11-04T17:54:03.243Z",
      "rawMarkdown": "",
      "isDeleted": true
    },
    {
      "id": 663692,
      "postDate": "2019-11-02T14:39:40.570Z",
      "content": "<p>Thanks <a href=\"/zfturbo\">@zfturbo</a> !!</p>",
      "rawMarkdown": "Thanks @zfturbo !!"
    },
    {
      "id": 662934,
      "postDate": "2019-11-01T08:35:46.620Z",
      "content": "<p>thanks!</p>",
      "rawMarkdown": "thanks!"
    },
    {
      "id": 662283,
      "postDate": "2019-10-31T11:25:29.427Z",
      "content": "<p>Awesome, thanks a lot! </p>",
      "rawMarkdown": "Awesome, thanks a lot! "
    }
  ],
  "comments": [
    {
      "id": 1069368,
      "author_name": "Randheer kumar",
      "author_url": "",
      "post_date": "2020-11-04T11:08:29.220000",
      "content": "<p><a href=\"https://www.kaggle.com/zfturbo\" target=\"_blank\">@zfturbo</a> , just wanted to know , what are the training size for the model (<a href=\"https://github.com/ZFTurbo/Keras-Mask-RCNN-for-Open-Images-2019-Instance-Segmentation\" target=\"_blank\">github</a>). </p>",
      "votes": 0,
      "replies": [
        {
          "id": 1069371,
          "author_name": "ZFTurbo",
          "author_url": "",
          "post_date": "2020-11-04T11:13:28.707000",
          "content": "<p>What do you mean by \"training size\"?</p>",
          "votes": 0,
          "replies": []
        },
        {
          "id": 1069393,
          "author_name": "Randheer kumar",
          "author_url": "",
          "post_date": "2020-11-04T11:53:04.803000",
          "content": "<p>on how many data you have trained</p>",
          "votes": 0,
          "replies": []
        },
        {
          "id": 1069399,
          "author_name": "ZFTurbo",
          "author_url": "",
          "post_date": "2020-11-04T12:05:07.713000",
          "content": "<p>All data from Open Images Dataset which were available.</p>",
          "votes": 0,
          "replies": []
        }
      ]
    },
    {
      "id": 1069200,
      "author_name": "Randheer kumar",
      "author_url": "",
      "post_date": "2020-11-04T07:37:54.567000",
      "content": "<p><a href=\"https://www.kaggle.com/zfturbo\" target=\"_blank\">@zfturbo</a> could you suggest version of tensorflow and keras for running pretained models?</p>",
      "votes": 0,
      "replies": [
        {
          "id": 1069274,
          "author_name": "ZFTurbo",
          "author_url": "",
          "post_date": "2020-11-04T09:24:29.190000",
          "content": "<p>It must work with [keras 2.3 + tensorflow 1.15]</p>",
          "votes": 0,
          "replies": []
        }
      ]
    },
    {
      "id": 663360,
      "author_name": "Leandro Amoras",
      "author_url": "",
      "post_date": "2019-11-01T21:35:59.623000",
      "content": "<p>good!</p>",
      "votes": 0,
      "replies": []
    },
    {
      "id": 661834,
      "author_name": "Krishna Katyal",
      "author_url": "",
      "post_date": "2019-10-30T18:50:15.440000",
      "content": "<p>great work!!!</p>",
      "votes": 0,
      "replies": []
    },
    {
      "id": 665185,
      "author_name": "",
      "author_url": "",
      "post_date": "2019-11-04T17:54:03.243000",
      "content": "",
      "votes": 0,
      "replies": []
    },
    {
      "id": 663692,
      "author_name": "ShankarKurni",
      "author_url": "",
      "post_date": "2019-11-02T14:39:40.570000",
      "content": "<p>Thanks <a href=\"/zfturbo\">@zfturbo</a> !!</p>",
      "votes": 0,
      "replies": []
    },
    {
      "id": 662934,
      "author_name": "欧阳逸云",
      "author_url": "",
      "post_date": "2019-11-01T08:35:46.620000",
      "content": "<p>thanks!</p>",
      "votes": 0,
      "replies": []
    },
    {
      "id": 662283,
      "author_name": "Daniel Haller",
      "author_url": "",
      "post_date": "2019-10-31T11:25:29.427000",
      "content": "<p>Awesome, thanks a lot! </p>",
      "votes": 0,
      "replies": []
    }
  ],
  "raw_markdown_by_id": {
    "661345": "I made a release of my Mask-RCNN code for Instance Segmentation task:\n\nhttps://github.com/ZFTurbo/Keras-Mask-RCNN-for-Open-Images-2019-Instance-Segmentation\n\nIt wasn’t used in our best submit because I finished training too late. But it gives good result on LB, so I decided to release it. \n\n![](https://raw.githubusercontent.com/ZFTurbo/Keras-Mask-RCNN-for-Open-Images-2019-Instance-Segmentation/master/img/mask_rcnn_prediction_example.jpg)\n\nRepository contains:\n\n- Pre-trained Mask R-CNN models (ResNet50, ResNet101 and ResNet152 backbones)\n- Example code to get predictions with these models for any set of images\n- Code to train (continue training) model based on Keras Mask R-CNN and OID dataset\n\nI was able to get **0.4670** Public LB and **0.4311** Private LB using ensemble of these 3 models.\n\nThere are 3 graphics with training process for each model. I changed parameters of training over some epochs (Freeze Backbone, ReduceLR, AdamAccumulate, different image sampling strategy). Fast growth of score are in places where I switched to uniform classes sampling. Also to speed up the ResNet101 training, I copied weights for decoder from trained Mask-RCNN with ResNet152 backbone. So ResNet101 got good score for much lower number of epochs.\n\n![](https://storage.googleapis.com/kaggle-forum-message-attachments/661345/14368/ResNet50.png)\n\n![](https://storage.googleapis.com/kaggle-forum-message-attachments/661345/14369/ResNet101.png)\n\n![](https://storage.googleapis.com/kaggle-forum-message-attachments/661345/14370/ResNet152.png)",
    "1069368": "@zfturbo , just wanted to know , what are the training size for the model ([github](https://github.com/ZFTurbo/Keras-Mask-RCNN-for-Open-Images-2019-Instance-Segmentation)). ",
    "1069200": "@zfturbo could you suggest version of tensorflow and keras for running pretained models?",
    "663360": "good!",
    "661834": "great work!!!",
    "665185": "",
    "663692": "Thanks @zfturbo !!",
    "662934": "thanks!",
    "662283": "Awesome, thanks a lot! "
  }
}