{
  "id": 54303,
  "title": "Stage 2 Data Problems With The Matterport Implementation",
  "url": "/competitions/data-science-bowl-2018/discussion/54303",
  "author_name": "",
  "post_date": "2018-04-12T01:58:39.494115100Z",
  "votes": 1,
  "comment_count": 6,
  "views": 0,
  "content": "<p>Hi,</p>\n\n<p>I tried running the matterport mask rcnn submission code on the stage 2 test data with this</p>\n\n<pre>python3 nucleus.py detect --dataset='/content/.kaggle/competitions/data-science-bowl-2018/' --subset=stage2_test --weights='./model.h5' \n</pre>\n\n<p>but it returns this error message </p>\n\n<pre>Running on /content/.kaggle/competitions/data-science-bowl-2018/\nTraceback (most recent call last):\n  File \"nucleus.py\", line 486, in \n    detect(model, args.dataset, args.subset)\n  File \"nucleus.py\", line 383, in detect\n    rle = mask_to_rle(source_id, r[\"masks\"], r[\"scores\"])\n  File \"nucleus.py\", line 342, in mask_to_rle\n    mask = np.max(mask * np.reshape(order, [1, 1, -1]), -1)\nValueError: operands could not be broadcast together with shapes (0,28,28) (1,1,0) \n</pre>\n\n<p>Does anyone know why this is happening and how to fix it ?</p>\n\n<p>Thanks</p>",
  "messages": [
    {
      "id": "312575",
      "postDate": "04/12/2018 01:58:39",
      "content": "<p>Hi,</p>\n\n<p>I tried running the matterport mask rcnn submission code on the stage 2 test data with this</p>\n\n<pre>python3 nucleus.py detect --dataset='/content/.kaggle/competitions/data-science-bowl-2018/' --subset=stage2_test --weights='./model.h5' \n</pre>\n\n<p>but it returns this error message </p>\n\n<pre>Running on /content/.kaggle/competitions/data-science-bowl-2018/\nTraceback (most recent call last):\n  File \"nucleus.py\", line 486, in \n    detect(model, args.dataset, args.subset)\n  File \"nucleus.py\", line 383, in detect\n    rle = mask_to_rle(source_id, r[\"masks\"], r[\"scores\"])\n  File \"nucleus.py\", line 342, in mask_to_rle\n    mask = np.max(mask * np.reshape(order, [1, 1, -1]), -1)\nValueError: operands could not be broadcast together with shapes (0,28,28) (1,1,0) \n</pre>\n\n<p>Does anyone know why this is happening and how to fix it ?</p>\n\n<p>Thanks</p>",
      "rawMarkdown": "Hi,\n\nI tried running the matterport mask rcnn submission code on the stage 2 test data with this\n<pre>python3 nucleus.py detect --dataset='/content/.kaggle/competitions/data-science-bowl-2018/' --subset=stage2_test --weights='./model.h5' \n</pre>\n\n but it returns this error message \n\n<pre>Running on /content/.kaggle/competitions/data-science-bowl-2018/\nTraceback (most recent call last):\n  File \"nucleus.py\", line 486, in </pre>\n\nDoes anyone know why this is happening and how to fix it ?\n\nThanks",
      "votes": null
    },
    {
      "id": "312582",
      "postDate": "04/12/2018 02:09:11",
      "content": "<p>same issue .</p>",
      "rawMarkdown": "same issue .",
      "votes": null
    },
    {
      "id": "312586",
      "postDate": "04/12/2018 02:16:44",
      "content": "<p>same issue for me!!! anyone can help???</p>",
      "rawMarkdown": "same issue for me!!! anyone can help???",
      "votes": null
    },
    {
      "id": "312590",
      "postDate": "04/12/2018 02:26:55",
      "content": "<p>We get that for 223fcf1a3652bb711ab3b4f3d160938022df2a31dd39b46e2a5c592e333dd21c.png looks like it is garbage.</p>",
      "rawMarkdown": "We get that for 223fcf1a3652bb711ab3b4f3d160938022df2a31dd39b46e2a5c592e333dd21c.png looks like it is garbage.",
      "votes": null
    },
    {
      "id": "312594",
      "postDate": "04/12/2018 02:41:20",
      "content": "<p>it's the same way after i delete 223fcf1a3652bb711ab3b4f3d160938022df2a31dd39b46e2a5c592e333dd21c.png  it must be some problem else</p>",
      "rawMarkdown": "it's the same way after i delete 223fcf1a3652bb711ab3b4f3d160938022df2a31dd39b46e2a5c592e333dd21c.png  it must be some problem else",
      "votes": null
    },
    {
      "id": "312596",
      "postDate": "04/12/2018 02:43:35",
      "content": "<p>There are many more. I just ignored all the images with mask shape (0, x, x) from when calculating rle.</p>",
      "rawMarkdown": "There are many more. I just ignored all the images with mask shape (0, x, x) from when calculating rle.",
      "votes": null
    },
    {
      "id": "312619",
      "postDate": "04/12/2018 03:50:31",
      "content": "<p>Not really sure but after looking at some error image I find there're some of the images completely dark so no neuclei found and the model just returns a empty mask.  So for now I just skip them by change</p>\n\n<p><code>rle = mask_to_rle(source_id, r[\"masks\"], r[\"scores\"])</code></p>\n\n<p>to sample_submission like</p>\n\n<p><code>rle = mask_to_rle(source_id, r[\"masks\"], r[\"scores\"]) if len(r[\"scores\"]) &gt; 0 else \"{}, {} {}\".format(image_id, 1, 1)</code></p>",
      "rawMarkdown": "Not really sure but after looking at some error image I find there're some of the images completely dark so no neuclei found and the model just returns a empty mask.  So for now I just skip them by change\n\n```rle = mask_to_rle(source_id, r[\"masks\"], r[\"scores\"])```\n\nto sample_submission like\n\n```rle = mask_to_rle(source_id, r[\"masks\"], r[\"scores\"]) if len(r[\"scores\"]) &gt; 0 else \"{}, {} {}\".format(image_id, 1, 1)```",
      "votes": null
    }
  ],
  "comments": [
    {
      "id": 312582,
      "author_name": "lizaozhang",
      "author_url": "",
      "post_date": "04/12/2018 02:09:11",
      "content": "<p>same issue .</p>",
      "votes": null,
      "replies": []
    },
    {
      "id": 312586,
      "author_name": "anniezhang2018",
      "author_url": "",
      "post_date": "04/12/2018 02:16:44",
      "content": "<p>same issue for me!!! anyone can help???</p>",
      "votes": null,
      "replies": []
    },
    {
      "id": 312590,
      "author_name": "akilaw",
      "author_url": "",
      "post_date": "04/12/2018 02:26:55",
      "content": "<p>We get that for 223fcf1a3652bb711ab3b4f3d160938022df2a31dd39b46e2a5c592e333dd21c.png looks like it is garbage.</p>",
      "votes": null,
      "replies": []
    },
    {
      "id": 312594,
      "author_name": "anniezhang2018",
      "author_url": "",
      "post_date": "04/12/2018 02:41:20",
      "content": "<p>it's the same way after i delete 223fcf1a3652bb711ab3b4f3d160938022df2a31dd39b46e2a5c592e333dd21c.png  it must be some problem else</p>",
      "votes": null,
      "replies": [
        {
          "id": 312596,
          "author_name": "akilaw",
          "author_url": "",
          "post_date": "04/12/2018 02:43:35",
          "content": "<p>There are many more. I just ignored all the images with mask shape (0, x, x) from when calculating rle.</p>",
          "votes": null,
          "replies": []
        }
      ]
    },
    {
      "id": 312619,
      "author_name": "johnfarrell",
      "author_url": "",
      "post_date": "04/12/2018 03:50:31",
      "content": "<p>Not really sure but after looking at some error image I find there're some of the images completely dark so no neuclei found and the model just returns a empty mask.  So for now I just skip them by change</p>\n\n<p><code>rle = mask_to_rle(source_id, r[\"masks\"], r[\"scores\"])</code></p>\n\n<p>to sample_submission like</p>\n\n<p><code>rle = mask_to_rle(source_id, r[\"masks\"], r[\"scores\"]) if len(r[\"scores\"]) &gt; 0 else \"{}, {} {}\".format(image_id, 1, 1)</code></p>",
      "votes": null,
      "replies": []
    }
  ],
  "raw_markdown_by_id": {
    "312575": "Hi,\n\nI tried running the matterport mask rcnn submission code on the stage 2 test data with this\n<pre>python3 nucleus.py detect --dataset='/content/.kaggle/competitions/data-science-bowl-2018/' --subset=stage2_test --weights='./model.h5' \n</pre>\n\n but it returns this error message \n\n<pre>Running on /content/.kaggle/competitions/data-science-bowl-2018/\nTraceback (most recent call last):\n  File \"nucleus.py\", line 486, in </pre>\n\nDoes anyone know why this is happening and how to fix it ?\n\nThanks",
    "312582": "same issue .",
    "312586": "same issue for me!!! anyone can help???",
    "312590": "We get that for 223fcf1a3652bb711ab3b4f3d160938022df2a31dd39b46e2a5c592e333dd21c.png looks like it is garbage.",
    "312594": "it's the same way after i delete 223fcf1a3652bb711ab3b4f3d160938022df2a31dd39b46e2a5c592e333dd21c.png  it must be some problem else",
    "312596": "There are many more. I just ignored all the images with mask shape (0, x, x) from when calculating rle.",
    "312619": "Not really sure but after looking at some error image I find there're some of the images completely dark so no neuclei found and the model just returns a empty mask.  So for now I just skip them by change\n\n```rle = mask_to_rle(source_id, r[\"masks\"], r[\"scores\"])```\n\nto sample_submission like\n\n```rle = mask_to_rle(source_id, r[\"masks\"], r[\"scores\"]) if len(r[\"scores\"]) &gt; 0 else \"{}, {} {}\".format(image_id, 1, 1)```"
  },
  "source": "meta"
}