{
  "id": 18992,
  "title": "Low Tech Approach",
  "url": "/competitions/yelp-restaurant-photo-classification/discussion/18992",
  "author_name": "Johannes Ahlmann",
  "post_date": "2016-02-16T01:45:53.197000",
  "votes": 6,
  "comment_count": 4,
  "views": 1323,
  "content": "<p>Since not everyone has an Nvidia Titan X lying around, I will try to do my best using the low-tech approach.</p>\n\n<p>On the command-line, the ImageMagick tool &quot;identify&quot; produces a pretty good image analysis summary to use as attributes for machine learning.</p>\n\n<p>This won't be enough to compete with the GPU-fueled deep learning networks, but it may be good enough to make decent predictions...</p>\n\n<p>I have attached the output of &quot;identify&quot; for all test and train images. \nUsing &quot;-features 1&quot; would probably have been valuable, but it would have needed to run for a week, so maybe another time ;) </p>\n\n<pre><code>$ identify -verbose -unique 100000.jpg\nImage: 100000.jpg\n  Format: JPEG (Joint Photographic Experts Group JFIF format)\n  Class: DirectClass\n  Geometry: 500x278+0+0\n  Resolution: 72x72\n  Print size: 6.94444x3.86111\n  Units: Undefined\n  Type: TrueColor\n  Endianess: Undefined\n  Colorspace: sRGB\n  Depth: 8-bit\n  Channel depth:\n    red: 8-bit\n    green: 8-bit\n    blue: 8-bit\n  Channel statistics:\n    Red:\n      min: 18 (0.0705882)\n      max: 255 (1)\n      mean: 153.415 (0.601626)\n      standard deviation: 34.8608 (0.136709)\n      kurtosis: 0.426951\n      skewness: -0.484113\n    Green:\n      min: 1 (0.00392157)\n      max: 255 (1)\n      mean: 130.799 (0.512939)\n      standard deviation: 43.828 (0.171875)\n      kurtosis: 0.00125373\n      skewness: -0.0864707\n    Blue:\n      min: 0 (0)\n      max: 255 (1)\n      mean: 97.662 (0.382988)\n      standard deviation: 63.4898 (0.24898)\n      kurtosis: -1.12554\n      skewness: 0.351623\n  Image statistics:\n    Overall:\n      min: 0 (0)\n      max: 255 (1)\n      mean: 127.292 (0.499184)\n      standard deviation: 48.8778 (0.191678)\n      kurtosis: 0.578313\n      skewness: -0.538965\n  Colors: 40399\n  Rendering intent: Perceptual\n  Gamma: 0.454545\n  Chromaticity:\n    red primary: (0.64,0.33)\n    green primary: (0.3,0.6)\n    blue primary: (0.15,0.06)\n    white point: (0.3127,0.329)\n  Interlace: None\n  Background color: white\n  Border color: srgb(223,223,223)\n  Matte color: grey74\n  Transparent color: black\n  Compose: Over\n  Page geometry: 500x278+0+0\n  Dispose: Undefined\n  Iterations: 0\n  Compression: JPEG\n  Quality: 75\n  Orientation: Undefined\n  Properties:\n    date:create: 2016-02-16T01:15:46+00:00\n    date:modify: 2015-12-15T22:52:42+00:00\n    jpeg:colorspace: 2\n    jpeg:sampling-factor: 2x2,1x1,1x1\n    signature: 4b54297b959ec7fa6901197a3e1174a10e776ce1a662564e615d2c1017aed96a\n  Artifacts:\n    filename: 100000.jpg\n    identify:features: 1\n    identify:unique-colors: true\n    verbose: true\n  Tainted: False\n  Filesize: 19.1KB\n  Number pixels: 139K\n  Pixels per second: 0B\n  User time: 0.000u\n  Elapsed time: 0:01.000\n  Version: ImageMagick 6.7.7-10 2014-03-06 Q16 http://www.imagemagick.org\n</code></pre>",
  "messages": [
    {
      "id": 108193,
      "postDate": "2016-02-16T01:45:53.197Z",
      "content": "<p>Since not everyone has an Nvidia Titan X lying around, I will try to do my best using the low-tech approach.</p>\n\n<p>On the command-line, the ImageMagick tool &quot;identify&quot; produces a pretty good image analysis summary to use as attributes for machine learning.</p>\n\n<p>This won't be enough to compete with the GPU-fueled deep learning networks, but it may be good enough to make decent predictions...</p>\n\n<p>I have attached the output of &quot;identify&quot; for all test and train images. \nUsing &quot;-features 1&quot; would probably have been valuable, but it would have needed to run for a week, so maybe another time ;) </p>\n\n<pre><code>$ identify -verbose -unique 100000.jpg\nImage: 100000.jpg\n  Format: JPEG (Joint Photographic Experts Group JFIF format)\n  Class: DirectClass\n  Geometry: 500x278+0+0\n  Resolution: 72x72\n  Print size: 6.94444x3.86111\n  Units: Undefined\n  Type: TrueColor\n  Endianess: Undefined\n  Colorspace: sRGB\n  Depth: 8-bit\n  Channel depth:\n    red: 8-bit\n    green: 8-bit\n    blue: 8-bit\n  Channel statistics:\n    Red:\n      min: 18 (0.0705882)\n      max: 255 (1)\n      mean: 153.415 (0.601626)\n      standard deviation: 34.8608 (0.136709)\n      kurtosis: 0.426951\n      skewness: -0.484113\n    Green:\n      min: 1 (0.00392157)\n      max: 255 (1)\n      mean: 130.799 (0.512939)\n      standard deviation: 43.828 (0.171875)\n      kurtosis: 0.00125373\n      skewness: -0.0864707\n    Blue:\n      min: 0 (0)\n      max: 255 (1)\n      mean: 97.662 (0.382988)\n      standard deviation: 63.4898 (0.24898)\n      kurtosis: -1.12554\n      skewness: 0.351623\n  Image statistics:\n    Overall:\n      min: 0 (0)\n      max: 255 (1)\n      mean: 127.292 (0.499184)\n      standard deviation: 48.8778 (0.191678)\n      kurtosis: 0.578313\n      skewness: -0.538965\n  Colors: 40399\n  Rendering intent: Perceptual\n  Gamma: 0.454545\n  Chromaticity:\n    red primary: (0.64,0.33)\n    green primary: (0.3,0.6)\n    blue primary: (0.15,0.06)\n    white point: (0.3127,0.329)\n  Interlace: None\n  Background color: white\n  Border color: srgb(223,223,223)\n  Matte color: grey74\n  Transparent color: black\n  Compose: Over\n  Page geometry: 500x278+0+0\n  Dispose: Undefined\n  Iterations: 0\n  Compression: JPEG\n  Quality: 75\n  Orientation: Undefined\n  Properties:\n    date:create: 2016-02-16T01:15:46+00:00\n    date:modify: 2015-12-15T22:52:42+00:00\n    jpeg:colorspace: 2\n    jpeg:sampling-factor: 2x2,1x1,1x1\n    signature: 4b54297b959ec7fa6901197a3e1174a10e776ce1a662564e615d2c1017aed96a\n  Artifacts:\n    filename: 100000.jpg\n    identify:features: 1\n    identify:unique-colors: true\n    verbose: true\n  Tainted: False\n  Filesize: 19.1KB\n  Number pixels: 139K\n  Pixels per second: 0B\n  User time: 0.000u\n  Elapsed time: 0:01.000\n  Version: ImageMagick 6.7.7-10 2014-03-06 Q16 http://www.imagemagick.org\n</code></pre>",
      "rawMarkdown": "Since not everyone has an Nvidia Titan X lying around, I will try to do my best using the low-tech approach.\r\n\r\nOn the command-line, the ImageMagick tool \"identify\" produces a pretty good image analysis summary to use as attributes for machine learning.\r\n\r\nThis won't be enough to compete with the GPU-fueled deep learning networks, but it may be good enough to make decent predictions...\r\n\r\nI have attached the output of \"identify\" for all test and train images. \r\nUsing \"-features 1\" would probably have been valuable, but it would have needed to run for a week, so maybe another time ;) \r\n\r\n    $ identify -verbose -unique 100000.jpg\r\n    Image: 100000.jpg\r\n      Format: JPEG (Joint Photographic Experts Group JFIF format)\r\n      Class: DirectClass\r\n      Geometry: 500x278+0+0\r\n      Resolution: 72x72\r\n      Print size: 6.94444x3.86111\r\n      Units: Undefined\r\n      Type: TrueColor\r\n      Endianess: Undefined\r\n      Colorspace: sRGB\r\n      Depth: 8-bit\r\n      Channel depth:\r\n        red: 8-bit\r\n        green: 8-bit\r\n        blue: 8-bit\r\n      Channel statistics:\r\n        Red:\r\n          min: 18 (0.0705882)\r\n          max: 255 (1)\r\n          mean: 153.415 (0.601626)\r\n          standard deviation: 34.8608 (0.136709)\r\n          kurtosis: 0.426951\r\n          skewness: -0.484113\r\n        Green:\r\n          min: 1 (0.00392157)\r\n          max: 255 (1)\r\n          mean: 130.799 (0.512939)\r\n          standard deviation: 43.828 (0.171875)\r\n          kurtosis: 0.00125373\r\n          skewness: -0.0864707\r\n        Blue:\r\n          min: 0 (0)\r\n          max: 255 (1)\r\n          mean: 97.662 (0.382988)\r\n          standard deviation: 63.4898 (0.24898)\r\n          kurtosis: -1.12554\r\n          skewness: 0.351623\r\n      Image statistics:\r\n        Overall:\r\n          min: 0 (0)\r\n          max: 255 (1)\r\n          mean: 127.292 (0.499184)\r\n          standard deviation: 48.8778 (0.191678)\r\n          kurtosis: 0.578313\r\n          skewness: -0.538965\r\n      Colors: 40399\r\n      Rendering intent: Perceptual\r\n      Gamma: 0.454545\r\n      Chromaticity:\r\n        red primary: (0.64,0.33)\r\n        green primary: (0.3,0.6)\r\n        blue primary: (0.15,0.06)\r\n        white point: (0.3127,0.329)\r\n      Interlace: None\r\n      Background color: white\r\n      Border color: srgb(223,223,223)\r\n      Matte color: grey74\r\n      Transparent color: black\r\n      Compose: Over\r\n      Page geometry: 500x278+0+0\r\n      Dispose: Undefined\r\n      Iterations: 0\r\n      Compression: JPEG\r\n      Quality: 75\r\n      Orientation: Undefined\r\n      Properties:\r\n        date:create: 2016-02-16T01:15:46+00:00\r\n        date:modify: 2015-12-15T22:52:42+00:00\r\n        jpeg:colorspace: 2\r\n        jpeg:sampling-factor: 2x2,1x1,1x1\r\n        signature: 4b54297b959ec7fa6901197a3e1174a10e776ce1a662564e615d2c1017aed96a\r\n      Artifacts:\r\n        filename: 100000.jpg\r\n        identify:features: 1\r\n        identify:unique-colors: true\r\n        verbose: true\r\n      Tainted: False\r\n      Filesize: 19.1KB\r\n      Number pixels: 139K\r\n      Pixels per second: 0B\r\n      User time: 0.000u\r\n      Elapsed time: 0:01.000\r\n      Version: ImageMagick 6.7.7-10 2014-03-06 Q16 http://www.imagemagick.org",
      "votes": 6
    },
    {
      "id": 109769,
      "postDate": "2016-03-01T00:12:57.320Z",
      "content": "<p>@allexius, I haven't really started yet, as I was focussing on the Telstra competition and failed miserably ;)\nAlways lots to learn.</p>\n\n<p>I have no illusion that the above summary stats will be far too little to compete, so I'll see how long it would take to compute 200k images on AWS GPU machine. Probably too expensive...</p>\n\n<p>I'll let you know once I've started on this competition in anger ;)</p>\n\n<p>Edit: I've had a quick look at &quot;SIFT&quot;, but wasn't quite sure how to consume the &quot;points of interest&quot;. I guess a lot of the information from SIFT comes from the relations between points... </p>\n\n<p>Johannes</p>",
      "rawMarkdown": "@allexius, I haven't really started yet, as I was focussing on the Telstra competition and failed miserably ;)\r\nAlways lots to learn.\r\n\r\nI have no illusion that the above summary stats will be far too little to compete, so I'll see how long it would take to compute 200k images on AWS GPU machine. Probably too expensive...\r\n\r\nI'll let you know once I've started on this competition in anger ;)\r\n\r\nEdit: I've had a quick look at \"SIFT\", but wasn't quite sure how to consume the \"points of interest\". I guess a lot of the information from SIFT comes from the relations between points... \r\n\r\nJohannes"
    },
    {
      "id": 108993,
      "postDate": "2016-02-22T09:40:42.750Z",
      "content": "<p>Very cool Johannes!</p>",
      "rawMarkdown": "Very cool Johannes!"
    },
    {
      "id": 108751,
      "postDate": "2016-02-19T16:03:11.197Z",
      "content": "<p>How far did you get with those features? SIFT+K-Means+SVM might be an alternative to try if you don't have a GPU to train convnets.</p>",
      "rawMarkdown": "How far did you get with those features? SIFT+K-Means+SVM might be an alternative to try if you don't have a GPU to train convnets."
    },
    {
      "id": 109811,
      "postDate": "2016-03-01T02:37:22.393Z",
      "rawMarkdown": "",
      "isDeleted": true
    }
  ],
  "comments": [
    {
      "id": 109769,
      "author_name": "Johannes Ahlmann",
      "author_url": "",
      "post_date": "2016-03-01T00:12:57.320000",
      "content": "<p>@allexius, I haven't really started yet, as I was focussing on the Telstra competition and failed miserably ;)\nAlways lots to learn.</p>\n\n<p>I have no illusion that the above summary stats will be far too little to compete, so I'll see how long it would take to compute 200k images on AWS GPU machine. Probably too expensive...</p>\n\n<p>I'll let you know once I've started on this competition in anger ;)</p>\n\n<p>Edit: I've had a quick look at &quot;SIFT&quot;, but wasn't quite sure how to consume the &quot;points of interest&quot;. I guess a lot of the information from SIFT comes from the relations between points... </p>\n\n<p>Johannes</p>",
      "votes": 0,
      "replies": []
    },
    {
      "id": 108993,
      "author_name": "Ason",
      "author_url": "",
      "post_date": "2016-02-22T09:40:42.750000",
      "content": "<p>Very cool Johannes!</p>",
      "votes": 0,
      "replies": []
    },
    {
      "id": 108751,
      "author_name": "Alexander Bauer",
      "author_url": "",
      "post_date": "2016-02-19T16:03:11.197000",
      "content": "<p>How far did you get with those features? SIFT+K-Means+SVM might be an alternative to try if you don't have a GPU to train convnets.</p>",
      "votes": 0,
      "replies": []
    },
    {
      "id": 109811,
      "author_name": "",
      "author_url": "",
      "post_date": "2016-03-01T02:37:22.393000",
      "content": "",
      "votes": 0,
      "replies": []
    }
  ],
  "raw_markdown_by_id": {
    "108193": "Since not everyone has an Nvidia Titan X lying around, I will try to do my best using the low-tech approach.\r\n\r\nOn the command-line, the ImageMagick tool \"identify\" produces a pretty good image analysis summary to use as attributes for machine learning.\r\n\r\nThis won't be enough to compete with the GPU-fueled deep learning networks, but it may be good enough to make decent predictions...\r\n\r\nI have attached the output of \"identify\" for all test and train images. \r\nUsing \"-features 1\" would probably have been valuable, but it would have needed to run for a week, so maybe another time ;) \r\n\r\n    $ identify -verbose -unique 100000.jpg\r\n    Image: 100000.jpg\r\n      Format: JPEG (Joint Photographic Experts Group JFIF format)\r\n      Class: DirectClass\r\n      Geometry: 500x278+0+0\r\n      Resolution: 72x72\r\n      Print size: 6.94444x3.86111\r\n      Units: Undefined\r\n      Type: TrueColor\r\n      Endianess: Undefined\r\n      Colorspace: sRGB\r\n      Depth: 8-bit\r\n      Channel depth:\r\n        red: 8-bit\r\n        green: 8-bit\r\n        blue: 8-bit\r\n      Channel statistics:\r\n        Red:\r\n          min: 18 (0.0705882)\r\n          max: 255 (1)\r\n          mean: 153.415 (0.601626)\r\n          standard deviation: 34.8608 (0.136709)\r\n          kurtosis: 0.426951\r\n          skewness: -0.484113\r\n        Green:\r\n          min: 1 (0.00392157)\r\n          max: 255 (1)\r\n          mean: 130.799 (0.512939)\r\n          standard deviation: 43.828 (0.171875)\r\n          kurtosis: 0.00125373\r\n          skewness: -0.0864707\r\n        Blue:\r\n          min: 0 (0)\r\n          max: 255 (1)\r\n          mean: 97.662 (0.382988)\r\n          standard deviation: 63.4898 (0.24898)\r\n          kurtosis: -1.12554\r\n          skewness: 0.351623\r\n      Image statistics:\r\n        Overall:\r\n          min: 0 (0)\r\n          max: 255 (1)\r\n          mean: 127.292 (0.499184)\r\n          standard deviation: 48.8778 (0.191678)\r\n          kurtosis: 0.578313\r\n          skewness: -0.538965\r\n      Colors: 40399\r\n      Rendering intent: Perceptual\r\n      Gamma: 0.454545\r\n      Chromaticity:\r\n        red primary: (0.64,0.33)\r\n        green primary: (0.3,0.6)\r\n        blue primary: (0.15,0.06)\r\n        white point: (0.3127,0.329)\r\n      Interlace: None\r\n      Background color: white\r\n      Border color: srgb(223,223,223)\r\n      Matte color: grey74\r\n      Transparent color: black\r\n      Compose: Over\r\n      Page geometry: 500x278+0+0\r\n      Dispose: Undefined\r\n      Iterations: 0\r\n      Compression: JPEG\r\n      Quality: 75\r\n      Orientation: Undefined\r\n      Properties:\r\n        date:create: 2016-02-16T01:15:46+00:00\r\n        date:modify: 2015-12-15T22:52:42+00:00\r\n        jpeg:colorspace: 2\r\n        jpeg:sampling-factor: 2x2,1x1,1x1\r\n        signature: 4b54297b959ec7fa6901197a3e1174a10e776ce1a662564e615d2c1017aed96a\r\n      Artifacts:\r\n        filename: 100000.jpg\r\n        identify:features: 1\r\n        identify:unique-colors: true\r\n        verbose: true\r\n      Tainted: False\r\n      Filesize: 19.1KB\r\n      Number pixels: 139K\r\n      Pixels per second: 0B\r\n      User time: 0.000u\r\n      Elapsed time: 0:01.000\r\n      Version: ImageMagick 6.7.7-10 2014-03-06 Q16 http://www.imagemagick.org",
    "109769": "@allexius, I haven't really started yet, as I was focussing on the Telstra competition and failed miserably ;)\r\nAlways lots to learn.\r\n\r\nI have no illusion that the above summary stats will be far too little to compete, so I'll see how long it would take to compute 200k images on AWS GPU machine. Probably too expensive...\r\n\r\nI'll let you know once I've started on this competition in anger ;)\r\n\r\nEdit: I've had a quick look at \"SIFT\", but wasn't quite sure how to consume the \"points of interest\". I guess a lot of the information from SIFT comes from the relations between points... \r\n\r\nJohannes",
    "108993": "Very cool Johannes!",
    "108751": "How far did you get with those features? SIFT+K-Means+SVM might be an alternative to try if you don't have a GPU to train convnets.",
    "109811": ""
  }
}