{
  "id": 54569,
  "title": "Evaluation Exception error",
  "url": "/competitions/data-science-bowl-2018/discussion/54569",
  "author_name": "William Green",
  "post_date": "2018-04-15T05:16:38.061000",
  "votes": 0,
  "comment_count": 12,
  "views": 0,
  "content": "<p>I am racking my brain trying to figure why I am getting this error. I check the submission file and it's indeed mission solution ids. Any idea what can be causing this error? </p>\n\n<p>Evaluation Exception: The submitted ids must contain all solution ids.</p>",
  "messages": [
    {
      "id": 314479,
      "postDate": "2018-04-15T16:43:07.937Z",
      "content": "<p>I got the Evaluation Exception: The same pixel may not be assigned to two different objects.\n.  weird......</p>",
      "rawMarkdown": "I got the Evaluation Exception: The same pixel may not be assigned to two different objects.\n.  weird......",
      "votes": 1,
      "replies": [
        {
          "id": 314514,
          "postDate": "2018-04-15T18:02:10.783Z",
          "content": "<p>Same issue after adding image id-s without any detected nuclei. I have double- and triple-checked that there is no overlap anywhere. Yet...</p>",
          "rawMarkdown": "Same issue after adding image id-s without any detected nuclei. I have double- and triple-checked that there is no overlap anywhere. Yet..."
        }
      ]
    },
    {
      "id": 314300,
      "postDate": "2018-04-15T07:32:23.840Z",
      "content": "<p>Hello.\nThe sample file 'stage2_sample_submission_final.csv.zip' has all the IDs.\nJust to be sure, you should compare IDs of your submission file with IDs of sample file.</p>",
      "rawMarkdown": "Hello.\nThe sample file 'stage2_sample_submission_final.csv.zip' has all the IDs.\nJust to be sure, you should compare IDs of your submission file with IDs of sample file."
    },
    {
      "id": 314284,
      "postDate": "2018-04-15T06:05:44.563Z",
      "content": "<p>Hi as @Mehul pointed out, this will sort the error. <br>\nThe code by @See in this thread <a href=\"https://www.kaggle.com/c/data-science-bowl-2018/discussion/54295#314103\">https://www.kaggle.com/c/data-science-bowl-2018/discussion/54295#314103</a> helped me a lot </p>",
      "rawMarkdown": "Hi as @Mehul pointed out, this will sort the error.  \nThe code by @See in this thread https://www.kaggle.com/c/data-science-bowl-2018/discussion/54295#314103 helped me a lot "
    },
    {
      "id": 314279,
      "postDate": "2018-04-15T05:21:30.320Z",
      "content": "<p>Hi William, \nI had the same issue. do you have some code like this ? </p>\n\n<p>for i in range(predicts.shape[2]): \n        rle = rle_encoding(predicts[:,:,i])\n        if len(rle)&gt;0:\n            ImageId.append(img_name)\n            EncodedPixels.append(rle) </p>\n\n<p>What you need to add is if len(rle)==0, then just append an empty string in Encoded pixels. </p>",
      "rawMarkdown": "Hi William, \nI had the same issue. do you have some code like this ? \n\n\n for i in range(predicts.shape[2]): \n        rle = rle_encoding(predicts[:,:,i])\n        if len(rle)&gt;0:\n            ImageId.append(img_name)\n            EncodedPixels.append(rle) \n\n\nWhat you need to add is if len(rle)==0, then just append an empty string in Encoded pixels. \n",
      "replies": [
        {
          "id": 314471,
          "postDate": "2018-04-15T16:23:24.343Z",
          "content": "<p>Should it be changed like so:</p>\n\n<pre><code>for i in range(predicts.shape[2]):\n    rle = run_length_encoding(predicts[:,:,i])\n    if len(rle)==0:\n        ImageId.append(img_name)\n        EncodedPixels.append(rle)\nreturn ImageId, EncodedPixels\n</code></pre>",
          "rawMarkdown": "Should it be changed like so:\n\n    for i in range(predicts.shape[2]):\n        rle = run_length_encoding(predicts[:,:,i])\n        if len(rle)==0:\n            ImageId.append(img_name)\n            EncodedPixels.append(rle)\n    return ImageId, EncodedPixels\n\n\n          "
        },
        {
          "id": 314528,
          "postDate": "2018-04-15T18:37:53.147Z",
          "content": "<p>I did this: \nif len(rle)==0:\n        ImageId.append(img_name)\n        EncodedPixels.append(\" \")\nif len(rle)&gt;0:\n        ImageId.append(img_name)\n        EncodedPixels.append(rle)\nThe other option is to use the script from here: \n<a href=\"https://www.kaggle.com/c/data-science-bowl-2018/discussion/54295#312816\">https://www.kaggle.com/c/data-science-bowl-2018/discussion/54295#312816</a></p>",
          "rawMarkdown": "I did this: \nif len(rle)==0:\n        ImageId.append(img_name)\n        EncodedPixels.append(\" \")\nif len(rle)&gt;0:\n        ImageId.append(img_name)\n        EncodedPixels.append(rle)\nThe other option is to use the script from here: \nhttps://www.kaggle.com/c/data-science-bowl-2018/discussion/54295#312816"
        },
        {
          "id": 314537,
          "postDate": "2018-04-15T19:11:02.250Z",
          "content": "<p>Thank you Mehul. I am testing it now. I greatly appreciate your assistance and prompt reply. </p>",
          "rawMarkdown": "Thank you Mehul. I am testing it now. I greatly appreciate your assistance and prompt reply. "
        },
        {
          "id": 314655,
          "postDate": "2018-04-16T03:32:32.460Z",
          "content": "<p>Should it be like so:</p>\n\n<pre><code>    for i in range(predicts.shape[2]):\n    rle = run_length_encoding(predicts[:,:,i])\n    if len(rle)==0:\n        ImageId.append(img_name)\n        EncodedPixels.append(\" \")\n       else:\n            if len(rle)&gt;0: \n                  ImageId.append(img_name)\n                  EncodedPixels.append(rle)\nreturn ImageId, EncodedPixels\n</code></pre>",
          "rawMarkdown": "Should it be like so:\n\n        for i in range(predicts.shape[2]):\n        rle = run_length_encoding(predicts[:,:,i])\n        if len(rle)==0:\n            ImageId.append(img_name)\n            EncodedPixels.append(\" \")\n           else:\n                if len(rle)&gt;0: \n                      ImageId.append(img_name)\n                      EncodedPixels.append(rle)\n    return ImageId, EncodedPixels\n"
        },
        {
          "id": 314657,
          "postDate": "2018-04-16T03:41:30.413Z",
          "rawMarkdown": "",
          "isDeleted": true
        },
        {
          "id": 314660,
          "postDate": "2018-04-16T03:46:21.807Z",
          "content": "<p>May I ask will it work...!?</p>\n\n<p>```</p>\n\n<pre><code>preds_test_upsampled = []\nfor i in range(len(preds_test)):\n    preds_test_upsampled.append(cv2.resize(preds_test[i], \n                                       (sizes_test[i][1], sizes_test[i][0])))\n\n\ntest_ids = next(os.walk(test_path))[1]\nnew_test_ids = []\nrles = []\nemty_id=[]\n\n\n\nfor n, id_ in enumerate(test_ids):\n    rle = list(prob_to_rles(preds_test_upsampled[n]))\n    rles.extend(rle)\n    if len(rle)==0:\n            new_test_ids.extend([id_])\n            emty_id.append(id_)\n    else:\n            new_test_ids.extend([id_] * len(rle))\n</code></pre>\n\n<p>```               </p>",
          "rawMarkdown": "May I ask will it work...!?\n\n```\n\n    preds_test_upsampled = []\n    for i in range(len(preds_test)):\n        preds_test_upsampled.append(cv2.resize(preds_test[i], \n                                           (sizes_test[i][1], sizes_test[i][0])))\n        \n        \n    test_ids = next(os.walk(test_path))[1]\n    new_test_ids = []\n    rles = []\n    emty_id=[]\n    \n    \n    \n    for n, id_ in enumerate(test_ids):\n        rle = list(prob_to_rles(preds_test_upsampled[n]))\n        rles.extend(rle)\n        if len(rle)==0:\n                new_test_ids.extend([id_])\n                emty_id.append(id_)\n        else:\n                new_test_ids.extend([id_] * len(rle))\n\n```               "
        }
      ]
    },
    {
      "id": 314278,
      "postDate": "2018-04-15T05:16:38.060Z",
      "content": "<p>I am racking my brain trying to figure why I am getting this error. I check the submission file and it's indeed mission solution ids. Any idea what can be causing this error? </p>\n\n<p>Evaluation Exception: The submitted ids must contain all solution ids.</p>",
      "rawMarkdown": "I am racking my brain trying to figure why I am getting this error. I check the submission file and it's indeed mission solution ids. Any idea what can be causing this error? \n\nEvaluation Exception: The submitted ids must contain all solution ids."
    },
    {
      "id": 314515,
      "postDate": "2018-04-15T18:08:04.717Z",
      "rawMarkdown": "",
      "isDeleted": true
    }
  ],
  "comments": [
    {
      "id": 314479,
      "author_name": "Eric Chan",
      "author_url": "",
      "post_date": "2018-04-15T16:43:07.937000",
      "content": "<p>I got the Evaluation Exception: The same pixel may not be assigned to two different objects.\n.  weird......</p>",
      "votes": 1,
      "replies": [
        {
          "id": 314514,
          "author_name": "Quark02",
          "author_url": "",
          "post_date": "2018-04-15T18:02:10.783000",
          "content": "<p>Same issue after adding image id-s without any detected nuclei. I have double- and triple-checked that there is no overlap anywhere. Yet...</p>",
          "votes": 0,
          "replies": []
        }
      ]
    },
    {
      "id": 314300,
      "author_name": "Eiji-K",
      "author_url": "",
      "post_date": "2018-04-15T07:32:23.840000",
      "content": "<p>Hello.\nThe sample file 'stage2_sample_submission_final.csv.zip' has all the IDs.\nJust to be sure, you should compare IDs of your submission file with IDs of sample file.</p>",
      "votes": 0,
      "replies": []
    },
    {
      "id": 314284,
      "author_name": "VikramanK",
      "author_url": "",
      "post_date": "2018-04-15T06:05:44.563000",
      "content": "<p>Hi as @Mehul pointed out, this will sort the error. <br>\nThe code by @See in this thread <a href=\"https://www.kaggle.com/c/data-science-bowl-2018/discussion/54295#314103\">https://www.kaggle.com/c/data-science-bowl-2018/discussion/54295#314103</a> helped me a lot </p>",
      "votes": 0,
      "replies": []
    },
    {
      "id": 314279,
      "author_name": "Mehul Sampat",
      "author_url": "",
      "post_date": "2018-04-15T05:21:30.320000",
      "content": "<p>Hi William, \nI had the same issue. do you have some code like this ? </p>\n\n<p>for i in range(predicts.shape[2]): \n        rle = rle_encoding(predicts[:,:,i])\n        if len(rle)&gt;0:\n            ImageId.append(img_name)\n            EncodedPixels.append(rle) </p>\n\n<p>What you need to add is if len(rle)==0, then just append an empty string in Encoded pixels. </p>",
      "votes": 0,
      "replies": [
        {
          "id": 314471,
          "author_name": "William Green",
          "author_url": "",
          "post_date": "2018-04-15T16:23:24.343000",
          "content": "<p>Should it be changed like so:</p>\n\n<pre><code>for i in range(predicts.shape[2]):\n    rle = run_length_encoding(predicts[:,:,i])\n    if len(rle)==0:\n        ImageId.append(img_name)\n        EncodedPixels.append(rle)\nreturn ImageId, EncodedPixels\n</code></pre>",
          "votes": 0,
          "replies": []
        },
        {
          "id": 314528,
          "author_name": "Mehul Sampat",
          "author_url": "",
          "post_date": "2018-04-15T18:37:53.147000",
          "content": "<p>I did this: \nif len(rle)==0:\n        ImageId.append(img_name)\n        EncodedPixels.append(\" \")\nif len(rle)&gt;0:\n        ImageId.append(img_name)\n        EncodedPixels.append(rle)\nThe other option is to use the script from here: \n<a href=\"https://www.kaggle.com/c/data-science-bowl-2018/discussion/54295#312816\">https://www.kaggle.com/c/data-science-bowl-2018/discussion/54295#312816</a></p>",
          "votes": 0,
          "replies": []
        },
        {
          "id": 314537,
          "author_name": "William Green",
          "author_url": "",
          "post_date": "2018-04-15T19:11:02.250000",
          "content": "<p>Thank you Mehul. I am testing it now. I greatly appreciate your assistance and prompt reply. </p>",
          "votes": 0,
          "replies": []
        },
        {
          "id": 314655,
          "author_name": "William Green",
          "author_url": "",
          "post_date": "2018-04-16T03:32:32.460000",
          "content": "<p>Should it be like so:</p>\n\n<pre><code>    for i in range(predicts.shape[2]):\n    rle = run_length_encoding(predicts[:,:,i])\n    if len(rle)==0:\n        ImageId.append(img_name)\n        EncodedPixels.append(\" \")\n       else:\n            if len(rle)&gt;0: \n                  ImageId.append(img_name)\n                  EncodedPixels.append(rle)\nreturn ImageId, EncodedPixels\n</code></pre>",
          "votes": 0,
          "replies": []
        },
        {
          "id": 314657,
          "author_name": "",
          "author_url": "",
          "post_date": "2018-04-16T03:41:30.413000",
          "content": "",
          "votes": 0,
          "replies": []
        },
        {
          "id": 314660,
          "author_name": "Eric Chan",
          "author_url": "",
          "post_date": "2018-04-16T03:46:21.807000",
          "content": "<p>May I ask will it work...!?</p>\n\n<p>```</p>\n\n<pre><code>preds_test_upsampled = []\nfor i in range(len(preds_test)):\n    preds_test_upsampled.append(cv2.resize(preds_test[i], \n                                       (sizes_test[i][1], sizes_test[i][0])))\n\n\ntest_ids = next(os.walk(test_path))[1]\nnew_test_ids = []\nrles = []\nemty_id=[]\n\n\n\nfor n, id_ in enumerate(test_ids):\n    rle = list(prob_to_rles(preds_test_upsampled[n]))\n    rles.extend(rle)\n    if len(rle)==0:\n            new_test_ids.extend([id_])\n            emty_id.append(id_)\n    else:\n            new_test_ids.extend([id_] * len(rle))\n</code></pre>\n\n<p>```               </p>",
          "votes": 0,
          "replies": []
        }
      ]
    },
    {
      "id": 314515,
      "author_name": "",
      "author_url": "",
      "post_date": "2018-04-15T18:08:04.717000",
      "content": "",
      "votes": 0,
      "replies": []
    }
  ],
  "raw_markdown_by_id": {
    "314479": "I got the Evaluation Exception: The same pixel may not be assigned to two different objects.\n.  weird......",
    "314300": "Hello.\nThe sample file 'stage2_sample_submission_final.csv.zip' has all the IDs.\nJust to be sure, you should compare IDs of your submission file with IDs of sample file.",
    "314284": "Hi as @Mehul pointed out, this will sort the error.  \nThe code by @See in this thread https://www.kaggle.com/c/data-science-bowl-2018/discussion/54295#314103 helped me a lot ",
    "314279": "Hi William, \nI had the same issue. do you have some code like this ? \n\n\n for i in range(predicts.shape[2]): \n        rle = rle_encoding(predicts[:,:,i])\n        if len(rle)&gt;0:\n            ImageId.append(img_name)\n            EncodedPixels.append(rle) \n\n\nWhat you need to add is if len(rle)==0, then just append an empty string in Encoded pixels. \n",
    "314278": "I am racking my brain trying to figure why I am getting this error. I check the submission file and it's indeed mission solution ids. Any idea what can be causing this error? \n\nEvaluation Exception: The submitted ids must contain all solution ids.",
    "314515": ""
  }
}