{
  "id": 133185,
  "title": "perspective transform using OpenCV with tf?",
  "url": "/competitions/flower-classification-with-tpus/discussion/133185",
  "author_name": "",
  "post_date": "2020-03-01T07:06:28.022236500Z",
  "votes": 7,
  "comment_count": 5,
  "views": 0,
  "content": "<p>Has anyone tried perspective transform augmentation using TensorFlow?. I was able to augment images using openCV. But I want to perform the same on tf. Some functionality like this was available in previous tf versions but in don't know how to do this in tf2.1.</p>\n\n<p>Here is the kernel link fo the same.\n<a href=\"https://www.kaggle.com/gskdhiman/eda-effect-of-augmentation\">https://www.kaggle.com/gskdhiman/eda-effect-of-augmentation</a>\nfunction: four_point_transform</p>",
  "messages": [
    {
      "id": "760355",
      "postDate": "03/01/2020 07:06:28",
      "content": "<p>Has anyone tried perspective transform augmentation using TensorFlow?. I was able to augment images using openCV. But I want to perform the same on tf. Some functionality like this was available in previous tf versions but in don't know how to do this in tf2.1.</p>\n\n<p>Here is the kernel link fo the same.\n<a href=\"https://www.kaggle.com/gskdhiman/eda-effect-of-augmentation\">https://www.kaggle.com/gskdhiman/eda-effect-of-augmentation</a>\nfunction: four_point_transform</p>",
      "rawMarkdown": "Has anyone tried perspective transform augmentation using TensorFlow?. I was able to augment images using openCV. But I want to perform the same on tf. Some functionality like this was available in previous tf versions but in don't know how to do this in tf2.1.\n\nHere is the kernel link fo the same.\nhttps://www.kaggle.com/gskdhiman/eda-effect-of-augmentation\nfunction: four_point_transform",
      "votes": null
    },
    {
      "id": "761749",
      "postDate": "03/02/2020 22:24:03",
      "content": "<p>Thanks for the linked notebook. The transformations look very interesting indeed. Visually close to the original flowers while still changing many pixels.</p>\n\n<p>I do not have a direct answer but I can link to other posts where people have been working on data augmentation with TPUs:\n- <a href=\"https://www.kaggle.com/c/flower-classification-with-tpus/discussion/132191\">How To - Rotation Augmentation GPU/TPU</a>\n- <a href=\"https://www.kaggle.com/c/flower-classification-with-tpus/discussion/133168\">Make Chris Deotte's data augmentation faster</a>\n- <a href=\"https://www.kaggle.com/c/flower-classification-with-tpus/discussion/132935\">How To - CutMix and MixUp on GPU/TPU</a>\n- <a href=\"https://www.kaggle.com/c/flower-classification-with-tpus/discussion/132986\">GridMask data augmentation on GPU/TPU</a>\nedited ot add:\n- <a href=\"https://www.kaggle.com/c/flower-classification-with-tpus/discussion/134557\">Perspective transformation in Tensorflow</a>\n- <a href=\"https://www.kaggle.com/c/flower-classification-with-tpus/discussion/134264\">batch implementation of more data augmentations</a>\n- <a href=\"https://www.kaggle.com/c/flower-classification-with-tpus/discussion/133296\">Oversampling the training dataset</a></p>",
      "rawMarkdown": "Thanks for the linked notebook. The transformations look very interesting indeed. Visually close to the original flowers while still changing many pixels.\n\nI do not have a direct answer but I can link to other posts where people have been working on data augmentation with TPUs:\n- [How To - Rotation Augmentation GPU/TPU](https://www.kaggle.com/c/flower-classification-with-tpus/discussion/132191)\n- [Make Chris Deotte's data augmentation faster](https://www.kaggle.com/c/flower-classification-with-tpus/discussion/133168)\n- [How To - CutMix and MixUp on GPU/TPU](https://www.kaggle.com/c/flower-classification-with-tpus/discussion/132935)\n- [GridMask data augmentation on GPU/TPU](https://www.kaggle.com/c/flower-classification-with-tpus/discussion/132986)\nedited ot add:\n- [Perspective transformation in Tensorflow](https://www.kaggle.com/c/flower-classification-with-tpus/discussion/134557)\n- [batch implementation of more data augmentations](https://www.kaggle.com/c/flower-classification-with-tpus/discussion/134264)\n- [Oversampling the training dataset](https://www.kaggle.com/c/flower-classification-with-tpus/discussion/133296)",
      "votes": null
    },
    {
      "id": "762256",
      "postDate": "03/03/2020 11:26:26",
      "content": "<p>Try Using ImageDataGenerator in Tensorflow to perform DataAugmentation  </p>",
      "rawMarkdown": "Try Using ImageDataGenerator in Tensorflow to perform DataAugmentation",
      "votes": null
    },
    {
      "id": "762634",
      "postDate": "03/03/2020 17:02:21",
      "content": "<p>ImageDataGenerator will not work on TPU yet</p>",
      "rawMarkdown": "ImageDataGenerator will not work on TPU yet",
      "votes": null
    },
    {
      "id": "766932",
      "postDate": "03/09/2020 00:11:52",
      "content": "<p><a href=\"/gskdhiman\">@gskdhiman</a> , now, you can have perspective. See <a href=\"https://www.kaggle.com/c/flower-classification-with-tpus/discussion/134557\">Perspective transformation in Tensorflow</a>. :)</p>",
      "rawMarkdown": "gskdhiman , now, you can have perspective. See [Perspective transformation in Tensorflow](https://www.kaggle.com/c/flower-classification-with-tpus/discussion/134557). :)",
      "votes": null
    },
    {
      "id": "767488",
      "postDate": "03/09/2020 17:36:05",
      "content": "<p>Hey Thanks, \nI will look into your post. :)</p>",
      "rawMarkdown": "Hey Thanks, \nI will look into your post. :)",
      "votes": null
    }
  ],
  "comments": [
    {
      "id": 761749,
      "author_name": "mgorner",
      "author_url": "",
      "post_date": "03/02/2020 22:24:03",
      "content": "<p>Thanks for the linked notebook. The transformations look very interesting indeed. Visually close to the original flowers while still changing many pixels.</p>\n\n<p>I do not have a direct answer but I can link to other posts where people have been working on data augmentation with TPUs:\n- <a href=\"https://www.kaggle.com/c/flower-classification-with-tpus/discussion/132191\">How To - Rotation Augmentation GPU/TPU</a>\n- <a href=\"https://www.kaggle.com/c/flower-classification-with-tpus/discussion/133168\">Make Chris Deotte's data augmentation faster</a>\n- <a href=\"https://www.kaggle.com/c/flower-classification-with-tpus/discussion/132935\">How To - CutMix and MixUp on GPU/TPU</a>\n- <a href=\"https://www.kaggle.com/c/flower-classification-with-tpus/discussion/132986\">GridMask data augmentation on GPU/TPU</a>\nedited ot add:\n- <a href=\"https://www.kaggle.com/c/flower-classification-with-tpus/discussion/134557\">Perspective transformation in Tensorflow</a>\n- <a href=\"https://www.kaggle.com/c/flower-classification-with-tpus/discussion/134264\">batch implementation of more data augmentations</a>\n- <a href=\"https://www.kaggle.com/c/flower-classification-with-tpus/discussion/133296\">Oversampling the training dataset</a></p>",
      "votes": null,
      "replies": []
    },
    {
      "id": 762256,
      "author_name": "dhanushthakkalapally",
      "author_url": "",
      "post_date": "03/03/2020 11:26:26",
      "content": "<p>Try Using ImageDataGenerator in Tensorflow to perform DataAugmentation  </p>",
      "votes": null,
      "replies": [
        {
          "id": 762634,
          "author_name": "mgorner",
          "author_url": "",
          "post_date": "03/03/2020 17:02:21",
          "content": "<p>ImageDataGenerator will not work on TPU yet</p>",
          "votes": null,
          "replies": []
        }
      ]
    },
    {
      "id": 766932,
      "author_name": "yihdarshieh",
      "author_url": "",
      "post_date": "03/09/2020 00:11:52",
      "content": "<p><a href=\"/gskdhiman\">@gskdhiman</a> , now, you can have perspective. See <a href=\"https://www.kaggle.com/c/flower-classification-with-tpus/discussion/134557\">Perspective transformation in Tensorflow</a>. :)</p>",
      "votes": null,
      "replies": [
        {
          "id": 767488,
          "author_name": "gskdhiman",
          "author_url": "",
          "post_date": "03/09/2020 17:36:05",
          "content": "<p>Hey Thanks, \nI will look into your post. :)</p>",
          "votes": null,
          "replies": []
        }
      ]
    }
  ],
  "raw_markdown_by_id": {
    "760355": "Has anyone tried perspective transform augmentation using TensorFlow?. I was able to augment images using openCV. But I want to perform the same on tf. Some functionality like this was available in previous tf versions but in don't know how to do this in tf2.1.\n\nHere is the kernel link fo the same.\nhttps://www.kaggle.com/gskdhiman/eda-effect-of-augmentation\nfunction: four_point_transform",
    "761749": "Thanks for the linked notebook. The transformations look very interesting indeed. Visually close to the original flowers while still changing many pixels.\n\nI do not have a direct answer but I can link to other posts where people have been working on data augmentation with TPUs:\n- [How To - Rotation Augmentation GPU/TPU](https://www.kaggle.com/c/flower-classification-with-tpus/discussion/132191)\n- [Make Chris Deotte's data augmentation faster](https://www.kaggle.com/c/flower-classification-with-tpus/discussion/133168)\n- [How To - CutMix and MixUp on GPU/TPU](https://www.kaggle.com/c/flower-classification-with-tpus/discussion/132935)\n- [GridMask data augmentation on GPU/TPU](https://www.kaggle.com/c/flower-classification-with-tpus/discussion/132986)\nedited ot add:\n- [Perspective transformation in Tensorflow](https://www.kaggle.com/c/flower-classification-with-tpus/discussion/134557)\n- [batch implementation of more data augmentations](https://www.kaggle.com/c/flower-classification-with-tpus/discussion/134264)\n- [Oversampling the training dataset](https://www.kaggle.com/c/flower-classification-with-tpus/discussion/133296)",
    "762256": "Try Using ImageDataGenerator in Tensorflow to perform DataAugmentation",
    "762634": "ImageDataGenerator will not work on TPU yet",
    "766932": "gskdhiman , now, you can have perspective. See [Perspective transformation in Tensorflow](https://www.kaggle.com/c/flower-classification-with-tpus/discussion/134557). :)",
    "767488": "Hey Thanks, \nI will look into your post. :)"
  },
  "source": "meta"
}