{
  "id": 54480,
  "title": "how to handle zero detection?",
  "url": "/competitions/data-science-bowl-2018/discussion/54480",
  "author_name": "",
  "post_date": "2018-04-13T18:28:56.878378700Z",
  "votes": 3,
  "comment_count": 2,
  "views": 0,
  "content": "<p>I saw many post that ask this. This is the easiest and safest way:</p>\n\n<ol>\n<li><p>try catch catch error in your current code. If there is an error, just continue to the next image.</p></li>\n<li><p>produce and csv file for the  non error valid images:</p>\n\n<ul><li><p>Valid_image1  rle1</p></li>\n<li><p>Valid_image2  rle1</p></li>\n<li><p>Valid_image2  rle3</p></li></ul></li>\n<li><p>extend your csv with all 3 thousands images, using image id and empty rle</p>\n\n<ul><li><p>Valid_image1  rle1</p></li>\n<li><p>Valid_image2  rle1</p></li>\n<li><p>Valid_image2  rle3</p></li>\n<li><p>image1 ''</p></li>\n<li><p>image2 ''</p></li>\n<li>...</li>\n<li>image_last ''</li></ul></li>\n</ol>\n\n<p>note that some image_n == Valid_image_m. </p>\n\n<p>'' (empty rle string) means no pixel is encode. i.e. blank mask.</p>\n\n<p>since all images are include and have at least an empty '', the submission system will not complain.</p>\n\n<p>I used this method in stage1 probing the score for submission of a subset of images. It works! </p>",
  "messages": [
    {
      "id": "313712",
      "postDate": "04/13/2018 18:28:56",
      "content": "<p>I saw many post that ask this. This is the easiest and safest way:</p>\n\n<ol>\n<li><p>try catch catch error in your current code. If there is an error, just continue to the next image.</p></li>\n<li><p>produce and csv file for the  non error valid images:</p>\n\n<ul><li><p>Valid_image1  rle1</p></li>\n<li><p>Valid_image2  rle1</p></li>\n<li><p>Valid_image2  rle3</p></li></ul></li>\n<li><p>extend your csv with all 3 thousands images, using image id and empty rle</p>\n\n<ul><li><p>Valid_image1  rle1</p></li>\n<li><p>Valid_image2  rle1</p></li>\n<li><p>Valid_image2  rle3</p></li>\n<li><p>image1 ''</p></li>\n<li><p>image2 ''</p></li>\n<li>...</li>\n<li>image_last ''</li></ul></li>\n</ol>\n\n<p>note that some image_n == Valid_image_m. </p>\n\n<p>'' (empty rle string) means no pixel is encode. i.e. blank mask.</p>\n\n<p>since all images are include and have at least an empty '', the submission system will not complain.</p>\n\n<p>I used this method in stage1 probing the score for submission of a subset of images. It works! </p>",
      "rawMarkdown": "I saw many post that ask this. This is the easiest and safest way:\n\n1.  try catch catch error in your current code. If there is an error, just continue to the next image.\n\n2. produce and csv file for the  non error valid images:\n\n-  Valid_image1  rle1\n\n-  Valid_image2  rle1\n\n-  Valid_image2  rle3\n\n3. extend your csv with all 3 thousands images, using image id and empty rle\n\n -  Valid_image1  rle1\n\n-  Valid_image2  rle1\n\n-  Valid_image2  rle3\n\n-  image1 ''\n\n-  image2 ''\n-  ...\n-  image_last ''\n\nnote that some image_n == Valid_image_m. \n\n'' (empty rle string) means no pixel is encode. i.e. blank mask.\n\nsince all images are include and have at least an empty '', the submission system will not complain.\n\nI used this method in stage1 probing the score for submission of a subset of images. It works!",
      "votes": null
    },
    {
      "id": "313872",
      "postDate": "04/14/2018 01:29:24",
      "content": "<p>Next time if you have a two stage competition again, remember to have a try and catch error mehcanism. This ensures your code at least will run.</p>",
      "rawMarkdown": "Next time if you have a two stage competition again, remember to have a try and catch error mehcanism. This ensures your code at least will run.",
      "votes": null
    },
    {
      "id": "314196",
      "postDate": "04/14/2018 20:31:54",
      "content": "<p>I checked if the file is empty and if it does I created a np.zeros instead - do u think there will be difference? </p>",
      "rawMarkdown": "I checked if the file is empty and if it does I created a np.zeros instead - do u think there will be difference?",
      "votes": null
    }
  ],
  "comments": [
    {
      "id": 313872,
      "author_name": "hengck23",
      "author_url": "",
      "post_date": "04/14/2018 01:29:24",
      "content": "<p>Next time if you have a two stage competition again, remember to have a try and catch error mehcanism. This ensures your code at least will run.</p>",
      "votes": null,
      "replies": []
    },
    {
      "id": 314196,
      "author_name": "aviwolfson",
      "author_url": "",
      "post_date": "04/14/2018 20:31:54",
      "content": "<p>I checked if the file is empty and if it does I created a np.zeros instead - do u think there will be difference? </p>",
      "votes": null,
      "replies": []
    }
  ],
  "raw_markdown_by_id": {
    "313712": "I saw many post that ask this. This is the easiest and safest way:\n\n1.  try catch catch error in your current code. If there is an error, just continue to the next image.\n\n2. produce and csv file for the  non error valid images:\n\n-  Valid_image1  rle1\n\n-  Valid_image2  rle1\n\n-  Valid_image2  rle3\n\n3. extend your csv with all 3 thousands images, using image id and empty rle\n\n -  Valid_image1  rle1\n\n-  Valid_image2  rle1\n\n-  Valid_image2  rle3\n\n-  image1 ''\n\n-  image2 ''\n-  ...\n-  image_last ''\n\nnote that some image_n == Valid_image_m. \n\n'' (empty rle string) means no pixel is encode. i.e. blank mask.\n\nsince all images are include and have at least an empty '', the submission system will not complain.\n\nI used this method in stage1 probing the score for submission of a subset of images. It works!",
    "313872": "Next time if you have a two stage competition again, remember to have a try and catch error mehcanism. This ensures your code at least will run.",
    "314196": "I checked if the file is empty and if it does I created a np.zeros instead - do u think there will be difference?"
  },
  "source": "meta"
}