{
  "id": 39780,
  "title": "Data augmentation",
  "url": "/competitions/cdiscount-image-classification-challenge/discussion/39780",
  "author_name": "",
  "post_date": "2017-09-20T22:26:46.631275400Z",
  "votes": 1,
  "comment_count": 4,
  "views": 0,
  "content": "<p>I'm interested in augmenting the image data with translations and flips. I have already split the data according to the method in <a href=\"https://www.kaggle.com/bguberfain/not-so-naive-way-to-convert-bson-to-files\">this kernel</a>, which creates a separate folder for each class. </p>\n\n<p>What I want to know is, how can I augment the data without saving the augmentations? Is there a way to have a 50% chance of using an original image and a 50% chance of using an augmented image created on the fly?</p>",
  "messages": [
    {
      "id": "223024",
      "postDate": "09/20/2017 22:26:46",
      "content": "<p>I'm interested in augmenting the image data with translations and flips. I have already split the data according to the method in <a href=\"https://www.kaggle.com/bguberfain/not-so-naive-way-to-convert-bson-to-files\">this kernel</a>, which creates a separate folder for each class. </p>\n\n<p>What I want to know is, how can I augment the data without saving the augmentations? Is there a way to have a 50% chance of using an original image and a 50% chance of using an augmented image created on the fly?</p>",
      "rawMarkdown": "I'm interested in augmenting the image data with translations and flips. I have already split the data according to the method in [this kernel][1], which creates a separate folder for each class. \n\nWhat I want to know is, how can I augment the data without saving the augmentations? Is there a way to have a 50% chance of using an original image and a 50% chance of using an augmented image created on the fly?\n\n  [1]: https://www.kaggle.com/bguberfain/not-so-naive-way-to-convert-bson-to-files",
      "votes": null
    },
    {
      "id": "223026",
      "postDate": "09/20/2017 22:30:05",
      "content": "<p>If you are using Keras, have you considered using ImageDataGenerator? (<a href=\"https://keras.io/preprocessing/image/\">https://keras.io/preprocessing/image/</a>)</p>",
      "rawMarkdown": "If you are using Keras, have you considered using ImageDataGenerator? (https://keras.io/preprocessing/image/)",
      "votes": null
    },
    {
      "id": "223049",
      "postDate": "09/21/2017 00:58:55",
      "content": "<p>That looks like what I'm looking for, thanks! </p>",
      "rawMarkdown": "That looks like what I'm looking for, thanks!",
      "votes": null
    },
    {
      "id": "223364",
      "postDate": "09/22/2017 03:13:22",
      "content": "<p>Hi, what is your means of translations?</p>",
      "rawMarkdown": "Hi, what is your means of translations?",
      "votes": null
    },
    {
      "id": "223586",
      "postDate": "09/22/2017 17:06:30",
      "content": "<p>So if you use <a href=\"https://keras.io/preprocessing/image/\">this</a> Keras image generator, as recommended by Nic, the width_shift_range and height_shift_range arguments represent translation proportions. I'm going to try 0.05 and 0.10 to start with, and see if it improves results. </p>",
      "rawMarkdown": "So if you use [this][1] Keras image generator, as recommended by Nic, the width_shift_range and height_shift_range arguments represent translation proportions. I'm going to try 0.05 and 0.10 to start with, and see if it improves results. \n\n\n  [1]: https://keras.io/preprocessing/image/",
      "votes": null
    }
  ],
  "comments": [
    {
      "id": 223026,
      "author_name": "ndahlquist",
      "author_url": "",
      "post_date": "09/20/2017 22:30:05",
      "content": "<p>If you are using Keras, have you considered using ImageDataGenerator? (<a href=\"https://keras.io/preprocessing/image/\">https://keras.io/preprocessing/image/</a>)</p>",
      "votes": null,
      "replies": [
        {
          "id": 223049,
          "author_name": "dangusbeas",
          "author_url": "",
          "post_date": "09/21/2017 00:58:55",
          "content": "<p>That looks like what I'm looking for, thanks! </p>",
          "votes": null,
          "replies": []
        }
      ]
    },
    {
      "id": 223364,
      "author_name": "zhangsongwei",
      "author_url": "",
      "post_date": "09/22/2017 03:13:22",
      "content": "<p>Hi, what is your means of translations?</p>",
      "votes": null,
      "replies": [
        {
          "id": 223586,
          "author_name": "dangusbeas",
          "author_url": "",
          "post_date": "09/22/2017 17:06:30",
          "content": "<p>So if you use <a href=\"https://keras.io/preprocessing/image/\">this</a> Keras image generator, as recommended by Nic, the width_shift_range and height_shift_range arguments represent translation proportions. I'm going to try 0.05 and 0.10 to start with, and see if it improves results. </p>",
          "votes": null,
          "replies": []
        }
      ]
    }
  ],
  "raw_markdown_by_id": {
    "223024": "I'm interested in augmenting the image data with translations and flips. I have already split the data according to the method in [this kernel][1], which creates a separate folder for each class. \n\nWhat I want to know is, how can I augment the data without saving the augmentations? Is there a way to have a 50% chance of using an original image and a 50% chance of using an augmented image created on the fly?\n\n  [1]: https://www.kaggle.com/bguberfain/not-so-naive-way-to-convert-bson-to-files",
    "223026": "If you are using Keras, have you considered using ImageDataGenerator? (https://keras.io/preprocessing/image/)",
    "223049": "That looks like what I'm looking for, thanks!",
    "223364": "Hi, what is your means of translations?",
    "223586": "So if you use [this][1] Keras image generator, as recommended by Nic, the width_shift_range and height_shift_range arguments represent translation proportions. I'm going to try 0.05 and 0.10 to start with, and see if it improves results. \n\n\n  [1]: https://keras.io/preprocessing/image/"
  },
  "source": "meta"
}