{
  "id": 381810,
  "title": "Downloading the Dataset in JPG format",
  "url": "/competitions/rsna-breast-cancer-detection/discussion/381810",
  "author_name": "Nikhil Narayan",
  "post_date": "2023-01-28T08:26:26.716000",
  "votes": 1,
  "comment_count": 3,
  "views": 0,
  "content": "<p>Any tips on how to download the images in JPG format, and how to convert it to JPG format first using Kaggle Notebooks<br>\nAnd btw guys any tip on how to keep the images, like in the data it's given per patient id, would it do any harm if i try to incorporate them all into one single folder</p>",
  "messages": [
    {
      "id": 2118724,
      "postDate": "2023-01-28T08:26:26.717Z",
      "content": "<p>Any tips on how to download the images in JPG format, and how to convert it to JPG format first using Kaggle Notebooks<br>\nAnd btw guys any tip on how to keep the images, like in the data it's given per patient id, would it do any harm if i try to incorporate them all into one single folder</p>",
      "rawMarkdown": "Any tips on how to download the images in JPG format, and how to convert it to JPG format first using Kaggle Notebooks\nAnd btw guys any tip on how to keep the images, like in the data it's given per patient id, would it do any harm if i try to incorporate them all into one single folder",
      "votes": 1
    },
    {
      "id": 2119261,
      "postDate": "2023-01-28T16:20:48.613Z",
      "content": "<p>use pydicom library to convert dcm image to png/jpg</p>",
      "rawMarkdown": "use pydicom library to convert dcm image to png/jpg"
    },
    {
      "id": 2118908,
      "postDate": "2023-01-28T11:32:23.613Z",
      "content": "<p>Use can Pillow library to convert the image to JPG format. There is nor harm in incorporating all the images in a single folder.<br>\nIn order to maintain the given directory structure you can run a nested for loop (over patient id and image id) check if the directory ./patient_id/image_id exists if it does store that JPG image in that directory else create the directory using !mkdir -p or os.makedirs and then store image. </p>",
      "rawMarkdown": "Use can Pillow library to convert the image to JPG format. There is nor harm in incorporating all the images in a single folder.\nIn order to maintain the given directory structure you can run a nested for loop (over patient id and image id) check if the directory ./patient_id/image_id exists if it does store that JPG image in that directory else create the directory using !mkdir -p or os.makedirs and then store image. "
    },
    {
      "id": 2119254,
      "postDate": "2023-01-28T16:16:28.570Z",
      "rawMarkdown": "",
      "isDeleted": true
    }
  ],
  "comments": [
    {
      "id": 2119261,
      "author_name": "Rahel Sarif",
      "author_url": "",
      "post_date": "2023-01-28T16:20:48.613000",
      "content": "<p>use pydicom library to convert dcm image to png/jpg</p>",
      "votes": 0,
      "replies": []
    },
    {
      "id": 2118908,
      "author_name": "Sashank Talakola",
      "author_url": "",
      "post_date": "2023-01-28T11:32:23.613000",
      "content": "<p>Use can Pillow library to convert the image to JPG format. There is nor harm in incorporating all the images in a single folder.<br>\nIn order to maintain the given directory structure you can run a nested for loop (over patient id and image id) check if the directory ./patient_id/image_id exists if it does store that JPG image in that directory else create the directory using !mkdir -p or os.makedirs and then store image. </p>",
      "votes": 0,
      "replies": []
    },
    {
      "id": 2119254,
      "author_name": "",
      "author_url": "",
      "post_date": "2023-01-28T16:16:28.570000",
      "content": "",
      "votes": 0,
      "replies": []
    }
  ],
  "raw_markdown_by_id": {
    "2118724": "Any tips on how to download the images in JPG format, and how to convert it to JPG format first using Kaggle Notebooks\nAnd btw guys any tip on how to keep the images, like in the data it's given per patient id, would it do any harm if i try to incorporate them all into one single folder",
    "2119261": "use pydicom library to convert dcm image to png/jpg",
    "2118908": "Use can Pillow library to convert the image to JPG format. There is nor harm in incorporating all the images in a single folder.\nIn order to maintain the given directory structure you can run a nested for loop (over patient id and image id) check if the directory ./patient_id/image_id exists if it does store that JPG image in that directory else create the directory using !mkdir -p or os.makedirs and then store image. ",
    "2119254": ""
  }
}