{
  "id": 49651,
  "title": "Tensorflow has released support for instance segmentation",
  "url": "/competitions/data-science-bowl-2018/discussion/49651",
  "author_name": "",
  "post_date": "2018-02-13T20:31:35.259401400Z",
  "votes": 10,
  "comment_count": 16,
  "views": 0,
  "content": "<p><a href=\"https://github.com/tensorflow/models/blob/master/research/object_detection/g3doc/instance_segmentation.md\">link</a></p>",
  "messages": [
    {
      "id": "282274",
      "postDate": "02/13/2018 20:31:35",
      "content": "<p><a href=\"https://github.com/tensorflow/models/blob/master/research/object_detection/g3doc/instance_segmentation.md\">link</a></p>",
      "rawMarkdown": "[link](https://github.com/tensorflow/models/blob/master/research/object_detection/g3doc/instance_segmentation.md)",
      "votes": null
    },
    {
      "id": "282287",
      "postDate": "02/13/2018 20:43:20",
      "content": "<p>cool</p>",
      "rawMarkdown": "cool",
      "votes": null
    },
    {
      "id": "282346",
      "postDate": "02/13/2018 22:10:48",
      "content": "<p>Thanks for the link.</p>",
      "rawMarkdown": "Thanks for the link.",
      "votes": null
    },
    {
      "id": "285045",
      "postDate": "02/19/2018 06:01:12",
      "content": "<p>Anybody else tried this out ? I can build tfRecords fairly easily which is often a barrier for using tensorflow +Slim models. so  I did that, followed the instructions on setting up the model to be best of my ability and ran some train and evaluations.  But I'm getting really lousy results - it trains really slowly - even after 140,000 steps ( 1/2 sec a step for me, the total loss is still quite high - around .5, .6. Then at evaluation ( which runs really slowly at that ) the mAP using 'coco_mask_metrics' for small objects is .003 ! and when I look at the predicted boxes on some sample images in tensorboard, the fit is truly awful . So far I definitely don't get anything worth submitting to the LB.  Anybody else doing better ? </p>",
      "rawMarkdown": "Anybody else tried this out ? I can build tfRecords fairly easily which is often a barrier for using tensorflow +Slim models. so  I did that, followed the instructions on setting up the model to be best of my ability and ran some train and evaluations.  But I'm getting really lousy results - it trains really slowly - even after 140,000 steps ( 1/2 sec a step for me, the total loss is still quite high - around .5, .6. Then at evaluation ( which runs really slowly at that ) the mAP using 'coco_mask_metrics' for small objects is .003 ! and when I look at the predicted boxes on some sample images in tensorboard, the fit is truly awful . So far I definitely don't get anything worth submitting to the LB.  Anybody else doing better ?",
      "votes": null
    },
    {
      "id": "285076",
      "postDate": "02/19/2018 08:41:01",
      "content": "<p>I did not manage to run masks yet, but I tried with faster rcnn resnet101. Check <a href=\"https://drive.google.com/drive/folders/1bsP2kUQjwObL0PQd-nrae1_tRpiB1_99?usp=sharing\">results</a> if it helps.</p>",
      "rawMarkdown": "I did not manage to run masks yet, but I tried with faster rcnn resnet101. Check [results](https://drive.google.com/drive/folders/1bsP2kUQjwObL0PQd-nrae1_tRpiB1_99?usp=sharing) if it helps.",
      "votes": null
    },
    {
      "id": "285078",
      "postDate": "02/19/2018 08:52:56",
      "content": "<p>Welcome.</p>",
      "rawMarkdown": "Welcome.",
      "votes": null
    },
    {
      "id": "285304",
      "postDate": "02/19/2018 21:36:35",
      "content": "<p>thanks for sharing.. I got nowhere near that. before you edited your message, I think you were asking for how the masks get encoded.. I use this block of code  : </p>\n\n<blockquote>\n<pre><code>    mask_images=[]\n    for mask_file in next(os.walk(path + masks_dir))[2]:\n        mask_path = path + masks_dir + mask_file\n        with tf.gfile.GFile(mask_path, 'rb') as fid:\n            encoded_mask_png = fid.read()\n        encoded_png_io = io.BytesIO(encoded_mask_png)\n        mask_ = PIL.Image.open(encoded_png_io)\n        if mask_.format != 'PNG':\n            raise ValueError('Mask format not PNG')\n        mask_np = np.asarray(mask_)\n</code></pre>\n  \n  <h1>google models want a 0, 1 mask file</h1>\n\n<pre><code>        mask_np=(mask_np/255).astype(np.uint8)\n        img = PIL.Image.fromarray(mask_np)\n        output = io.BytesIO()\n        img.save(output, format='PNG')\n        mask_images.append(output.getvalue())\n\n        instance_masks.append(mask_np)            \n        class_ids.append(1)\n        class_texts.append(\"cells\".encode('utf-8'))\n    masks = np.stack(instance_masks, axis=2)\n    xmins, xmaxs, ymins, ymaxs = get_mask_info(masks)\n    tf_example = tf.train.Example(features=tf.train.Features(feature={\n      'image/height': dataset_util.int64_feature(height), ...       'image/object/mask' :  &gt;dataset_util.bytes_list_feature(mask_images),   \n\n      }))\n</code></pre>\n</blockquote>",
      "rawMarkdown": "thanks for sharing.. I got nowhere near that. before you edited your message, I think you were asking for how the masks get encoded.. I use this block of code  : \n\n&gt;         mask_images=[]\n&gt;         for mask_file in next(os.walk(path + masks_dir))[2]:\n&gt;             mask_path = path + masks_dir + mask_file\n&gt;             with tf.gfile.GFile(mask_path, 'rb') as fid:\n&gt;                 encoded_mask_png = fid.read()\n&gt;             encoded_png_io = io.BytesIO(encoded_mask_png)\n&gt;             mask_ = PIL.Image.open(encoded_png_io)\n&gt;             if mask_.format != 'PNG':\n&gt;                 raise ValueError('Mask format not PNG')\n&gt;             mask_np = np.asarray(mask_)\n&gt; # google models want a 0, 1 mask file            \n&gt;             mask_np=(mask_np/255).astype(np.uint8)\n&gt;             img = PIL.Image.fromarray(mask_np)\n&gt;             output = io.BytesIO()\n&gt;             img.save(output, format='PNG')\n&gt;             mask_images.append(output.getvalue())\n&gt;             \n&gt;             instance_masks.append(mask_np)            \n&gt;             class_ids.append(1)\n&gt;             class_texts.append(\"cells\".encode('utf-8'))\n&gt;         masks = np.stack(instance_masks, axis=2)\n&gt;         xmins, xmaxs, ymins, ymaxs = get_mask_info(masks)\n&gt;         tf_example = tf.train.Example(features=tf.train.Features(feature={\n&gt;           'image/height': dataset_util.int64_feature(height), ...       'image/object/mask' :  &gt;dataset_util.bytes_list_feature(mask_images),   \n&gt; \n&gt;           }))",
      "votes": null
    },
    {
      "id": "285323",
      "postDate": "02/19/2018 23:21:10",
      "content": "<p>Hello all, could you tell me hoe to prepaire dataset? Does it need to follow coco dataset rule ? Thanks</p>",
      "rawMarkdown": "Hello all, could you tell me hoe to prepaire dataset? Does it need to follow coco dataset rule ? Thanks",
      "votes": null
    },
    {
      "id": "285346",
      "postDate": "02/20/2018 02:17:02",
      "content": "<p>There are several examples out there but I found this one easiest to follow:<a href=\"https://github.com/tensorflow/models/blob/master/research/object_detection/g3doc/using_your_own_dataset.md\">Using your own dataset</a></p>\n\n<p>It doesn't tell you how to add masks to the TFrecord. for that you need to populate another tag called</p>\n\n<blockquote>\n<pre><code>     'image/object/mask' : dataset_util.bytes_list_feature(mask_images),      \n</code></pre>\n</blockquote>",
      "rawMarkdown": "There are several examples out there but I found this one easiest to follow:[Using your own dataset][1]\n\n\n  [1]: https://github.com/tensorflow/models/blob/master/research/object_detection/g3doc/using_your_own_dataset.md\n\nIt doesn't tell you how to add masks to the TFrecord. for that you need to populate another tag called\n&gt;          'image/object/mask' : dataset_util.bytes_list_feature(mask_images),",
      "votes": null
    },
    {
      "id": "285379",
      "postDate": "02/20/2018 04:55:09",
      "content": "<p>seems like I've got past my issues with training. After 16K steps here's <a href=\"https://drive.google.com/file/d/1bwZ0P2AmXB7zVkDBttDNZ32jkmHVz9Ec/view?usp=sharing\">Tensorboard Images</a></p>\n\n<p>and here's the .. <a href=\"https://drive.google.com/file/d/1zKHN1eUPbCtjIN7tPq3phtxBSOH1VjIf/view?usp=sharing\">mAP results from coco_mask_metrics</a></p>",
      "rawMarkdown": "seems like I've got past my issues with training. After 16K steps here's [Tensorboard Images][1]\n\n\nand here's the .. [mAP results from coco_mask_metrics][2]\n\n\n  [1]: https://drive.google.com/file/d/1bwZ0P2AmXB7zVkDBttDNZ32jkmHVz9Ec/view?usp=sharing\n  [2]: https://drive.google.com/file/d/1zKHN1eUPbCtjIN7tPq3phtxBSOH1VjIf/view?usp=sharing",
      "votes": null
    },
    {
      "id": "285400",
      "postDate": "02/20/2018 06:20:20",
      "content": "<p>Great. But it looks too low mAP. Do you use DSB 2018 dataset?</p>",
      "rawMarkdown": "Great. But it looks too low mAP. Do you use DSB 2018 dataset?",
      "votes": null
    },
    {
      "id": "285420",
      "postDate": "02/20/2018 07:53:36",
      "content": "<p>You can also check different conversion scripts for different datasets in <a href=\"https://github.com/tensorflow/models/tree/master/research/object_detection/dataset_tools\">models/research/object_detection/dataset_tools</a>.</p>",
      "rawMarkdown": "You can also check different conversion scripts for different datasets in [models/research/object_detection/dataset_tools](https://github.com/tensorflow/models/tree/master/research/object_detection/dataset_tools).",
      "votes": null
    },
    {
      "id": "285422",
      "postDate": "02/20/2018 08:00:53",
      "content": "<p>Nice to hear that skthetwo. What base model  did you use, did you use pretrained weights or did you trained it from scratch, did you change max_detections_per_class (by default is 100) under second_stage_post_processing? </p>",
      "rawMarkdown": "Nice to hear that skthetwo. What base model  did you use, did you use pretrained weights or did you trained it from scratch, did you change max_detections_per_class (by default is 100) under second_stage_post_processing?",
      "votes": null
    },
    {
      "id": "285500",
      "postDate": "02/20/2018 13:01:38",
      "content": "<p>Thanks. I will try it. Could you tell me how about LB did you achieve with this code? I am wondering about pytorch, keras and tensorflow framework?</p>",
      "rawMarkdown": "Thanks. I will try it. Could you tell me how about LB did you achieve with this code? I am wondering about pytorch, keras and tensorflow framework?",
      "votes": null
    },
    {
      "id": "285526",
      "postDate": "02/20/2018 14:03:53",
      "content": "<p>I used the directives:</p>\n\n<blockquote>\n  <p>fine_tune_checkpoint: \"/home/shantanu/models/research/output/TFR/model.ckpt\"\n  from_detection_checkpoint: true</p>\n</blockquote>\n\n<p>when model.ckpt comes from faster_rcnn_resnet101_coco_11_06_2017 so presumably I did use pre-trained weights.  And I set the maxes to :</p>\n\n<blockquote>\n<pre><code>  max_detections_per_class: 300\n  max_total_detections: 300\n</code></pre>\n</blockquote>\n\n<p>and since my num_classes is 1, that's 300 detections I reckon. thanks btw for sharing your detection results - it validated for me that the code \"works\" so I had an incentive to debug MY code. </p>",
      "rawMarkdown": "I used the directives:\n  &gt;fine_tune_checkpoint: \"/home/shantanu/models/research/output/TFR/model.ckpt\"\n  &gt;from_detection_checkpoint: true\n\nwhen model.ckpt comes from faster_rcnn_resnet101_coco_11_06_2017 so presumably I did use pre-trained weights.  And I set the maxes to :\n\n &gt;       max_detections_per_class: 300\n &gt;       max_total_detections: 300\n \nand since my num_classes is 1, that's 300 detections I reckon. thanks btw for sharing your detection results - it validated for me that the code \"works\" so I had an incentive to debug MY code.",
      "votes": null
    },
    {
      "id": "285532",
      "postDate": "02/20/2018 14:33:06",
      "content": "<p>yes I did use the DSB2018 dataset and yes the mAP looks too low - too low for me to even bother submitting it to the LB. But you should have seen the mAP results before I fixed a couple of bugs in my code !  Also I bear in mind though that this is after only 16K steps when the total loss during training has many steps with losses &gt; 1 and some losses &gt; 5 even and config settings more or less at default ! Lets see how well is does after more training and tweaking.</p>",
      "rawMarkdown": "yes I did use the DSB2018 dataset and yes the mAP looks too low - too low for me to even bother submitting it to the LB. But you should have seen the mAP results before I fixed a couple of bugs in my code !  Also I bear in mind though that this is after only 16K steps when the total loss during training has many steps with losses &gt; 1 and some losses &gt; 5 even and config settings more or less at default ! Lets see how well is does after more training and tweaking.",
      "votes": null
    },
    {
      "id": "287197",
      "postDate": "02/23/2018 20:55:02",
      "content": "<p>Hi , do you have any update LB score? I am chosing between tensorflow or keras implementation. For now, keras may give better performance 0.416</p>",
      "rawMarkdown": "Hi , do you have any update LB score? I am chosing between tensorflow or keras implementation. For now, keras may give better performance 0.416",
      "votes": null
    }
  ],
  "comments": [
    {
      "id": 282287,
      "author_name": "wayne999",
      "author_url": "",
      "post_date": "02/13/2018 20:43:20",
      "content": "<p>cool</p>",
      "votes": null,
      "replies": []
    },
    {
      "id": 282346,
      "author_name": "isathish",
      "author_url": "",
      "post_date": "02/13/2018 22:10:48",
      "content": "<p>Thanks for the link.</p>",
      "votes": null,
      "replies": [
        {
          "id": 285078,
          "author_name": "maesaer",
          "author_url": "",
          "post_date": "02/19/2018 08:52:56",
          "content": "<p>Welcome.</p>",
          "votes": null,
          "replies": []
        }
      ]
    },
    {
      "id": 285045,
      "author_name": "skthetwo",
      "author_url": "",
      "post_date": "02/19/2018 06:01:12",
      "content": "<p>Anybody else tried this out ? I can build tfRecords fairly easily which is often a barrier for using tensorflow +Slim models. so  I did that, followed the instructions on setting up the model to be best of my ability and ran some train and evaluations.  But I'm getting really lousy results - it trains really slowly - even after 140,000 steps ( 1/2 sec a step for me, the total loss is still quite high - around .5, .6. Then at evaluation ( which runs really slowly at that ) the mAP using 'coco_mask_metrics' for small objects is .003 ! and when I look at the predicted boxes on some sample images in tensorboard, the fit is truly awful . So far I definitely don't get anything worth submitting to the LB.  Anybody else doing better ? </p>",
      "votes": null,
      "replies": [
        {
          "id": 285076,
          "author_name": "maesaer",
          "author_url": "",
          "post_date": "02/19/2018 08:41:01",
          "content": "<p>I did not manage to run masks yet, but I tried with faster rcnn resnet101. Check <a href=\"https://drive.google.com/drive/folders/1bsP2kUQjwObL0PQd-nrae1_tRpiB1_99?usp=sharing\">results</a> if it helps.</p>",
          "votes": null,
          "replies": []
        },
        {
          "id": 285304,
          "author_name": "skthetwo",
          "author_url": "",
          "post_date": "02/19/2018 21:36:35",
          "content": "<p>thanks for sharing.. I got nowhere near that. before you edited your message, I think you were asking for how the masks get encoded.. I use this block of code  : </p>\n\n<blockquote>\n<pre><code>    mask_images=[]\n    for mask_file in next(os.walk(path + masks_dir))[2]:\n        mask_path = path + masks_dir + mask_file\n        with tf.gfile.GFile(mask_path, 'rb') as fid:\n            encoded_mask_png = fid.read()\n        encoded_png_io = io.BytesIO(encoded_mask_png)\n        mask_ = PIL.Image.open(encoded_png_io)\n        if mask_.format != 'PNG':\n            raise ValueError('Mask format not PNG')\n        mask_np = np.asarray(mask_)\n</code></pre>\n  \n  <h1>google models want a 0, 1 mask file</h1>\n\n<pre><code>        mask_np=(mask_np/255).astype(np.uint8)\n        img = PIL.Image.fromarray(mask_np)\n        output = io.BytesIO()\n        img.save(output, format='PNG')\n        mask_images.append(output.getvalue())\n\n        instance_masks.append(mask_np)            \n        class_ids.append(1)\n        class_texts.append(\"cells\".encode('utf-8'))\n    masks = np.stack(instance_masks, axis=2)\n    xmins, xmaxs, ymins, ymaxs = get_mask_info(masks)\n    tf_example = tf.train.Example(features=tf.train.Features(feature={\n      'image/height': dataset_util.int64_feature(height), ...       'image/object/mask' :  &gt;dataset_util.bytes_list_feature(mask_images),   \n\n      }))\n</code></pre>\n</blockquote>",
          "votes": null,
          "replies": []
        },
        {
          "id": 285379,
          "author_name": "skthetwo",
          "author_url": "",
          "post_date": "02/20/2018 04:55:09",
          "content": "<p>seems like I've got past my issues with training. After 16K steps here's <a href=\"https://drive.google.com/file/d/1bwZ0P2AmXB7zVkDBttDNZ32jkmHVz9Ec/view?usp=sharing\">Tensorboard Images</a></p>\n\n<p>and here's the .. <a href=\"https://drive.google.com/file/d/1zKHN1eUPbCtjIN7tPq3phtxBSOH1VjIf/view?usp=sharing\">mAP results from coco_mask_metrics</a></p>",
          "votes": null,
          "replies": []
        },
        {
          "id": 285400,
          "author_name": "john1231983",
          "author_url": "",
          "post_date": "02/20/2018 06:20:20",
          "content": "<p>Great. But it looks too low mAP. Do you use DSB 2018 dataset?</p>",
          "votes": null,
          "replies": []
        },
        {
          "id": 285422,
          "author_name": "maesaer",
          "author_url": "",
          "post_date": "02/20/2018 08:00:53",
          "content": "<p>Nice to hear that skthetwo. What base model  did you use, did you use pretrained weights or did you trained it from scratch, did you change max_detections_per_class (by default is 100) under second_stage_post_processing? </p>",
          "votes": null,
          "replies": []
        },
        {
          "id": 285526,
          "author_name": "skthetwo",
          "author_url": "",
          "post_date": "02/20/2018 14:03:53",
          "content": "<p>I used the directives:</p>\n\n<blockquote>\n  <p>fine_tune_checkpoint: \"/home/shantanu/models/research/output/TFR/model.ckpt\"\n  from_detection_checkpoint: true</p>\n</blockquote>\n\n<p>when model.ckpt comes from faster_rcnn_resnet101_coco_11_06_2017 so presumably I did use pre-trained weights.  And I set the maxes to :</p>\n\n<blockquote>\n<pre><code>  max_detections_per_class: 300\n  max_total_detections: 300\n</code></pre>\n</blockquote>\n\n<p>and since my num_classes is 1, that's 300 detections I reckon. thanks btw for sharing your detection results - it validated for me that the code \"works\" so I had an incentive to debug MY code. </p>",
          "votes": null,
          "replies": []
        }
      ]
    },
    {
      "id": 285323,
      "author_name": "john1231983",
      "author_url": "",
      "post_date": "02/19/2018 23:21:10",
      "content": "<p>Hello all, could you tell me hoe to prepaire dataset? Does it need to follow coco dataset rule ? Thanks</p>",
      "votes": null,
      "replies": [
        {
          "id": 285346,
          "author_name": "skthetwo",
          "author_url": "",
          "post_date": "02/20/2018 02:17:02",
          "content": "<p>There are several examples out there but I found this one easiest to follow:<a href=\"https://github.com/tensorflow/models/blob/master/research/object_detection/g3doc/using_your_own_dataset.md\">Using your own dataset</a></p>\n\n<p>It doesn't tell you how to add masks to the TFrecord. for that you need to populate another tag called</p>\n\n<blockquote>\n<pre><code>     'image/object/mask' : dataset_util.bytes_list_feature(mask_images),      \n</code></pre>\n</blockquote>",
          "votes": null,
          "replies": []
        },
        {
          "id": 285420,
          "author_name": "maesaer",
          "author_url": "",
          "post_date": "02/20/2018 07:53:36",
          "content": "<p>You can also check different conversion scripts for different datasets in <a href=\"https://github.com/tensorflow/models/tree/master/research/object_detection/dataset_tools\">models/research/object_detection/dataset_tools</a>.</p>",
          "votes": null,
          "replies": []
        },
        {
          "id": 285500,
          "author_name": "john1231983",
          "author_url": "",
          "post_date": "02/20/2018 13:01:38",
          "content": "<p>Thanks. I will try it. Could you tell me how about LB did you achieve with this code? I am wondering about pytorch, keras and tensorflow framework?</p>",
          "votes": null,
          "replies": []
        },
        {
          "id": 285532,
          "author_name": "skthetwo",
          "author_url": "",
          "post_date": "02/20/2018 14:33:06",
          "content": "<p>yes I did use the DSB2018 dataset and yes the mAP looks too low - too low for me to even bother submitting it to the LB. But you should have seen the mAP results before I fixed a couple of bugs in my code !  Also I bear in mind though that this is after only 16K steps when the total loss during training has many steps with losses &gt; 1 and some losses &gt; 5 even and config settings more or less at default ! Lets see how well is does after more training and tweaking.</p>",
          "votes": null,
          "replies": []
        },
        {
          "id": 287197,
          "author_name": "john1231983",
          "author_url": "",
          "post_date": "02/23/2018 20:55:02",
          "content": "<p>Hi , do you have any update LB score? I am chosing between tensorflow or keras implementation. For now, keras may give better performance 0.416</p>",
          "votes": null,
          "replies": []
        }
      ]
    }
  ],
  "raw_markdown_by_id": {
    "282274": "[link](https://github.com/tensorflow/models/blob/master/research/object_detection/g3doc/instance_segmentation.md)",
    "282287": "cool",
    "282346": "Thanks for the link.",
    "285045": "Anybody else tried this out ? I can build tfRecords fairly easily which is often a barrier for using tensorflow +Slim models. so  I did that, followed the instructions on setting up the model to be best of my ability and ran some train and evaluations.  But I'm getting really lousy results - it trains really slowly - even after 140,000 steps ( 1/2 sec a step for me, the total loss is still quite high - around .5, .6. Then at evaluation ( which runs really slowly at that ) the mAP using 'coco_mask_metrics' for small objects is .003 ! and when I look at the predicted boxes on some sample images in tensorboard, the fit is truly awful . So far I definitely don't get anything worth submitting to the LB.  Anybody else doing better ?",
    "285076": "I did not manage to run masks yet, but I tried with faster rcnn resnet101. Check [results](https://drive.google.com/drive/folders/1bsP2kUQjwObL0PQd-nrae1_tRpiB1_99?usp=sharing) if it helps.",
    "285078": "Welcome.",
    "285304": "thanks for sharing.. I got nowhere near that. before you edited your message, I think you were asking for how the masks get encoded.. I use this block of code  : \n\n&gt;         mask_images=[]\n&gt;         for mask_file in next(os.walk(path + masks_dir))[2]:\n&gt;             mask_path = path + masks_dir + mask_file\n&gt;             with tf.gfile.GFile(mask_path, 'rb') as fid:\n&gt;                 encoded_mask_png = fid.read()\n&gt;             encoded_png_io = io.BytesIO(encoded_mask_png)\n&gt;             mask_ = PIL.Image.open(encoded_png_io)\n&gt;             if mask_.format != 'PNG':\n&gt;                 raise ValueError('Mask format not PNG')\n&gt;             mask_np = np.asarray(mask_)\n&gt; # google models want a 0, 1 mask file            \n&gt;             mask_np=(mask_np/255).astype(np.uint8)\n&gt;             img = PIL.Image.fromarray(mask_np)\n&gt;             output = io.BytesIO()\n&gt;             img.save(output, format='PNG')\n&gt;             mask_images.append(output.getvalue())\n&gt;             \n&gt;             instance_masks.append(mask_np)            \n&gt;             class_ids.append(1)\n&gt;             class_texts.append(\"cells\".encode('utf-8'))\n&gt;         masks = np.stack(instance_masks, axis=2)\n&gt;         xmins, xmaxs, ymins, ymaxs = get_mask_info(masks)\n&gt;         tf_example = tf.train.Example(features=tf.train.Features(feature={\n&gt;           'image/height': dataset_util.int64_feature(height), ...       'image/object/mask' :  &gt;dataset_util.bytes_list_feature(mask_images),   \n&gt; \n&gt;           }))",
    "285323": "Hello all, could you tell me hoe to prepaire dataset? Does it need to follow coco dataset rule ? Thanks",
    "285346": "There are several examples out there but I found this one easiest to follow:[Using your own dataset][1]\n\n\n  [1]: https://github.com/tensorflow/models/blob/master/research/object_detection/g3doc/using_your_own_dataset.md\n\nIt doesn't tell you how to add masks to the TFrecord. for that you need to populate another tag called\n&gt;          'image/object/mask' : dataset_util.bytes_list_feature(mask_images),",
    "285379": "seems like I've got past my issues with training. After 16K steps here's [Tensorboard Images][1]\n\n\nand here's the .. [mAP results from coco_mask_metrics][2]\n\n\n  [1]: https://drive.google.com/file/d/1bwZ0P2AmXB7zVkDBttDNZ32jkmHVz9Ec/view?usp=sharing\n  [2]: https://drive.google.com/file/d/1zKHN1eUPbCtjIN7tPq3phtxBSOH1VjIf/view?usp=sharing",
    "285400": "Great. But it looks too low mAP. Do you use DSB 2018 dataset?",
    "285420": "You can also check different conversion scripts for different datasets in [models/research/object_detection/dataset_tools](https://github.com/tensorflow/models/tree/master/research/object_detection/dataset_tools).",
    "285422": "Nice to hear that skthetwo. What base model  did you use, did you use pretrained weights or did you trained it from scratch, did you change max_detections_per_class (by default is 100) under second_stage_post_processing?",
    "285500": "Thanks. I will try it. Could you tell me how about LB did you achieve with this code? I am wondering about pytorch, keras and tensorflow framework?",
    "285526": "I used the directives:\n  &gt;fine_tune_checkpoint: \"/home/shantanu/models/research/output/TFR/model.ckpt\"\n  &gt;from_detection_checkpoint: true\n\nwhen model.ckpt comes from faster_rcnn_resnet101_coco_11_06_2017 so presumably I did use pre-trained weights.  And I set the maxes to :\n\n &gt;       max_detections_per_class: 300\n &gt;       max_total_detections: 300\n \nand since my num_classes is 1, that's 300 detections I reckon. thanks btw for sharing your detection results - it validated for me that the code \"works\" so I had an incentive to debug MY code.",
    "285532": "yes I did use the DSB2018 dataset and yes the mAP looks too low - too low for me to even bother submitting it to the LB. But you should have seen the mAP results before I fixed a couple of bugs in my code !  Also I bear in mind though that this is after only 16K steps when the total loss during training has many steps with losses &gt; 1 and some losses &gt; 5 even and config settings more or less at default ! Lets see how well is does after more training and tweaking.",
    "287197": "Hi , do you have any update LB score? I am chosing between tensorflow or keras implementation. For now, keras may give better performance 0.416"
  },
  "source": "meta"
}