{
  "id": 54820,
  "title": "Two Important Rules for Submission",
  "url": "/competitions/cvpr-2018-autonomous-driving/discussion/54820",
  "author_name": "",
  "post_date": "2018-04-18T07:31:44.581140800Z",
  "votes": 4,
  "comment_count": 20,
  "views": 0,
  "content": "<p>There are two important rules for submission.</p>\n\n<ol>\n<li>Each row in submission must have the following fields with the exact order, <code>ImageId, LabelId, Confidence, PixelCount, EncodedPixels</code></li>\n<li>Each image should be encoded in the row-major order.</li>\n</ol>",
  "messages": [
    {
      "id": "316096",
      "postDate": "04/18/2018 07:31:44",
      "content": "<p>There are two important rules for submission.</p>\n\n<ol>\n<li>Each row in submission must have the following fields with the exact order, <code>ImageId, LabelId, Confidence, PixelCount, EncodedPixels</code></li>\n<li>Each image should be encoded in the row-major order.</li>\n</ol>",
      "rawMarkdown": "There are two important rules for submission.\n\n1. Each row in submission must have the following fields with the exact order, `ImageId, LabelId, Confidence, PixelCount, EncodedPixels`\n2. Each image should be encoded in the row-major order.",
      "votes": null
    },
    {
      "id": "316104",
      "postDate": "04/18/2018 07:47:02",
      "content": "<p>row major !?  Could you explain it more detailed ?!  your submission format says (2, 1) means 2, so that it's col-major ?!</p>",
      "rawMarkdown": "row major !?  Could you explain it more detailed ?!  your submission format says (2, 1) means 2, so that it's col-major ?!",
      "votes": null
    },
    {
      "id": "316114",
      "postDate": "04/18/2018 08:05:19",
      "content": "<p>has made the correction in the Data section. </p>",
      "rawMarkdown": "has made the correction in the Data section.",
      "votes": null
    },
    {
      "id": "316134",
      "postDate": "04/18/2018 08:33:07",
      "content": "<p>Again, the index begins  from 1 ?!  or from 0  ？！</p>",
      "rawMarkdown": "Again, the index begins  from 1 ?!  or from 0  ？！",
      "votes": null
    },
    {
      "id": "316138",
      "postDate": "04/18/2018 08:35:13",
      "content": "<p>zero-based indexing</p>",
      "rawMarkdown": "zero-based indexing",
      "votes": null
    },
    {
      "id": "316143",
      "postDate": "04/18/2018 08:42:00",
      "content": "<p>data section : . The pixels are zero-indexed and numbered from top to bottom, then left to right.  Please check</p>",
      "rawMarkdown": "data section : . The pixels are zero-indexed and numbered from top to bottom, then left to right.  Please check",
      "votes": null
    },
    {
      "id": "317940",
      "postDate": "04/22/2018 21:59:16",
      "content": "<p>Is the pixel encoding the same as for the DSB2018 (<a href=\"https://www.kaggle.com/c/data-science-bowl-2018#evaluation\">https://www.kaggle.com/c/data-science-bowl-2018#evaluation</a>)? They don't mention 'row-major' but it appears to be the same and without an example image and corresponding encoding it is tricky to work out (that would be more helpful than a script)</p>",
      "rawMarkdown": "Is the pixel encoding the same as for the DSB2018 (https://www.kaggle.com/c/data-science-bowl-2018#evaluation)? They don't mention 'row-major' but it appears to be the same and without an example image and corresponding encoding it is tricky to work out (that would be more helpful than a script)",
      "votes": null
    },
    {
      "id": "318081",
      "postDate": "04/23/2018 06:57:10",
      "content": "<p>No, it's different: it's zero indexed and order is also different. Here is the code of rle_encoding which I hope is correct (I used it for my poor but non-zero submission):</p>\n\n<pre><code>import numpy as np\n\ndef rle_encoding(x):\n    \"\"\" Run-length encoding based on\n    https://www.kaggle.com/rakhlin/fast-run-length-encoding-python\n    \"\"\"\n    assert x.dtype == np.bool\n    dots = np.where(x.flatten() == 1)[0]\n    run_lengths = []\n    prev = -2\n    for b in dots:\n        if b &gt; prev + 1:\n            run_lengths.append([b, 0])\n        run_lengths[-1][1] += 1\n        prev = b\n    return '|'.join('{} {}'.format(*pair) for pair in run_lengths)\n</code></pre>",
      "rawMarkdown": "No, it's different: it's zero indexed and order is also different. Here is the code of rle_encoding which I hope is correct (I used it for my poor but non-zero submission):\n\n    import numpy as np\n\n    def rle_encoding(x):\n        \"\"\" Run-length encoding based on\n        https://www.kaggle.com/rakhlin/fast-run-length-encoding-python\n        \"\"\"\n        assert x.dtype == np.bool\n        dots = np.where(x.flatten() == 1)[0]\n        run_lengths = []\n        prev = -2\n        for b in dots:\n            if b &gt; prev + 1:\n                run_lengths.append([b, 0])\n            run_lengths[-1][1] += 1\n            prev = b\n        return '|'.join('{} {}'.format(*pair) for pair in run_lengths)",
      "votes": null
    },
    {
      "id": "318101",
      "postDate": "04/23/2018 07:26:13",
      "content": "<p>Great thanks! I wasn't a fan of disentangling the sample script, a nonzero LB score is quite an accomplishment so I'll take it!</p>\n\n<p>So it looks like it is just replacing the x.flatten() with x.T.flatten() and then replacing the space delimeter</p>\n\n<pre><code>def rle_encoding(x):\n    '''\n    x: numpy array of shape (height, width), 1 - mask, 0 - background\n    Returns run length as list\n    '''\n    dots = np.where(x.T.flatten()==1)[0] # .T sets Fortran order down-then-right\n    run_lengths = []\n    prev = -2\n    for b in dots:\n        if (b&gt;prev+1): run_lengths.extend((b+1, 0))\n        run_lengths[-1] += 1\n        prev = b\n    return run_lengths\n\ndef rle_encoding(x):\n    \"\"\" Run-length encoding based on\n    https://www.kaggle.com/rakhlin/fast-run-length-encoding-python\n    \"\"\"\n    assert x.dtype == np.bool\n    dots = np.where(x.flatten() == 1)[0]\n    run_lengths = []\n    prev = -2\n    for b in dots:\n        if b &gt; prev + 1:\n            run_lengths.append([b, 0])\n        run_lengths[-1][1] += 1\n        prev = b\n    return '|'.join('{} {}'.format(*pair) for pair in run_lengths)\n</code></pre>",
      "rawMarkdown": "Great thanks! I wasn't a fan of disentangling the sample script, a nonzero LB score is quite an accomplishment so I'll take it!\n\nSo it looks like it is just replacing the x.flatten() with x.T.flatten() and then replacing the space delimeter\n\n    def rle_encoding(x):\n        '''\n        x: numpy array of shape (height, width), 1 - mask, 0 - background\n        Returns run length as list\n        '''\n        dots = np.where(x.T.flatten()==1)[0] # .T sets Fortran order down-then-right\n        run_lengths = []\n        prev = -2\n        for b in dots:\n            if (b&gt;prev+1): run_lengths.extend((b+1, 0))\n            run_lengths[-1] += 1\n            prev = b\n        return run_lengths\n    \n    def rle_encoding(x):\n        \"\"\" Run-length encoding based on\n        https://www.kaggle.com/rakhlin/fast-run-length-encoding-python\n        \"\"\"\n        assert x.dtype == np.bool\n        dots = np.where(x.flatten() == 1)[0]\n        run_lengths = []\n        prev = -2\n        for b in dots:\n            if b &gt; prev + 1:\n                run_lengths.append([b, 0])\n            run_lengths[-1][1] += 1\n            prev = b\n        return '|'.join('{} {}'.format(*pair) for pair in run_lengths)",
      "votes": null
    },
    {
      "id": "318108",
      "postDate": "04/23/2018 07:41:32",
      "content": "<p>Right, and also <code>b+1</code> with <code>b</code> because it's zero-indexed.</p>",
      "rawMarkdown": "Right, and also ``b+1`` with ``b`` because it's zero-indexed.",
      "votes": null
    },
    {
      "id": "319427",
      "postDate": "04/26/2018 02:55:52",
      "content": "<p>my submission  encountered a error : Your submission timed out after 00:15:00 minutes. What's wrong with this ?</p>",
      "rawMarkdown": "my submission  encountered a error : Your submission timed out after 00:15:00 minutes. What's wrong with this ?",
      "votes": null
    },
    {
      "id": "320680",
      "postDate": "04/29/2018 13:28:35",
      "content": "<p><a href=\"https://en.wikipedia.org/wiki/Row-_and_column-major_order\">https://en.wikipedia.org/wiki/Row-_and_column-major_order</a>\nI'm pretty sure OpenCV is row-major.  I believe the organizers mean col major.\nIn reply to the 1st post it's said it's updated but I still see row-major.\nPlease confirm!</p>",
      "rawMarkdown": "https://en.wikipedia.org/wiki/Row-_and_column-major_order\nI'm pretty sure OpenCV is row-major.  I believe the organizers mean col major.\nIn reply to the 1st post it's said it's updated but I still see row-major.\nPlease confirm!",
      "votes": null
    },
    {
      "id": "320716",
      "postDate": "04/29/2018 15:38:35",
      "content": "<p>I tried the same prediction twice.  When encoded in C order, I got 0.02x.  When encoded in Fortran order, I got 0.  My suspicion is that both my encodings are wrong.</p>",
      "rawMarkdown": "I tried the same prediction twice.  When encoded in C order, I got 0.02x.  When encoded in Fortran order, I got 0.  My suspicion is that both my encodings are wrong.",
      "votes": null
    },
    {
      "id": "321892",
      "postDate": "05/02/2018 05:19:23",
      "content": "<p>Yes, OpenCV is also row-major. The content in the related sections has been updated. Thanks.</p>",
      "rawMarkdown": "Yes, OpenCV is also row-major. The content in the related sections has been updated. Thanks.",
      "votes": null
    },
    {
      "id": "321894",
      "postDate": "05/02/2018 05:22:55",
      "content": "<p>This means there are too many predicted results in your submission.</p>",
      "rawMarkdown": "This means there are too many predicted results in your submission.",
      "votes": null
    },
    {
      "id": "322890",
      "postDate": "05/03/2018 21:18:43",
      "content": "<p>The second of the Important Rules for Submission on this page says:</p>\n\n<p>\"Each image should be encoded in the row-major order, which is the same as Python PIL but different from OpenCV.\"\nSo it still says that OpenCV is NOT row major. </p>\n\n<p>The post I'm replying to right now says, 'Yes, OpenCV is also row-major.'</p>",
      "rawMarkdown": "The second of the Important Rules for Submission on this page says:\n\n\"Each image should be encoded in the row-major order, which is the same as Python PIL but different from OpenCV.\"\nSo it still says that OpenCV is NOT row major. \n\nThe post I'm replying to right now says, 'Yes, OpenCV is also row-major.'",
      "votes": null
    },
    {
      "id": "322958",
      "postDate": "05/04/2018 02:48:15",
      "content": "<p>Updated. Thanks. </p>",
      "rawMarkdown": "Updated. Thanks.",
      "votes": null
    },
    {
      "id": "327352",
      "postDate": "05/11/2018 10:54:23",
      "content": "<p>After reading the discussion forum I am totally confused about the submission format. If my binary mask of an image read by cv2 in python looks like this: \narray([[1, 1, 0, 0],\n       [1, 1, 1, 0],\n       [0, 0, 1, 0]])\nwhat would be the output in submission format?</p>",
      "rawMarkdown": "After reading the discussion forum I am totally confused about the submission format. If my binary mask of an image read by cv2 in python looks like this: \narray([[1, 1, 0, 0],\n       [1, 1, 1, 0],\n       [0, 0, 1, 0]])\nwhat would be the output in submission format?",
      "votes": null
    },
    {
      "id": "327384",
      "postDate": "05/11/2018 12:10:57",
      "content": "<p>I guess using convertVideotoCSV.py should be able to convert to the right output format. Please correct me if I am wrong.</p>",
      "rawMarkdown": "I guess using convertVideotoCSV.py should be able to convert to the right output format. Please correct me if I am wrong.",
      "votes": null
    },
    {
      "id": "327428",
      "postDate": "05/11/2018 14:35:59",
      "content": "<p>What does idmap1d = np.reshape(InstanceMap==200,(-1)) in convertVideotoCSV.py does?\nTo run this file, do I need to dump a segmentation mask for every object instance into a seperate image file? This means that the image files required as an input to convertVideoCSV.py are not in the same format as the image files that we get in train_label? </p>",
      "rawMarkdown": "What does idmap1d = np.reshape(InstanceMap==200,(-1)) in convertVideotoCSV.py does?\nTo run this file, do I need to dump a segmentation mask for every object instance into a seperate image file? This means that the image files required as an input to convertVideoCSV.py are not in the same format as the image files that we get in train_label?",
      "votes": null
    },
    {
      "id": "329133",
      "postDate": "05/15/2018 19:54:45",
      "content": "<p>But in your sample_submission.csv, the columns is in the order : ImageId, LabelId,  PixelCount, Confidence, EncodedPixels........</p>",
      "rawMarkdown": "But in your sample_submission.csv, the columns is in the order : ImageId, LabelId,  PixelCount, Confidence, EncodedPixels........",
      "votes": null
    }
  ],
  "comments": [
    {
      "id": 316104,
      "author_name": "zhuangyq",
      "author_url": "",
      "post_date": "04/18/2018 07:47:02",
      "content": "<p>row major !?  Could you explain it more detailed ?!  your submission format says (2, 1) means 2, so that it's col-major ?!</p>",
      "votes": null,
      "replies": [
        {
          "id": 316114,
          "author_name": "huangxinyu01",
          "author_url": "",
          "post_date": "04/18/2018 08:05:19",
          "content": "<p>has made the correction in the Data section. </p>",
          "votes": null,
          "replies": []
        }
      ]
    },
    {
      "id": 316134,
      "author_name": "zhuangyq",
      "author_url": "",
      "post_date": "04/18/2018 08:33:07",
      "content": "<p>Again, the index begins  from 1 ?!  or from 0  ？！</p>",
      "votes": null,
      "replies": [
        {
          "id": 316138,
          "author_name": "huangxinyu01",
          "author_url": "",
          "post_date": "04/18/2018 08:35:13",
          "content": "<p>zero-based indexing</p>",
          "votes": null,
          "replies": []
        }
      ]
    },
    {
      "id": 316143,
      "author_name": "zhuangyq",
      "author_url": "",
      "post_date": "04/18/2018 08:42:00",
      "content": "<p>data section : . The pixels are zero-indexed and numbered from top to bottom, then left to right.  Please check</p>",
      "votes": null,
      "replies": []
    },
    {
      "id": 317940,
      "author_name": "kmader",
      "author_url": "",
      "post_date": "04/22/2018 21:59:16",
      "content": "<p>Is the pixel encoding the same as for the DSB2018 (<a href=\"https://www.kaggle.com/c/data-science-bowl-2018#evaluation\">https://www.kaggle.com/c/data-science-bowl-2018#evaluation</a>)? They don't mention 'row-major' but it appears to be the same and without an example image and corresponding encoding it is tricky to work out (that would be more helpful than a script)</p>",
      "votes": null,
      "replies": [
        {
          "id": 318081,
          "author_name": "lopuhin",
          "author_url": "",
          "post_date": "04/23/2018 06:57:10",
          "content": "<p>No, it's different: it's zero indexed and order is also different. Here is the code of rle_encoding which I hope is correct (I used it for my poor but non-zero submission):</p>\n\n<pre><code>import numpy as np\n\ndef rle_encoding(x):\n    \"\"\" Run-length encoding based on\n    https://www.kaggle.com/rakhlin/fast-run-length-encoding-python\n    \"\"\"\n    assert x.dtype == np.bool\n    dots = np.where(x.flatten() == 1)[0]\n    run_lengths = []\n    prev = -2\n    for b in dots:\n        if b &gt; prev + 1:\n            run_lengths.append([b, 0])\n        run_lengths[-1][1] += 1\n        prev = b\n    return '|'.join('{} {}'.format(*pair) for pair in run_lengths)\n</code></pre>",
          "votes": null,
          "replies": []
        },
        {
          "id": 318101,
          "author_name": "kmader",
          "author_url": "",
          "post_date": "04/23/2018 07:26:13",
          "content": "<p>Great thanks! I wasn't a fan of disentangling the sample script, a nonzero LB score is quite an accomplishment so I'll take it!</p>\n\n<p>So it looks like it is just replacing the x.flatten() with x.T.flatten() and then replacing the space delimeter</p>\n\n<pre><code>def rle_encoding(x):\n    '''\n    x: numpy array of shape (height, width), 1 - mask, 0 - background\n    Returns run length as list\n    '''\n    dots = np.where(x.T.flatten()==1)[0] # .T sets Fortran order down-then-right\n    run_lengths = []\n    prev = -2\n    for b in dots:\n        if (b&gt;prev+1): run_lengths.extend((b+1, 0))\n        run_lengths[-1] += 1\n        prev = b\n    return run_lengths\n\ndef rle_encoding(x):\n    \"\"\" Run-length encoding based on\n    https://www.kaggle.com/rakhlin/fast-run-length-encoding-python\n    \"\"\"\n    assert x.dtype == np.bool\n    dots = np.where(x.flatten() == 1)[0]\n    run_lengths = []\n    prev = -2\n    for b in dots:\n        if b &gt; prev + 1:\n            run_lengths.append([b, 0])\n        run_lengths[-1][1] += 1\n        prev = b\n    return '|'.join('{} {}'.format(*pair) for pair in run_lengths)\n</code></pre>",
          "votes": null,
          "replies": []
        },
        {
          "id": 318108,
          "author_name": "lopuhin",
          "author_url": "",
          "post_date": "04/23/2018 07:41:32",
          "content": "<p>Right, and also <code>b+1</code> with <code>b</code> because it's zero-indexed.</p>",
          "votes": null,
          "replies": []
        }
      ]
    },
    {
      "id": 319427,
      "author_name": "kekedan",
      "author_url": "",
      "post_date": "04/26/2018 02:55:52",
      "content": "<p>my submission  encountered a error : Your submission timed out after 00:15:00 minutes. What's wrong with this ?</p>",
      "votes": null,
      "replies": [
        {
          "id": 321894,
          "author_name": "huangxinyu01",
          "author_url": "",
          "post_date": "05/02/2018 05:22:55",
          "content": "<p>This means there are too many predicted results in your submission.</p>",
          "votes": null,
          "replies": []
        }
      ]
    },
    {
      "id": 320680,
      "author_name": "aaalgo",
      "author_url": "",
      "post_date": "04/29/2018 13:28:35",
      "content": "<p><a href=\"https://en.wikipedia.org/wiki/Row-_and_column-major_order\">https://en.wikipedia.org/wiki/Row-_and_column-major_order</a>\nI'm pretty sure OpenCV is row-major.  I believe the organizers mean col major.\nIn reply to the 1st post it's said it's updated but I still see row-major.\nPlease confirm!</p>",
      "votes": null,
      "replies": [
        {
          "id": 321892,
          "author_name": "huangxinyu01",
          "author_url": "",
          "post_date": "05/02/2018 05:19:23",
          "content": "<p>Yes, OpenCV is also row-major. The content in the related sections has been updated. Thanks.</p>",
          "votes": null,
          "replies": []
        },
        {
          "id": 322890,
          "author_name": "mattobrien415",
          "author_url": "",
          "post_date": "05/03/2018 21:18:43",
          "content": "<p>The second of the Important Rules for Submission on this page says:</p>\n\n<p>\"Each image should be encoded in the row-major order, which is the same as Python PIL but different from OpenCV.\"\nSo it still says that OpenCV is NOT row major. </p>\n\n<p>The post I'm replying to right now says, 'Yes, OpenCV is also row-major.'</p>",
          "votes": null,
          "replies": []
        },
        {
          "id": 322958,
          "author_name": "huangxinyu01",
          "author_url": "",
          "post_date": "05/04/2018 02:48:15",
          "content": "<p>Updated. Thanks. </p>",
          "votes": null,
          "replies": []
        }
      ]
    },
    {
      "id": 320716,
      "author_name": "aaalgo",
      "author_url": "",
      "post_date": "04/29/2018 15:38:35",
      "content": "<p>I tried the same prediction twice.  When encoded in C order, I got 0.02x.  When encoded in Fortran order, I got 0.  My suspicion is that both my encodings are wrong.</p>",
      "votes": null,
      "replies": []
    },
    {
      "id": 327352,
      "author_name": "natasa1",
      "author_url": "",
      "post_date": "05/11/2018 10:54:23",
      "content": "<p>After reading the discussion forum I am totally confused about the submission format. If my binary mask of an image read by cv2 in python looks like this: \narray([[1, 1, 0, 0],\n       [1, 1, 1, 0],\n       [0, 0, 1, 0]])\nwhat would be the output in submission format?</p>",
      "votes": null,
      "replies": [
        {
          "id": 327384,
          "author_name": "akshaytrivedi",
          "author_url": "",
          "post_date": "05/11/2018 12:10:57",
          "content": "<p>I guess using convertVideotoCSV.py should be able to convert to the right output format. Please correct me if I am wrong.</p>",
          "votes": null,
          "replies": []
        },
        {
          "id": 327428,
          "author_name": "natasa1",
          "author_url": "",
          "post_date": "05/11/2018 14:35:59",
          "content": "<p>What does idmap1d = np.reshape(InstanceMap==200,(-1)) in convertVideotoCSV.py does?\nTo run this file, do I need to dump a segmentation mask for every object instance into a seperate image file? This means that the image files required as an input to convertVideoCSV.py are not in the same format as the image files that we get in train_label? </p>",
          "votes": null,
          "replies": []
        }
      ]
    },
    {
      "id": 329133,
      "author_name": "lingming",
      "author_url": "",
      "post_date": "05/15/2018 19:54:45",
      "content": "<p>But in your sample_submission.csv, the columns is in the order : ImageId, LabelId,  PixelCount, Confidence, EncodedPixels........</p>",
      "votes": null,
      "replies": []
    }
  ],
  "raw_markdown_by_id": {
    "316096": "There are two important rules for submission.\n\n1. Each row in submission must have the following fields with the exact order, `ImageId, LabelId, Confidence, PixelCount, EncodedPixels`\n2. Each image should be encoded in the row-major order.",
    "316104": "row major !?  Could you explain it more detailed ?!  your submission format says (2, 1) means 2, so that it's col-major ?!",
    "316114": "has made the correction in the Data section.",
    "316134": "Again, the index begins  from 1 ?!  or from 0  ？！",
    "316138": "zero-based indexing",
    "316143": "data section : . The pixels are zero-indexed and numbered from top to bottom, then left to right.  Please check",
    "317940": "Is the pixel encoding the same as for the DSB2018 (https://www.kaggle.com/c/data-science-bowl-2018#evaluation)? They don't mention 'row-major' but it appears to be the same and without an example image and corresponding encoding it is tricky to work out (that would be more helpful than a script)",
    "318081": "No, it's different: it's zero indexed and order is also different. Here is the code of rle_encoding which I hope is correct (I used it for my poor but non-zero submission):\n\n    import numpy as np\n\n    def rle_encoding(x):\n        \"\"\" Run-length encoding based on\n        https://www.kaggle.com/rakhlin/fast-run-length-encoding-python\n        \"\"\"\n        assert x.dtype == np.bool\n        dots = np.where(x.flatten() == 1)[0]\n        run_lengths = []\n        prev = -2\n        for b in dots:\n            if b &gt; prev + 1:\n                run_lengths.append([b, 0])\n            run_lengths[-1][1] += 1\n            prev = b\n        return '|'.join('{} {}'.format(*pair) for pair in run_lengths)",
    "318101": "Great thanks! I wasn't a fan of disentangling the sample script, a nonzero LB score is quite an accomplishment so I'll take it!\n\nSo it looks like it is just replacing the x.flatten() with x.T.flatten() and then replacing the space delimeter\n\n    def rle_encoding(x):\n        '''\n        x: numpy array of shape (height, width), 1 - mask, 0 - background\n        Returns run length as list\n        '''\n        dots = np.where(x.T.flatten()==1)[0] # .T sets Fortran order down-then-right\n        run_lengths = []\n        prev = -2\n        for b in dots:\n            if (b&gt;prev+1): run_lengths.extend((b+1, 0))\n            run_lengths[-1] += 1\n            prev = b\n        return run_lengths\n    \n    def rle_encoding(x):\n        \"\"\" Run-length encoding based on\n        https://www.kaggle.com/rakhlin/fast-run-length-encoding-python\n        \"\"\"\n        assert x.dtype == np.bool\n        dots = np.where(x.flatten() == 1)[0]\n        run_lengths = []\n        prev = -2\n        for b in dots:\n            if b &gt; prev + 1:\n                run_lengths.append([b, 0])\n            run_lengths[-1][1] += 1\n            prev = b\n        return '|'.join('{} {}'.format(*pair) for pair in run_lengths)",
    "318108": "Right, and also ``b+1`` with ``b`` because it's zero-indexed.",
    "319427": "my submission  encountered a error : Your submission timed out after 00:15:00 minutes. What's wrong with this ?",
    "320680": "https://en.wikipedia.org/wiki/Row-_and_column-major_order\nI'm pretty sure OpenCV is row-major.  I believe the organizers mean col major.\nIn reply to the 1st post it's said it's updated but I still see row-major.\nPlease confirm!",
    "320716": "I tried the same prediction twice.  When encoded in C order, I got 0.02x.  When encoded in Fortran order, I got 0.  My suspicion is that both my encodings are wrong.",
    "321892": "Yes, OpenCV is also row-major. The content in the related sections has been updated. Thanks.",
    "321894": "This means there are too many predicted results in your submission.",
    "322890": "The second of the Important Rules for Submission on this page says:\n\n\"Each image should be encoded in the row-major order, which is the same as Python PIL but different from OpenCV.\"\nSo it still says that OpenCV is NOT row major. \n\nThe post I'm replying to right now says, 'Yes, OpenCV is also row-major.'",
    "322958": "Updated. Thanks.",
    "327352": "After reading the discussion forum I am totally confused about the submission format. If my binary mask of an image read by cv2 in python looks like this: \narray([[1, 1, 0, 0],\n       [1, 1, 1, 0],\n       [0, 0, 1, 0]])\nwhat would be the output in submission format?",
    "327384": "I guess using convertVideotoCSV.py should be able to convert to the right output format. Please correct me if I am wrong.",
    "327428": "What does idmap1d = np.reshape(InstanceMap==200,(-1)) in convertVideotoCSV.py does?\nTo run this file, do I need to dump a segmentation mask for every object instance into a seperate image file? This means that the image files required as an input to convertVideoCSV.py are not in the same format as the image files that we get in train_label?",
    "329133": "But in your sample_submission.csv, the columns is in the order : ImageId, LabelId,  PixelCount, Confidence, EncodedPixels........"
  },
  "source": "meta"
}