{
  "id": 12344,
  "title": "Data augmentation in Python",
  "url": "/competitions/datasciencebowl/discussion/12344",
  "author_name": "",
  "post_date": "2015-01-27T20:50:44.900Z",
  "votes": null,
  "comment_count": 5,
  "views": 5395,
  "content": "<p>Hallo Guys,</p>\n<p>I am looking for some tutorial for data&nbsp;augmentation in Python. Do you have any interesting links?</p>\n<p>Thanks a lot!!!&nbsp;</p>",
  "messages": [
    {
      "id": "63249",
      "postDate": "01/27/2015 20:50:44",
      "content": "<p>Hallo Guys,</p>\n<p>I am looking for some tutorial for data&nbsp;augmentation in Python. Do you have any interesting links?</p>\n<p>Thanks a lot!!!&nbsp;</p>",
      "rawMarkdown": "",
      "votes": null
    },
    {
      "id": "63251",
      "postDate": "01/28/2015 00:00:54",
      "content": "<p>Not so much of a tutorial but you can use skimage (<a href=\"http://scikit-image.org/docs/dev/api/skimage.transform.html\">http://scikit-image.org/docs/dev/api/skimage.transform.html</a>) to do&nbsp;things such as rotations, scaling, shearing, and translations. This is exactly what I am doing for data augmentation.&nbsp;</p>",
      "rawMarkdown": "",
      "votes": null
    },
    {
      "id": "63354",
      "postDate": "01/30/2015 12:27:16",
      "content": "<p>I know it's not directly what you asked, but I started doing my data augmentation in Python and found it to be quite slow - I switched to using ImageMagick, a Linux command line tool.&nbsp; If you are on Linux it will be much quicker and is just as simple to use.</p>",
      "rawMarkdown": "",
      "votes": null
    },
    {
      "id": "63355",
      "postDate": "01/30/2015 12:35:24",
      "content": "<p>I don't agree with this. You can easily transform 100 images per second (single thread) with Python - and I didn't optimize it very much. In my opinion it is enough to work comfortably. You need to preload images to memory first. I load each image into a dictionary where d[&quot;1.jpg&quot;] is the ndarray with the image - I'm sure there are even better ways to do this in Python.</p>",
      "rawMarkdown": "",
      "votes": null
    },
    {
      "id": "63356",
      "postDate": "01/30/2015 13:12:14",
      "content": "<p>[quote=Senecaur;63354]</p>\n<p>I know it's not directly what you asked, but I started doing my data augmentation in Python and found it to be quite slow - I switched to using ImageMagick, a Linux command line tool.&nbsp; If you are on Linux it will be much quicker and is just as simple to use.</p>\n<p>[/quote]</p>\n\n<p>Thanks for answering!</p>\n<p>Can you share some command line you use for ImageMagick.</p>",
      "rawMarkdown": "",
      "votes": null
    },
    {
      "id": "63374",
      "postDate": "01/30/2015 19:42:55",
      "content": "<p>[quote=Pawe&#322;;63355]</p>\n<p>I don't agree with this. You can easily transform 100 images per second (single thread) with Python - and I didn't optimize it very much. In my opinion it is enough to work comfortably. You need to preload images to memory first. I load each image into a dictionary where d[&quot;1.jpg&quot;] is the ndarray with the image - I'm sure there are even better ways to do this in Python.</p>\n<p>[/quote]</p>\n\n<p>I'm not saying you can't do it in Python, but ImageMagick is quicker for the same operations - at least that has been my experience.</p>",
      "rawMarkdown": "",
      "votes": null
    }
  ],
  "comments": [
    {
      "id": 63251,
      "author_name": "msegala",
      "author_url": "",
      "post_date": "01/28/2015 00:00:54",
      "content": "<p>Not so much of a tutorial but you can use skimage (<a href=\"http://scikit-image.org/docs/dev/api/skimage.transform.html\">http://scikit-image.org/docs/dev/api/skimage.transform.html</a>) to do&nbsp;things such as rotations, scaling, shearing, and translations. This is exactly what I am doing for data augmentation.&nbsp;</p>",
      "votes": null,
      "replies": []
    },
    {
      "id": 63354,
      "author_name": "senecaur",
      "author_url": "",
      "post_date": "01/30/2015 12:27:16",
      "content": "<p>I know it's not directly what you asked, but I started doing my data augmentation in Python and found it to be quite slow - I switched to using ImageMagick, a Linux command line tool.&nbsp; If you are on Linux it will be much quicker and is just as simple to use.</p>",
      "votes": null,
      "replies": []
    },
    {
      "id": 63355,
      "author_name": "paweljankiewicz",
      "author_url": "",
      "post_date": "01/30/2015 12:35:24",
      "content": "<p>I don't agree with this. You can easily transform 100 images per second (single thread) with Python - and I didn't optimize it very much. In my opinion it is enough to work comfortably. You need to preload images to memory first. I load each image into a dictionary where d[&quot;1.jpg&quot;] is the ndarray with the image - I'm sure there are even better ways to do this in Python.</p>",
      "votes": null,
      "replies": []
    },
    {
      "id": 63356,
      "author_name": "alexmulo",
      "author_url": "",
      "post_date": "01/30/2015 13:12:14",
      "content": "<p>[quote=Senecaur;63354]</p>\n<p>I know it's not directly what you asked, but I started doing my data augmentation in Python and found it to be quite slow - I switched to using ImageMagick, a Linux command line tool.&nbsp; If you are on Linux it will be much quicker and is just as simple to use.</p>\n<p>[/quote]</p>\n\n<p>Thanks for answering!</p>\n<p>Can you share some command line you use for ImageMagick.</p>",
      "votes": null,
      "replies": []
    },
    {
      "id": 63374,
      "author_name": "senecaur",
      "author_url": "",
      "post_date": "01/30/2015 19:42:55",
      "content": "<p>[quote=Pawe&#322;;63355]</p>\n<p>I don't agree with this. You can easily transform 100 images per second (single thread) with Python - and I didn't optimize it very much. In my opinion it is enough to work comfortably. You need to preload images to memory first. I load each image into a dictionary where d[&quot;1.jpg&quot;] is the ndarray with the image - I'm sure there are even better ways to do this in Python.</p>\n<p>[/quote]</p>\n\n<p>I'm not saying you can't do it in Python, but ImageMagick is quicker for the same operations - at least that has been my experience.</p>",
      "votes": null,
      "replies": []
    }
  ],
  "raw_markdown_by_id": {
    "63249": "",
    "63251": "",
    "63354": "",
    "63355": "",
    "63356": "",
    "63374": ""
  },
  "source": "meta"
}