{
  "id": 51184,
  "title": "Train & Test Image mosaic",
  "url": "/competitions/data-science-bowl-2018/discussion/51184",
  "author_name": "",
  "post_date": "2018-03-06T08:44:22.066482Z",
  "votes": 33,
  "comment_count": 11,
  "views": 0,
  "content": "<p>In addition to kernel with code to merge train and test images\n<a href=\"https://www.kaggle.com/bonlime/train-test-image-mosaic\">https://www.kaggle.com/bonlime/train-test-image-mosaic</a> <br>\nI want to share with you already preprocessed csv with the necessary information: \nThis csv includes <strong>original image id</strong>, <strong>HSV cluster</strong> ( basically it's an image type) and <strong>mosaic id</strong>, <strong>mosaic_position</strong>\nMosaic id is an index of big image, so df.mosaic_idx.value_counts() will show you which images could be combined to one, and which couldn't. \nMosaic position will give position in square mosaic\nTo merge masks correctly, refer to the end of the kernel, where you can get image connectivity, with proper ids.</p>\n\n<p>How to use this: you can use clusters &amp; mosaic id to verify that there is no leak in your validation.   </p>\n\n<p><strong>UPD</strong> Previously some images were in 2 different mosaics, and this led to bad ids and positions, now this is fixed. An image can be only in one mosaic now. Look in comment files to find it</p>",
  "messages": [
    {
      "id": "291500",
      "postDate": "03/06/2018 08:44:22",
      "content": "<p>In addition to kernel with code to merge train and test images\n<a href=\"https://www.kaggle.com/bonlime/train-test-image-mosaic\">https://www.kaggle.com/bonlime/train-test-image-mosaic</a> <br>\nI want to share with you already preprocessed csv with the necessary information: \nThis csv includes <strong>original image id</strong>, <strong>HSV cluster</strong> ( basically it's an image type) and <strong>mosaic id</strong>, <strong>mosaic_position</strong>\nMosaic id is an index of big image, so df.mosaic_idx.value_counts() will show you which images could be combined to one, and which couldn't. \nMosaic position will give position in square mosaic\nTo merge masks correctly, refer to the end of the kernel, where you can get image connectivity, with proper ids.</p>\n\n<p>How to use this: you can use clusters &amp; mosaic id to verify that there is no leak in your validation.   </p>\n\n<p><strong>UPD</strong> Previously some images were in 2 different mosaics, and this led to bad ids and positions, now this is fixed. An image can be only in one mosaic now. Look in comment files to find it</p>",
      "rawMarkdown": "In addition to kernel with code to merge train and test images\nhttps://www.kaggle.com/bonlime/train-test-image-mosaic  \nI want to share with you already preprocessed csv with the necessary information: \nThis csv includes **original image id**, **HSV cluster** ( basically it's an image type) and **mosaic id**, **mosaic_position**\nMosaic id is an index of big image, so df.mosaic_idx.value_counts() will show you which images could be combined to one, and which couldn't. \nMosaic position will give position in square mosaic\nTo merge masks correctly, refer to the end of the kernel, where you can get image connectivity, with proper ids.\n\nHow to use this: you can use clusters &amp; mosaic id to verify that there is no leak in your validation.   \n\n**UPD** Previously some images were in 2 different mosaics, and this led to bad ids and positions, now this is fixed. An image can be only in one mosaic now. Look in comment files to find it",
      "votes": null
    },
    {
      "id": "291568",
      "postDate": "03/06/2018 11:52:16",
      "content": "<p>thanks a lot!</p>",
      "rawMarkdown": "thanks a lot!",
      "votes": null
    },
    {
      "id": "291582",
      "postDate": "03/06/2018 12:11:37",
      "content": "<p>Awesome!</p>",
      "rawMarkdown": "Awesome!",
      "votes": null
    },
    {
      "id": "291631",
      "postDate": "03/06/2018 14:16:06",
      "content": "<p>I can't update files in the post, so here are new ones:</p>",
      "rawMarkdown": "I can't update files in the post, so here are new ones:",
      "votes": null
    },
    {
      "id": "291632",
      "postDate": "03/06/2018 14:17:49",
      "content": "<p>you have to delete the attachment.\nthen re-attach with different file names</p>",
      "rawMarkdown": "you have to delete the attachment.\nthen re-attach with different file names",
      "votes": null
    },
    {
      "id": "292312",
      "postDate": "03/07/2018 19:54:07",
      "content": "<p><strong>UPDATE: I used a wrong colormap, so everything's fine here. Just don't forget to merge different instances correctly if they're touching on the edges.</strong></p>\n\n<p>Be careful though, because masks seem to be created after slicing the original image into pieces. Look at the edges, you can see some of the masks are present only in one of the sectors.</p>",
      "rawMarkdown": "**UPDATE: I used a wrong colormap, so everything's fine here. Just don't forget to merge different instances correctly if they're touching on the edges.**\n\nBe careful though, because masks seem to be created after slicing the original image into pieces. Look at the edges, you can see some of the masks are present only in one of the sectors.",
      "votes": null
    },
    {
      "id": "292325",
      "postDate": "03/07/2018 20:13:02",
      "content": "<p>can't see in your example, where mask are present only in one sector?</p>",
      "rawMarkdown": "can't see in your example, where mask are present only in one sector?",
      "votes": null
    },
    {
      "id": "292326",
      "postDate": "03/07/2018 20:16:13",
      "content": "<p>Turns out I used an incorrect colormap, masks are fine. Thanks for pointing that out ;)</p>",
      "rawMarkdown": "Turns out I used an incorrect colormap, masks are fine. Thanks for pointing that out ;)",
      "votes": null
    },
    {
      "id": "293228",
      "postDate": "03/09/2018 13:08:26",
      "content": "<p>@Nikolay: You merging image looks fine but I found that the masks do not merge together. Hence, many disconnected small masks appears although they are in the same cell (after merging) (i.e. image 422 in your <code>stage1_train/mosaics</code> folder).  Does it normal? I think it may reduce the accuracy if we did not carefully merge small masks\n<img src=\"https://i.stack.imgur.com/2ZVF5.png\" alt=\"enter image description here\"></p>",
      "rawMarkdown": "Nikolay: You merging image looks fine but I found that the masks do not merge together. Hence, many disconnected small masks appears although they are in the same cell (after merging) (i.e. image 422 in your `stage1_train/mosaics` folder).  Does it normal? I think it may reduce the accuracy if we did not carefully merge small masks\n![enter image description here][1]\n\n\n  [1]: https://i.stack.imgur.com/2ZVF5.png",
      "votes": null
    },
    {
      "id": "293247",
      "postDate": "03/09/2018 14:08:01",
      "content": "<p>Could you be more specific, please? This example is completely identical to the original dataset and contains 64 original markers since it's not a mosaic one. I mean, I didn't change it.</p>",
      "rawMarkdown": "Could you be more specific, please? This example is completely identical to the original dataset and contains 64 original markers since it's not a mosaic one. I mean, I didn't change it.",
      "votes": null
    },
    {
      "id": "293251",
      "postDate": "03/09/2018 14:18:49",
      "content": "<p>Sorry. You correct. I have tested with other images (likes id=19 or 57), they worked well. </p>",
      "rawMarkdown": "Sorry. You correct. I have tested with other images (likes id=19 or 57), they worked well.",
      "votes": null
    },
    {
      "id": "293256",
      "postDate": "03/09/2018 14:38:02",
      "content": "<p>To be clear, John has mentioned this code: <a href=\"https://www.kaggle.com/c/data-science-bowl-2018/discussion/51487\">https://www.kaggle.com/c/data-science-bowl-2018/discussion/51487</a></p>",
      "rawMarkdown": "To be clear, John has mentioned this code: https://www.kaggle.com/c/data-science-bowl-2018/discussion/51487",
      "votes": null
    }
  ],
  "comments": [
    {
      "id": 291568,
      "author_name": "hengck23",
      "author_url": "",
      "post_date": "03/06/2018 11:52:16",
      "content": "<p>thanks a lot!</p>",
      "votes": null,
      "replies": []
    },
    {
      "id": 291582,
      "author_name": "cpmpml",
      "author_url": "",
      "post_date": "03/06/2018 12:11:37",
      "content": "<p>Awesome!</p>",
      "votes": null,
      "replies": []
    },
    {
      "id": 291631,
      "author_name": "bonlime",
      "author_url": "",
      "post_date": "03/06/2018 14:16:06",
      "content": "<p>I can't update files in the post, so here are new ones:</p>",
      "votes": null,
      "replies": [
        {
          "id": 291632,
          "author_name": "hengck23",
          "author_url": "",
          "post_date": "03/06/2018 14:17:49",
          "content": "<p>you have to delete the attachment.\nthen re-attach with different file names</p>",
          "votes": null,
          "replies": []
        }
      ]
    },
    {
      "id": 292312,
      "author_name": "killthekitten",
      "author_url": "",
      "post_date": "03/07/2018 19:54:07",
      "content": "<p><strong>UPDATE: I used a wrong colormap, so everything's fine here. Just don't forget to merge different instances correctly if they're touching on the edges.</strong></p>\n\n<p>Be careful though, because masks seem to be created after slicing the original image into pieces. Look at the edges, you can see some of the masks are present only in one of the sectors.</p>",
      "votes": null,
      "replies": [
        {
          "id": 292325,
          "author_name": "bonlime",
          "author_url": "",
          "post_date": "03/07/2018 20:13:02",
          "content": "<p>can't see in your example, where mask are present only in one sector?</p>",
          "votes": null,
          "replies": []
        },
        {
          "id": 292326,
          "author_name": "killthekitten",
          "author_url": "",
          "post_date": "03/07/2018 20:16:13",
          "content": "<p>Turns out I used an incorrect colormap, masks are fine. Thanks for pointing that out ;)</p>",
          "votes": null,
          "replies": []
        },
        {
          "id": 293228,
          "author_name": "john1231983",
          "author_url": "",
          "post_date": "03/09/2018 13:08:26",
          "content": "<p>@Nikolay: You merging image looks fine but I found that the masks do not merge together. Hence, many disconnected small masks appears although they are in the same cell (after merging) (i.e. image 422 in your <code>stage1_train/mosaics</code> folder).  Does it normal? I think it may reduce the accuracy if we did not carefully merge small masks\n<img src=\"https://i.stack.imgur.com/2ZVF5.png\" alt=\"enter image description here\"></p>",
          "votes": null,
          "replies": []
        },
        {
          "id": 293247,
          "author_name": "killthekitten",
          "author_url": "",
          "post_date": "03/09/2018 14:08:01",
          "content": "<p>Could you be more specific, please? This example is completely identical to the original dataset and contains 64 original markers since it's not a mosaic one. I mean, I didn't change it.</p>",
          "votes": null,
          "replies": []
        },
        {
          "id": 293251,
          "author_name": "john1231983",
          "author_url": "",
          "post_date": "03/09/2018 14:18:49",
          "content": "<p>Sorry. You correct. I have tested with other images (likes id=19 or 57), they worked well. </p>",
          "votes": null,
          "replies": []
        },
        {
          "id": 293256,
          "author_name": "killthekitten",
          "author_url": "",
          "post_date": "03/09/2018 14:38:02",
          "content": "<p>To be clear, John has mentioned this code: <a href=\"https://www.kaggle.com/c/data-science-bowl-2018/discussion/51487\">https://www.kaggle.com/c/data-science-bowl-2018/discussion/51487</a></p>",
          "votes": null,
          "replies": []
        }
      ]
    }
  ],
  "raw_markdown_by_id": {
    "291500": "In addition to kernel with code to merge train and test images\nhttps://www.kaggle.com/bonlime/train-test-image-mosaic  \nI want to share with you already preprocessed csv with the necessary information: \nThis csv includes **original image id**, **HSV cluster** ( basically it's an image type) and **mosaic id**, **mosaic_position**\nMosaic id is an index of big image, so df.mosaic_idx.value_counts() will show you which images could be combined to one, and which couldn't. \nMosaic position will give position in square mosaic\nTo merge masks correctly, refer to the end of the kernel, where you can get image connectivity, with proper ids.\n\nHow to use this: you can use clusters &amp; mosaic id to verify that there is no leak in your validation.   \n\n**UPD** Previously some images were in 2 different mosaics, and this led to bad ids and positions, now this is fixed. An image can be only in one mosaic now. Look in comment files to find it",
    "291568": "thanks a lot!",
    "291582": "Awesome!",
    "291631": "I can't update files in the post, so here are new ones:",
    "291632": "you have to delete the attachment.\nthen re-attach with different file names",
    "292312": "**UPDATE: I used a wrong colormap, so everything's fine here. Just don't forget to merge different instances correctly if they're touching on the edges.**\n\nBe careful though, because masks seem to be created after slicing the original image into pieces. Look at the edges, you can see some of the masks are present only in one of the sectors.",
    "292325": "can't see in your example, where mask are present only in one sector?",
    "292326": "Turns out I used an incorrect colormap, masks are fine. Thanks for pointing that out ;)",
    "293228": "Nikolay: You merging image looks fine but I found that the masks do not merge together. Hence, many disconnected small masks appears although they are in the same cell (after merging) (i.e. image 422 in your `stage1_train/mosaics` folder).  Does it normal? I think it may reduce the accuracy if we did not carefully merge small masks\n![enter image description here][1]\n\n\n  [1]: https://i.stack.imgur.com/2ZVF5.png",
    "293247": "Could you be more specific, please? This example is completely identical to the original dataset and contains 64 original markers since it's not a mosaic one. I mean, I didn't change it.",
    "293251": "Sorry. You correct. I have tested with other images (likes id=19 or 57), they worked well.",
    "293256": "To be clear, John has mentioned this code: https://www.kaggle.com/c/data-science-bowl-2018/discussion/51487"
  },
  "source": "meta"
}