{
  "id": 171768,
  "title": "Data Augmentation Idea: Generating new images when resizing them",
  "url": "/competitions/siim-isic-melanoma-classification/discussion/171768",
  "author_name": "",
  "post_date": "2020-08-02T11:49:46.463979100Z",
  "votes": 1,
  "comment_count": 1,
  "views": 0,
  "content": "<p>Most of images in NNs are reshaped into dimensions like 224x224 while their original dimensions are way bigger than that (sometimes 10x). However, when those images are reshaped, information is to lost since only some pixels (or their average) is selected in the output image. But what if we could eventually keep all of the pixels from the original image and resize it at the same time?</p>\n\n<p>The <a href=\"https://www.youtube.com/watch?v=M07JRzkgaR8\">following optical illusion video</a> has a great idea for addressing that:</p>\n\n<p><strong>Before</strong>\n<img src=\"https://www.googleapis.com/download/storage/v1/b/kaggle-user-content/o/inbox%2F419002%2F97e1e18a78345d4dd8ca0935da554816%2FScreen%20Shot%202020-08-02%20at%2008.46.59.png?generation=1596368866877074&amp;alt=media\" alt=\"\"></p>\n\n<p><strong>After</strong>\n<img src=\"https://www.googleapis.com/download/storage/v1/b/kaggle-user-content/o/inbox%2F419002%2Faf6fe98410dece3974776cf42ef317dc%2FScreen%20Shot%202020-08-02%20at%2008.46.46.png?generation=1596368887629981&amp;alt=media\" alt=\"\"></p>\n\n<p>It could also be a great tool for data augmentation since can generate slightly different images from the original one. Any thought if that would really be effective as a Data Augmentation tool? The algorithm itself could be quite simple. Here’s what I did using MNIST: <a href=\"https://colab.research.google.com/drive/1GfKdqPTuVHk3Uej-UpoaMplkB-mSI06C\">https://colab.research.google.com/drive/1GfKdqPTuVHk3Uej-UpoaMplkB-mSI06C</a></p>",
  "messages": [
    {
      "id": "955152",
      "postDate": "08/02/2020 11:49:46",
      "content": "<p>Most of images in NNs are reshaped into dimensions like 224x224 while their original dimensions are way bigger than that (sometimes 10x). However, when those images are reshaped, information is to lost since only some pixels (or their average) is selected in the output image. But what if we could eventually keep all of the pixels from the original image and resize it at the same time?</p>\n\n<p>The <a href=\"https://www.youtube.com/watch?v=M07JRzkgaR8\">following optical illusion video</a> has a great idea for addressing that:</p>\n\n<p><strong>Before</strong>\n<img src=\"https://www.googleapis.com/download/storage/v1/b/kaggle-user-content/o/inbox%2F419002%2F97e1e18a78345d4dd8ca0935da554816%2FScreen%20Shot%202020-08-02%20at%2008.46.59.png?generation=1596368866877074&amp;alt=media\" alt=\"\"></p>\n\n<p><strong>After</strong>\n<img src=\"https://www.googleapis.com/download/storage/v1/b/kaggle-user-content/o/inbox%2F419002%2Faf6fe98410dece3974776cf42ef317dc%2FScreen%20Shot%202020-08-02%20at%2008.46.46.png?generation=1596368887629981&amp;alt=media\" alt=\"\"></p>\n\n<p>It could also be a great tool for data augmentation since can generate slightly different images from the original one. Any thought if that would really be effective as a Data Augmentation tool? The algorithm itself could be quite simple. Here’s what I did using MNIST: <a href=\"https://colab.research.google.com/drive/1GfKdqPTuVHk3Uej-UpoaMplkB-mSI06C\">https://colab.research.google.com/drive/1GfKdqPTuVHk3Uej-UpoaMplkB-mSI06C</a></p>",
      "rawMarkdown": "Most of images in NNs are reshaped into dimensions like 224x224 while their original dimensions are way bigger than that (sometimes 10x). However, when those images are reshaped, information is to lost since only some pixels (or their average) is selected in the output image. But what if we could eventually keep all of the pixels from the original image and resize it at the same time?\n\nThe [following optical illusion video]( https://www.youtube.com/watch?v=M07JRzkgaR8) has a great idea for addressing that:\n\n**Before**\n![](https://www.googleapis.com/download/storage/v1/b/kaggle-user-content/o/inbox%2F419002%2F97e1e18a78345d4dd8ca0935da554816%2FScreen%20Shot%202020-08-02%20at%2008.46.59.png?generation=1596368866877074&amp;alt=media)\n\n**After**\n![](https://www.googleapis.com/download/storage/v1/b/kaggle-user-content/o/inbox%2F419002%2Faf6fe98410dece3974776cf42ef317dc%2FScreen%20Shot%202020-08-02%20at%2008.46.46.png?generation=1596368887629981&amp;alt=media)\n\n\nIt could also be a great tool for data augmentation since can generate slightly different images from the original one. Any thought if that would really be effective as a Data Augmentation tool? The algorithm itself could be quite simple. Here’s what I did using MNIST: https://colab.research.google.com/drive/1GfKdqPTuVHk3Uej-UpoaMplkB-mSI06C",
      "votes": null
    },
    {
      "id": "955336",
      "postDate": "08/02/2020 15:04:35",
      "content": "<p>I think that an easy way to implement this it to read images bigger than the ones you want to use, apply data augmentation (translation, rotation etc) and then resizing them. It would be interesting to see if it gives better results than resizing and then augmenting.</p>",
      "rawMarkdown": "I think that an easy way to implement this it to read images bigger than the ones you want to use, apply data augmentation (translation, rotation etc) and then resizing them. It would be interesting to see if it gives better results than resizing and then augmenting.",
      "votes": null
    }
  ],
  "comments": [
    {
      "id": 955336,
      "author_name": "abiolatti",
      "author_url": "",
      "post_date": "08/02/2020 15:04:35",
      "content": "<p>I think that an easy way to implement this it to read images bigger than the ones you want to use, apply data augmentation (translation, rotation etc) and then resizing them. It would be interesting to see if it gives better results than resizing and then augmenting.</p>",
      "votes": null,
      "replies": []
    }
  ],
  "raw_markdown_by_id": {
    "955152": "Most of images in NNs are reshaped into dimensions like 224x224 while their original dimensions are way bigger than that (sometimes 10x). However, when those images are reshaped, information is to lost since only some pixels (or their average) is selected in the output image. But what if we could eventually keep all of the pixels from the original image and resize it at the same time?\n\nThe [following optical illusion video]( https://www.youtube.com/watch?v=M07JRzkgaR8) has a great idea for addressing that:\n\n**Before**\n![](https://www.googleapis.com/download/storage/v1/b/kaggle-user-content/o/inbox%2F419002%2F97e1e18a78345d4dd8ca0935da554816%2FScreen%20Shot%202020-08-02%20at%2008.46.59.png?generation=1596368866877074&amp;alt=media)\n\n**After**\n![](https://www.googleapis.com/download/storage/v1/b/kaggle-user-content/o/inbox%2F419002%2Faf6fe98410dece3974776cf42ef317dc%2FScreen%20Shot%202020-08-02%20at%2008.46.46.png?generation=1596368887629981&amp;alt=media)\n\n\nIt could also be a great tool for data augmentation since can generate slightly different images from the original one. Any thought if that would really be effective as a Data Augmentation tool? The algorithm itself could be quite simple. Here’s what I did using MNIST: https://colab.research.google.com/drive/1GfKdqPTuVHk3Uej-UpoaMplkB-mSI06C",
    "955336": "I think that an easy way to implement this it to read images bigger than the ones you want to use, apply data augmentation (translation, rotation etc) and then resizing them. It would be interesting to see if it gives better results than resizing and then augmenting."
  },
  "source": "meta"
}