{
  "id": 12803,
  "title": "Fast Image Resize Script",
  "url": "/competitions/diabetic-retinopathy-detection/discussion/12803",
  "author_name": "",
  "post_date": "2015-03-13T19:50:33.260Z",
  "votes": 20,
  "comment_count": 3,
  "views": 2486,
  "content": "<p>Hi All,</p>\n\n<p>Attaching a fast image resize script (in case anyone needs it :))</p>\n<p>Takes 40mins to resize all images (train+test) to 96x96 on 32 cores.</p>\n<p>Vote up if it helped ;)</p>",
  "messages": [
    {
      "id": "66144",
      "postDate": "03/13/2015 19:50:33",
      "content": "<p>Hi All,</p>\n\n<p>Attaching a fast image resize script (in case anyone needs it :))</p>\n<p>Takes 40mins to resize all images (train+test) to 96x96 on 32 cores.</p>\n<p>Vote up if it helped ;)</p>",
      "rawMarkdown": "",
      "votes": null
    },
    {
      "id": "66145",
      "postDate": "03/13/2015 20:20:56",
      "content": "<p>Alternative one-liner for the Linux command line:</p>\n<p>parallel convert {} -verbose -resize 96x96 ../train96/{} ::: *.jpeg</p>\n<p>(Requires ImageMagick and GNU parallel, but both are standard in most package managers.)</p>",
      "rawMarkdown": "",
      "votes": null
    },
    {
      "id": "66496",
      "postDate": "03/16/2015 20:53:49",
      "content": "<p>An alternative to parallel with xargs (preserves aspect ratio as well):</p>\n<p>&gt;&nbsp;find . -name &quot;*.jpg&quot; | xargs -P 8 -I {} convert {} -resize &quot;256^&gt;&quot; {}</p>",
      "rawMarkdown": "",
      "votes": null
    },
    {
      "id": "787606",
      "postDate": "03/26/2020 23:13:56",
      "content": "<p>In kaggle you can just go to the console and do \n<code>!apt-get install parallel -y</code>\nto install parallel or anything you need</p>\n\n<p><img src=\"https://www.googleapis.com/download/storage/v1/b/kaggle-user-content/o/inbox%2F2980069%2F276c04fbb3f543a6cbf96a128845e653%2F2020-03-27--00-13.png?generation=1585264406360252&amp;alt=media\" alt=\"\"></p>",
      "rawMarkdown": "In kaggle you can just go to the console and do \n`!apt-get install parallel -y`\nto install parallel or anything you need\n\n![](https://www.googleapis.com/download/storage/v1/b/kaggle-user-content/o/inbox%2F2980069%2F276c04fbb3f543a6cbf96a128845e653%2F2020-03-27--00-13.png?generation=1585264406360252&amp;alt=media)",
      "votes": null
    }
  ],
  "comments": [
    {
      "id": 66145,
      "author_name": "nicolaykorslund",
      "author_url": "",
      "post_date": "03/13/2015 20:20:56",
      "content": "<p>Alternative one-liner for the Linux command line:</p>\n<p>parallel convert {} -verbose -resize 96x96 ../train96/{} ::: *.jpeg</p>\n<p>(Requires ImageMagick and GNU parallel, but both are standard in most package managers.)</p>",
      "votes": null,
      "replies": [
        {
          "id": 787606,
          "author_name": "mrruben",
          "author_url": "",
          "post_date": "03/26/2020 23:13:56",
          "content": "<p>In kaggle you can just go to the console and do \n<code>!apt-get install parallel -y</code>\nto install parallel or anything you need</p>\n\n<p><img src=\"https://www.googleapis.com/download/storage/v1/b/kaggle-user-content/o/inbox%2F2980069%2F276c04fbb3f543a6cbf96a128845e653%2F2020-03-27--00-13.png?generation=1585264406360252&amp;alt=media\" alt=\"\"></p>",
          "votes": null,
          "replies": []
        }
      ]
    },
    {
      "id": 66496,
      "author_name": "mikaelrousson",
      "author_url": "",
      "post_date": "03/16/2015 20:53:49",
      "content": "<p>An alternative to parallel with xargs (preserves aspect ratio as well):</p>\n<p>&gt;&nbsp;find . -name &quot;*.jpg&quot; | xargs -P 8 -I {} convert {} -resize &quot;256^&gt;&quot; {}</p>",
      "votes": null,
      "replies": []
    }
  ],
  "raw_markdown_by_id": {
    "66144": "",
    "66145": "",
    "66496": "",
    "787606": "In kaggle you can just go to the console and do \n`!apt-get install parallel -y`\nto install parallel or anything you need\n\n![](https://www.googleapis.com/download/storage/v1/b/kaggle-user-content/o/inbox%2F2980069%2F276c04fbb3f543a6cbf96a128845e653%2F2020-03-27--00-13.png?generation=1585264406360252&amp;alt=media)"
  },
  "source": "meta"
}