{
  "id": 335739,
  "title": "How to handle this kind of large size image data (.tif)?",
  "url": "/competitions/mayo-clinic-strip-ai/discussion/335739",
  "author_name": "VK",
  "post_date": "2022-07-07T16:13:37.712000",
  "votes": 10,
  "comment_count": 5,
  "views": 0,
  "content": "<p>This is the first time, I am trying the .tif file data</p>\n<p>I am trying to show my input data ,below code</p>\n<blockquote>\n  <h1>Lets Print a sample</h1>\n  <p>img=tif.imread(os.path.join(train_image_path,str(train.loc[0,'image_id'])+'.tif'))<br>\n  img.shape</p>\n  <h1>plot image</h1>\n  <p>plt.figure(figsize=(5,5))<br>\n  plt.imshow(cv2.cvtColor(img,cv2.COLOR_BGR2RGB))</p>\n</blockquote>\n<p>But memory! restart my notebook</p>\n<p>Suggest how to work! .tif format images</p>",
  "messages": [
    {
      "id": 1847085,
      "postDate": "2022-07-07T16:13:37.713Z",
      "content": "<p>This is the first time, I am trying the .tif file data</p>\n<p>I am trying to show my input data ,below code</p>\n<blockquote>\n  <h1>Lets Print a sample</h1>\n  <p>img=tif.imread(os.path.join(train_image_path,str(train.loc[0,'image_id'])+'.tif'))<br>\n  img.shape</p>\n  <h1>plot image</h1>\n  <p>plt.figure(figsize=(5,5))<br>\n  plt.imshow(cv2.cvtColor(img,cv2.COLOR_BGR2RGB))</p>\n</blockquote>\n<p>But memory! restart my notebook</p>\n<p>Suggest how to work! .tif format images</p>",
      "rawMarkdown": "This is the first time, I am trying the .tif file data\n\nI am trying to show my input data ,below code\n\n> # Lets Print a sample\nimg=tif.imread(os.path.join(train_image_path,str(train.loc[0,'image_id'])+'.tif'))\nimg.shape\n> #plot image\nplt.figure(figsize=(5,5))\nplt.imshow(cv2.cvtColor(img,cv2.COLOR_BGR2RGB))\n\nBut memory! restart my notebook\n\nSuggest how to work! .tif format images",
      "votes": 10
    },
    {
      "id": 1848508,
      "postDate": "2022-07-08T17:13:53.783Z",
      "content": "<p>You can read it with Pillow just need to set the higher max image size, see my notebook with resize and crop…<br>\n<a href=\"https://www.kaggle.com/code/jirkaborovec/bloodclots-classif-eda-load-crop-images\" target=\"_blank\">https://www.kaggle.com/code/jirkaborovec/bloodclots-classif-eda-load-crop-images</a></p>",
      "rawMarkdown": "You can read it with Pillow just need to set the higher max image size, see my notebook with resize and crop...\nhttps://www.kaggle.com/code/jirkaborovec/bloodclots-classif-eda-load-crop-images",
      "votes": 3,
      "replies": [
        {
          "id": 1848865,
          "postDate": "2022-07-09T02:26:36.110Z",
          "content": "<p>Yes! I saw your notebook 📓 and try it own<br>\nI like it buddy <br>\nThanks for sharing 👍 </p>",
          "rawMarkdown": "Yes! I saw your notebook 📓 and try it own\nI like it buddy \nThanks for sharing 👍 "
        }
      ]
    },
    {
      "id": 1847229,
      "postDate": "2022-07-07T18:17:04.697Z",
      "content": "<p><a href=\"https://www.kaggle.com/competitions/mayo-clinic-strip-ai/discussion/335758\" target=\"_blank\">https://www.kaggle.com/competitions/mayo-clinic-strip-ai/discussion/335758</a></p>",
      "rawMarkdown": "https://www.kaggle.com/competitions/mayo-clinic-strip-ai/discussion/335758",
      "votes": 1
    },
    {
      "id": 1848501,
      "postDate": "2022-07-08T17:08:08.800Z",
      "content": "<p>Hi! </p>\n<p>You can use <code>rasterio</code> to handle heavy images, as it doesn't load the whole image into memory at once</p>",
      "rawMarkdown": "Hi! \n\nYou can use `rasterio` to handle heavy images, as it doesn't load the whole image into memory at once",
      "votes": 2,
      "replies": [
        {
          "id": 1848866,
          "postDate": "2022-07-09T02:27:15.693Z",
          "content": "<p>Thanks buddy! Definitely i will try </p>",
          "rawMarkdown": "Thanks buddy! Definitely i will try ",
          "votes": 1
        }
      ]
    }
  ],
  "comments": [
    {
      "id": 1848508,
      "author_name": "Jirka",
      "author_url": "",
      "post_date": "2022-07-08T17:13:53.783000",
      "content": "<p>You can read it with Pillow just need to set the higher max image size, see my notebook with resize and crop…<br>\n<a href=\"https://www.kaggle.com/code/jirkaborovec/bloodclots-classif-eda-load-crop-images\" target=\"_blank\">https://www.kaggle.com/code/jirkaborovec/bloodclots-classif-eda-load-crop-images</a></p>",
      "votes": 3,
      "replies": [
        {
          "id": 1848865,
          "author_name": "VK",
          "author_url": "",
          "post_date": "2022-07-09T02:26:36.110000",
          "content": "<p>Yes! I saw your notebook 📓 and try it own<br>\nI like it buddy <br>\nThanks for sharing 👍 </p>",
          "votes": 0,
          "replies": []
        }
      ]
    },
    {
      "id": 1847229,
      "author_name": "VikashGupta",
      "author_url": "",
      "post_date": "2022-07-07T18:17:04.697000",
      "content": "<p><a href=\"https://www.kaggle.com/competitions/mayo-clinic-strip-ai/discussion/335758\" target=\"_blank\">https://www.kaggle.com/competitions/mayo-clinic-strip-ai/discussion/335758</a></p>",
      "votes": 1,
      "replies": []
    },
    {
      "id": 1848501,
      "author_name": "Nikita Kuzmenkov",
      "author_url": "",
      "post_date": "2022-07-08T17:08:08.800000",
      "content": "<p>Hi! </p>\n<p>You can use <code>rasterio</code> to handle heavy images, as it doesn't load the whole image into memory at once</p>",
      "votes": 2,
      "replies": [
        {
          "id": 1848866,
          "author_name": "VK",
          "author_url": "",
          "post_date": "2022-07-09T02:27:15.693000",
          "content": "<p>Thanks buddy! Definitely i will try </p>",
          "votes": 1,
          "replies": []
        }
      ]
    }
  ],
  "raw_markdown_by_id": {
    "1847085": "This is the first time, I am trying the .tif file data\n\nI am trying to show my input data ,below code\n\n> # Lets Print a sample\nimg=tif.imread(os.path.join(train_image_path,str(train.loc[0,'image_id'])+'.tif'))\nimg.shape\n> #plot image\nplt.figure(figsize=(5,5))\nplt.imshow(cv2.cvtColor(img,cv2.COLOR_BGR2RGB))\n\nBut memory! restart my notebook\n\nSuggest how to work! .tif format images",
    "1848508": "You can read it with Pillow just need to set the higher max image size, see my notebook with resize and crop...\nhttps://www.kaggle.com/code/jirkaborovec/bloodclots-classif-eda-load-crop-images",
    "1847229": "https://www.kaggle.com/competitions/mayo-clinic-strip-ai/discussion/335758",
    "1848501": "Hi! \n\nYou can use `rasterio` to handle heavy images, as it doesn't load the whole image into memory at once"
  }
}