{
  "id": 12576,
  "title": "Subtracting the mean image: per-pixel or per-image?",
  "url": "/competitions/datasciencebowl/discussion/12576",
  "author_name": "",
  "post_date": "2015-02-20T11:22:39.303Z",
  "votes": 2,
  "comment_count": 1,
  "views": 1937,
  "content": "<p>For training a classifier, especially a neural network, I understand that it is always beneficial to subtract the mean image from the data. Although there are many papers about cutting-edge machine learning techniques, I could find surprisingly little about how to optimally do this simple normalization step.</p>\n<p>Up until now, I've been subtracting the mean per pixel, across the (training) data set, from every image. The mean per pixel (after resizing to 56x56 images) looks like this:</p>\n<p><img src=\"http://i.imgur.com/myKZ1NH.png\" alt width=\"305\" height=\"229\"></p>\n\n<p>I could imagine that it might&nbsp;be even more beneficial to normalize each image separately, by subtracting the mean pixel value per image. Does anyone have tips on what the best strategy is here? Thanks!</p>",
  "messages": [
    {
      "id": "64639",
      "postDate": "02/20/2015 11:22:39",
      "content": "<p>For training a classifier, especially a neural network, I understand that it is always beneficial to subtract the mean image from the data. Although there are many papers about cutting-edge machine learning techniques, I could find surprisingly little about how to optimally do this simple normalization step.</p>\n<p>Up until now, I've been subtracting the mean per pixel, across the (training) data set, from every image. The mean per pixel (after resizing to 56x56 images) looks like this:</p>\n<p><img src=\"http://i.imgur.com/myKZ1NH.png\" alt width=\"305\" height=\"229\"></p>\n\n<p>I could imagine that it might&nbsp;be even more beneficial to normalize each image separately, by subtracting the mean pixel value per image. Does anyone have tips on what the best strategy is here? Thanks!</p>",
      "rawMarkdown": "",
      "votes": null
    },
    {
      "id": "65027",
      "postDate": "02/27/2015 13:41:45",
      "content": "<p>Try subtracting 256 from each element of the image matrix that way you will get a number between 0 &amp; 1.</p>\n<p>Hope this helps.</p>",
      "rawMarkdown": "",
      "votes": null
    }
  ],
  "comments": [
    {
      "id": 65027,
      "author_name": "girishjoag",
      "author_url": "",
      "post_date": "02/27/2015 13:41:45",
      "content": "<p>Try subtracting 256 from each element of the image matrix that way you will get a number between 0 &amp; 1.</p>\n<p>Hope this helps.</p>",
      "votes": null,
      "replies": []
    }
  ],
  "raw_markdown_by_id": {
    "64639": "",
    "65027": ""
  },
  "source": "meta"
}