{
  "id": 98953,
  "title": "PAD+Resize or Resize",
  "url": "/competitions/aptos2019-blindness-detection/discussion/98953",
  "author_name": "",
  "post_date": "2019-07-07T20:33:14.933966300Z",
  "votes": null,
  "comment_count": 4,
  "views": 0,
  "content": "<p>What is the best way to resize the dataset to the same size?\nI tried to use PAD for this:\n<img src=\"https://www.googleapis.com/download/storage/v1/b/kaggle-user-content/o/inbox%2F1313949%2Fe60799dc577d9b8f3d273da6764d9b2f%2F.png?generation=1562531496177334&amp;alt=media\" alt=\"\">\nI think PAD+Resize is better than just Resize\nOr maybe there is another more effective way to do it?</p>",
  "messages": [
    {
      "id": "570127",
      "postDate": "07/07/2019 20:33:14",
      "content": "<p>What is the best way to resize the dataset to the same size?\nI tried to use PAD for this:\n<img src=\"https://www.googleapis.com/download/storage/v1/b/kaggle-user-content/o/inbox%2F1313949%2Fe60799dc577d9b8f3d273da6764d9b2f%2F.png?generation=1562531496177334&amp;alt=media\" alt=\"\">\nI think PAD+Resize is better than just Resize\nOr maybe there is another more effective way to do it?</p>",
      "rawMarkdown": "What is the best way to resize the dataset to the same size?\nI tried to use PAD for this:\n![](https://www.googleapis.com/download/storage/v1/b/kaggle-user-content/o/inbox%2F1313949%2Fe60799dc577d9b8f3d273da6764d9b2f%2F.png?generation=1562531496177334&amp;alt=media)\nI think PAD+Resize is better than just Resize\nOr maybe there is another more effective way to do it?",
      "votes": null
    },
    {
      "id": "570148",
      "postDate": "07/07/2019 22:00:26",
      "content": "<p>Hi! <a href=\"/ihelon\">@ihelon</a>,  I been using the Keras library for Image pre-processing, is quite effective\n<a href=\"https://keras.io/preprocessing/image/\">https://keras.io/preprocessing/image/</a></p>",
      "rawMarkdown": "Hi! @ihelon,  I been using the Keras library for Image pre-processing, is quite effective\nhttps://keras.io/preprocessing/image/",
      "votes": null
    },
    {
      "id": "570162",
      "postDate": "07/07/2019 23:32:41",
      "content": "<p>I understand this makes it possible to create new samples of images from existing ones. But there is nothing about transforming data to one size</p>",
      "rawMarkdown": "I understand this makes it possible to create new samples of images from existing ones. But there is nothing about transforming data to one size",
      "votes": null
    },
    {
      "id": "570198",
      "postDate": "07/08/2019 01:45:26",
      "content": "<p>When you call the generator you can specify the size for example:\ntrain_generator = train_datagen.flow_from_directory(\n        'data/train',\n        <strong>target_size=(150, 150),</strong>\n        batch_size=32,\n        class_mode='binary')</p>",
      "rawMarkdown": "When you call the generator you can specify the size for example:\ntrain_generator = train_datagen.flow_from_directory(\n        'data/train',\n        **target_size=(150, 150),**\n        batch_size=32,\n        class_mode='binary')",
      "votes": null
    },
    {
      "id": "571279",
      "postDate": "07/09/2019 12:46:38",
      "content": "<p>Can I specify which method (CROP, PAD, SQUISH) to use for resizing?</p>",
      "rawMarkdown": "Can I specify which method (CROP, PAD, SQUISH) to use for resizing?",
      "votes": null
    }
  ],
  "comments": [
    {
      "id": 570148,
      "author_name": "cv13j0",
      "author_url": "",
      "post_date": "07/07/2019 22:00:26",
      "content": "<p>Hi! <a href=\"/ihelon\">@ihelon</a>,  I been using the Keras library for Image pre-processing, is quite effective\n<a href=\"https://keras.io/preprocessing/image/\">https://keras.io/preprocessing/image/</a></p>",
      "votes": null,
      "replies": [
        {
          "id": 570162,
          "author_name": "ihelon",
          "author_url": "",
          "post_date": "07/07/2019 23:32:41",
          "content": "<p>I understand this makes it possible to create new samples of images from existing ones. But there is nothing about transforming data to one size</p>",
          "votes": null,
          "replies": []
        },
        {
          "id": 570198,
          "author_name": "cv13j0",
          "author_url": "",
          "post_date": "07/08/2019 01:45:26",
          "content": "<p>When you call the generator you can specify the size for example:\ntrain_generator = train_datagen.flow_from_directory(\n        'data/train',\n        <strong>target_size=(150, 150),</strong>\n        batch_size=32,\n        class_mode='binary')</p>",
          "votes": null,
          "replies": []
        },
        {
          "id": 571279,
          "author_name": "ihelon",
          "author_url": "",
          "post_date": "07/09/2019 12:46:38",
          "content": "<p>Can I specify which method (CROP, PAD, SQUISH) to use for resizing?</p>",
          "votes": null,
          "replies": []
        }
      ]
    }
  ],
  "raw_markdown_by_id": {
    "570127": "What is the best way to resize the dataset to the same size?\nI tried to use PAD for this:\n![](https://www.googleapis.com/download/storage/v1/b/kaggle-user-content/o/inbox%2F1313949%2Fe60799dc577d9b8f3d273da6764d9b2f%2F.png?generation=1562531496177334&amp;alt=media)\nI think PAD+Resize is better than just Resize\nOr maybe there is another more effective way to do it?",
    "570148": "Hi! @ihelon,  I been using the Keras library for Image pre-processing, is quite effective\nhttps://keras.io/preprocessing/image/",
    "570162": "I understand this makes it possible to create new samples of images from existing ones. But there is nothing about transforming data to one size",
    "570198": "When you call the generator you can specify the size for example:\ntrain_generator = train_datagen.flow_from_directory(\n        'data/train',\n        **target_size=(150, 150),**\n        batch_size=32,\n        class_mode='binary')",
    "571279": "Can I specify which method (CROP, PAD, SQUISH) to use for resizing?"
  },
  "source": "meta"
}