{
  "id": 197549,
  "title": "How to load input dataset?",
  "url": "/competitions/hubmap-kidney-segmentation/discussion/197549",
  "author_name": "",
  "post_date": "2020-11-17T01:08:27.855645900Z",
  "votes": 3,
  "comment_count": 2,
  "views": 0,
  "content": "<p>I am trying to visualize all the input images. But, i keep getting the following error with few images. Can someone help me out with how to correctly load and display these images?</p>\n<p><code>img: 095bf7a1f.tiff</code></p>\n<blockquote>\n  <p>error: TypeError: Invalid shape (1, 1, 3, 38160, 39000) for image data</p>\n</blockquote>\n<p>Note: I tried with <code>matplotlib.image</code>  and i got the following error</p>\n<blockquote>\n  <p>UnidentifiedImageError: cannot identify image file '../input/hubmap-kidney-segmentation/train/095bf7a1f.tiff'</p>\n</blockquote>",
  "messages": [
    {
      "id": "1081304",
      "postDate": "11/17/2020 01:08:27",
      "content": "<p>I am trying to visualize all the input images. But, i keep getting the following error with few images. Can someone help me out with how to correctly load and display these images?</p>\n<p><code>img: 095bf7a1f.tiff</code></p>\n<blockquote>\n  <p>error: TypeError: Invalid shape (1, 1, 3, 38160, 39000) for image data</p>\n</blockquote>\n<p>Note: I tried with <code>matplotlib.image</code>  and i got the following error</p>\n<blockquote>\n  <p>UnidentifiedImageError: cannot identify image file '../input/hubmap-kidney-segmentation/train/095bf7a1f.tiff'</p>\n</blockquote>",
      "rawMarkdown": "I am trying to visualize all the input images. But, i keep getting the following error with few images. Can someone help me out with how to correctly load and display these images?\n\n`img: 095bf7a1f.tiff`\n\n> error: TypeError: Invalid shape (1, 1, 3, 38160, 39000) for image data\n\nNote: I tried with `matplotlib.image`  and i got the following error\n> UnidentifiedImageError: cannot identify image file '../input/hubmap-kidney-segmentation/train/095bf7a1f.tiff'",
      "votes": null
    },
    {
      "id": "1081361",
      "postDate": "11/17/2020 03:09:11",
      "content": "<p><a href=\"https://www.kaggle.com/rawwar\" target=\"_blank\">@rawwar</a>: I have just uploaded a Notebook that shows how to read images. Some are channel 1st, some channel last, you need to swap the axes in some cases, more details here:<br>\n<a href=\"https://www.kaggle.com/marcosnovaes/hubmap-read-data-and-build-tfrecords\" target=\"_blank\">https://www.kaggle.com/marcosnovaes/hubmap-read-data-and-build-tfrecords</a></p>",
      "rawMarkdown": "rawwar: I have just uploaded a Notebook that shows how to read images. Some are channel 1st, some channel last, you need to swap the axes in some cases, more details here:\n[https://www.kaggle.com/marcosnovaes/hubmap-read-data-and-build-tfrecords](https://www.kaggle.com/marcosnovaes/hubmap-read-data-and-build-tfrecords)",
      "votes": null
    },
    {
      "id": "1220134",
      "postDate": "02/27/2021 16:02:15",
      "content": "<p>Use np.squeeze </p>",
      "rawMarkdown": "Use np.squeeze",
      "votes": null
    }
  ],
  "comments": [
    {
      "id": 1081361,
      "author_name": "marcosnovaes",
      "author_url": "",
      "post_date": "11/17/2020 03:09:11",
      "content": "<p><a href=\"https://www.kaggle.com/rawwar\" target=\"_blank\">@rawwar</a>: I have just uploaded a Notebook that shows how to read images. Some are channel 1st, some channel last, you need to swap the axes in some cases, more details here:<br>\n<a href=\"https://www.kaggle.com/marcosnovaes/hubmap-read-data-and-build-tfrecords\" target=\"_blank\">https://www.kaggle.com/marcosnovaes/hubmap-read-data-and-build-tfrecords</a></p>",
      "votes": null,
      "replies": []
    },
    {
      "id": 1220134,
      "author_name": "arpitjoshi333",
      "author_url": "",
      "post_date": "02/27/2021 16:02:15",
      "content": "<p>Use np.squeeze </p>",
      "votes": null,
      "replies": []
    }
  ],
  "raw_markdown_by_id": {
    "1081304": "I am trying to visualize all the input images. But, i keep getting the following error with few images. Can someone help me out with how to correctly load and display these images?\n\n`img: 095bf7a1f.tiff`\n\n> error: TypeError: Invalid shape (1, 1, 3, 38160, 39000) for image data\n\nNote: I tried with `matplotlib.image`  and i got the following error\n> UnidentifiedImageError: cannot identify image file '../input/hubmap-kidney-segmentation/train/095bf7a1f.tiff'",
    "1081361": "rawwar: I have just uploaded a Notebook that shows how to read images. Some are channel 1st, some channel last, you need to swap the axes in some cases, more details here:\n[https://www.kaggle.com/marcosnovaes/hubmap-read-data-and-build-tfrecords](https://www.kaggle.com/marcosnovaes/hubmap-read-data-and-build-tfrecords)",
    "1220134": "Use np.squeeze"
  },
  "source": "meta"
}