{
  "id": 98113,
  "title": "How to deal with inconsistent image shapes?",
  "url": "/competitions/aptos2019-blindness-detection/discussion/98113",
  "author_name": "",
  "post_date": "2019-07-01T10:48:57.058820100Z",
  "votes": null,
  "comment_count": 5,
  "views": 0,
  "content": "<p><img src=\"https://www.googleapis.com/download/storage/v1/b/kaggle-user-content/o/inbox%2F2216708%2F519b2edddf69f7d7e1b1ccc2cf645633%2Fheights.png?generation=1561977890706772&amp;alt=media\" alt=\"\">\n<img src=\"https://www.googleapis.com/download/storage/v1/b/kaggle-user-content/o/inbox%2F2216708%2Fb58d5df3bb53174ed1f3b3fce5b180e0%2Fwidths.png?generation=1561977895332955&amp;alt=media\" alt=\"\"></p>\n\n<p>The provided images have varying image shapes, how to deal with this best? I am considering a patch-based strategy, however to my understanding this could result in patches that contain no properties from the associated class. This might compromise classifier performance. How do you handle the different image shapes?</p>",
  "messages": [
    {
      "id": "565761",
      "postDate": "07/01/2019 10:48:57",
      "content": "<p><img src=\"https://www.googleapis.com/download/storage/v1/b/kaggle-user-content/o/inbox%2F2216708%2F519b2edddf69f7d7e1b1ccc2cf645633%2Fheights.png?generation=1561977890706772&amp;alt=media\" alt=\"\">\n<img src=\"https://www.googleapis.com/download/storage/v1/b/kaggle-user-content/o/inbox%2F2216708%2Fb58d5df3bb53174ed1f3b3fce5b180e0%2Fwidths.png?generation=1561977895332955&amp;alt=media\" alt=\"\"></p>\n\n<p>The provided images have varying image shapes, how to deal with this best? I am considering a patch-based strategy, however to my understanding this could result in patches that contain no properties from the associated class. This might compromise classifier performance. How do you handle the different image shapes?</p>",
      "rawMarkdown": "![](https://www.googleapis.com/download/storage/v1/b/kaggle-user-content/o/inbox%2F2216708%2F519b2edddf69f7d7e1b1ccc2cf645633%2Fheights.png?generation=1561977890706772&amp;alt=media)\n![](https://www.googleapis.com/download/storage/v1/b/kaggle-user-content/o/inbox%2F2216708%2Fb58d5df3bb53174ed1f3b3fce5b180e0%2Fwidths.png?generation=1561977895332955&amp;alt=media)\n\nThe provided images have varying image shapes, how to deal with this best? I am considering a patch-based strategy, however to my understanding this could result in patches that contain no properties from the associated class. This might compromise classifier performance. How do you handle the different image shapes?",
      "votes": null
    },
    {
      "id": "565793",
      "postDate": "07/01/2019 11:45:01",
      "content": "<p>Usually, all images are resized to the same height and width value (eg.) 224x224</p>",
      "rawMarkdown": "Usually, all images are resized to the same height and width value (eg.) 224x224",
      "votes": null
    },
    {
      "id": "565875",
      "postDate": "07/01/2019 13:37:09",
      "content": "<p>For the current score simple resizing seems to work, but you may consider padding, cropping or even combination all of it</p>",
      "rawMarkdown": "For the current score simple resizing seems to work, but you may consider padding, cropping or even combination all of it",
      "votes": null
    },
    {
      "id": "567146",
      "postDate": "07/03/2019 05:30:19",
      "content": "<p>Hi! <a href=\"/ppepijn\">@ppepijn</a> I'm using the TensorFlow/Keras ImageDataGenerator method to resize my images while the model is being trained\n<a href=\"https://www.tensorflow.org/api_docs/python/tf/keras/preprocessing/image/ImageDataGeneratorHi\">https://www.tensorflow.org/api_docs/python/tf/keras/preprocessing/image/ImageDataGeneratorHi</a>! <a href=\"/ppepijn\">@ppepijn</a> I'm using the TensorFlow/Keras ImageDataGenerator method to resize my images while the model is being trained\n<a href=\"https://www.tensorflow.org/api_docs/python/tf/keras/preprocessing/image/ImageDataGenerator\">https://www.tensorflow.org/api_docs/python/tf/keras/preprocessing/image/ImageDataGenerator</a></p>",
      "rawMarkdown": "Hi! @ppepijn I'm using the TensorFlow/Keras ImageDataGenerator method to resize my images while the model is being trained\nhttps://www.tensorflow.org/api_docs/python/tf/keras/preprocessing/image/ImageDataGeneratorHi! @ppepijn I'm using the TensorFlow/Keras ImageDataGenerator method to resize my images while the model is being trained\nhttps://www.tensorflow.org/api_docs/python/tf/keras/preprocessing/image/ImageDataGenerator",
      "votes": null
    },
    {
      "id": "568675",
      "postDate": "07/05/2019 09:35:42",
      "content": "<p>What is the average training time for you? </p>",
      "rawMarkdown": "What is the average training time for you?",
      "votes": null
    },
    {
      "id": "588837",
      "postDate": "07/31/2019 05:55:53",
      "content": "<p>I am following very well written image preprocessing kernel\n<a href=\"https://www.kaggle.com/ratthachat/aptos-updatedv14-preprocessing-ben-s-cropping\">https://www.kaggle.com/ratthachat/aptos-updatedv14-preprocessing-ben-s-cropping</a>\nYou can also try above kernel.</p>",
      "rawMarkdown": "I am following very well written image preprocessing kernel\nhttps://www.kaggle.com/ratthachat/aptos-updatedv14-preprocessing-ben-s-cropping\nYou can also try above kernel.",
      "votes": null
    }
  ],
  "comments": [
    {
      "id": 565793,
      "author_name": "manimaranp",
      "author_url": "",
      "post_date": "07/01/2019 11:45:01",
      "content": "<p>Usually, all images are resized to the same height and width value (eg.) 224x224</p>",
      "votes": null,
      "replies": []
    },
    {
      "id": 565875,
      "author_name": "insaff",
      "author_url": "",
      "post_date": "07/01/2019 13:37:09",
      "content": "<p>For the current score simple resizing seems to work, but you may consider padding, cropping or even combination all of it</p>",
      "votes": null,
      "replies": []
    },
    {
      "id": 567146,
      "author_name": "cv13j0",
      "author_url": "",
      "post_date": "07/03/2019 05:30:19",
      "content": "<p>Hi! <a href=\"/ppepijn\">@ppepijn</a> I'm using the TensorFlow/Keras ImageDataGenerator method to resize my images while the model is being trained\n<a href=\"https://www.tensorflow.org/api_docs/python/tf/keras/preprocessing/image/ImageDataGeneratorHi\">https://www.tensorflow.org/api_docs/python/tf/keras/preprocessing/image/ImageDataGeneratorHi</a>! <a href=\"/ppepijn\">@ppepijn</a> I'm using the TensorFlow/Keras ImageDataGenerator method to resize my images while the model is being trained\n<a href=\"https://www.tensorflow.org/api_docs/python/tf/keras/preprocessing/image/ImageDataGenerator\">https://www.tensorflow.org/api_docs/python/tf/keras/preprocessing/image/ImageDataGenerator</a></p>",
      "votes": null,
      "replies": [
        {
          "id": 568675,
          "author_name": "nitin29",
          "author_url": "",
          "post_date": "07/05/2019 09:35:42",
          "content": "<p>What is the average training time for you? </p>",
          "votes": null,
          "replies": []
        }
      ]
    },
    {
      "id": 588837,
      "author_name": "writetoneeraj",
      "author_url": "",
      "post_date": "07/31/2019 05:55:53",
      "content": "<p>I am following very well written image preprocessing kernel\n<a href=\"https://www.kaggle.com/ratthachat/aptos-updatedv14-preprocessing-ben-s-cropping\">https://www.kaggle.com/ratthachat/aptos-updatedv14-preprocessing-ben-s-cropping</a>\nYou can also try above kernel.</p>",
      "votes": null,
      "replies": []
    }
  ],
  "raw_markdown_by_id": {
    "565761": "![](https://www.googleapis.com/download/storage/v1/b/kaggle-user-content/o/inbox%2F2216708%2F519b2edddf69f7d7e1b1ccc2cf645633%2Fheights.png?generation=1561977890706772&amp;alt=media)\n![](https://www.googleapis.com/download/storage/v1/b/kaggle-user-content/o/inbox%2F2216708%2Fb58d5df3bb53174ed1f3b3fce5b180e0%2Fwidths.png?generation=1561977895332955&amp;alt=media)\n\nThe provided images have varying image shapes, how to deal with this best? I am considering a patch-based strategy, however to my understanding this could result in patches that contain no properties from the associated class. This might compromise classifier performance. How do you handle the different image shapes?",
    "565793": "Usually, all images are resized to the same height and width value (eg.) 224x224",
    "565875": "For the current score simple resizing seems to work, but you may consider padding, cropping or even combination all of it",
    "567146": "Hi! @ppepijn I'm using the TensorFlow/Keras ImageDataGenerator method to resize my images while the model is being trained\nhttps://www.tensorflow.org/api_docs/python/tf/keras/preprocessing/image/ImageDataGeneratorHi! @ppepijn I'm using the TensorFlow/Keras ImageDataGenerator method to resize my images while the model is being trained\nhttps://www.tensorflow.org/api_docs/python/tf/keras/preprocessing/image/ImageDataGenerator",
    "568675": "What is the average training time for you?",
    "588837": "I am following very well written image preprocessing kernel\nhttps://www.kaggle.com/ratthachat/aptos-updatedv14-preprocessing-ben-s-cropping\nYou can also try above kernel."
  },
  "source": "meta"
}