{
  "id": 18614,
  "title": "BAH-NVIDIA Team Blog Post #1",
  "url": "/competitions/second-annual-data-science-bowl/discussion/18614",
  "author_name": "",
  "post_date": "2016-01-28T00:38:43.410Z",
  "votes": 3,
  "comment_count": 8,
  "views": 1326,
  "content": "<p>We're happy to share a few of the explorations into image pre-processing that we've implemented prior to our Deep Learning based solution. You can check out our post at the link below. And there will be much more to come as we get further into the competition!</p>\n\n<p><a href=\"http://www.datasciencebowl.com/image-preprocessing-the-challenges-and-approach/\">http://www.datasciencebowl.com/image-preprocessing-the-challenges-and-approach/</a></p>",
  "messages": [
    {
      "id": "106035",
      "postDate": "01/28/2016 00:38:43",
      "content": "<p>We're happy to share a few of the explorations into image pre-processing that we've implemented prior to our Deep Learning based solution. You can check out our post at the link below. And there will be much more to come as we get further into the competition!</p>\n\n<p><a href=\"http://www.datasciencebowl.com/image-preprocessing-the-challenges-and-approach/\">http://www.datasciencebowl.com/image-preprocessing-the-challenges-and-approach/</a></p>",
      "rawMarkdown": "We're happy to share a few of the explorations into image pre-processing that we've implemented prior to our Deep Learning based solution. You can check out our post at the link below. And there will be much more to come as we get further into the competition!\r\n\r\nhttp://www.datasciencebowl.com/image-preprocessing-the-challenges-and-approach/",
      "votes": null
    },
    {
      "id": "109816",
      "postDate": "03/01/2016 02:53:20",
      "content": "<p>Maybe this is too much to give away, but could you give me a hint as to how to approach this?</p>\n\n<blockquote>\n  <p>Therefore, prior to any image resizing, we can scale all images to span the same physical extent by specifying a desired pixel spacing, adding or cropping a few pixels at the borders to ensure consistent dimensions, then resizing to our desired size for processing.</p>\n</blockquote>",
      "rawMarkdown": "Maybe this is too much to give away, but could you give me a hint as to how to approach this?\r\n\r\n> Therefore, prior to any image resizing, we can scale all images to span the same physical extent by specifying a desired pixel spacing, adding or cropping a few pixels at the borders to ensure consistent dimensions, then resizing to our desired size for processing.",
      "votes": null
    },
    {
      "id": "109827",
      "postDate": "03/01/2016 03:44:55",
      "content": "<p>Very helpful</p>",
      "rawMarkdown": "Very helpful",
      "votes": null
    },
    {
      "id": "109915",
      "postDate": "03/01/2016 14:04:34",
      "content": "<p>Thanks for the useful information that made me realise that I had to use the pixel spacing value from the dicom files. No wonder my method isn't performing as well as I'd like!</p>",
      "rawMarkdown": "Thanks for the useful information that made me realise that I had to use the pixel spacing value from the dicom files. No wonder my method isn't performing as well as I'd like!",
      "votes": null
    },
    {
      "id": "109922",
      "postDate": "03/01/2016 14:29:44",
      "content": "<p>@Florian - It's pretty straightforward. Once you choose a pixel spacing for your entire stack (say 1mm), you can compute a scale factor to rescale the input image as (true_spacing) / (desired_spacing). After you rescale the image by this scale factor, it will have your desired pixel spacing. You also need to choose an image size in world coordinates (say 250mm) for the entire stack; after rescaling, test to see if your image has an extent larger or smaller than this desired scale (i.e. is width*desired_spacing &gt; 250mm), then crop or pad as required. Finally, resize the image to your desired number of pixels for your processing. Before doing all that, you may wish to make sure that the aspect ratio is the same for all images (some studies are oriented horizontally rather than vertically, so you want to rotate those images to be vertical).</p>",
      "rawMarkdown": "Florian - It's pretty straightforward. Once you choose a pixel spacing for your entire stack (say 1mm), you can compute a scale factor to rescale the input image as (true_spacing) / (desired_spacing). After you rescale the image by this scale factor, it will have your desired pixel spacing. You also need to choose an image size in world coordinates (say 250mm) for the entire stack; after rescaling, test to see if your image has an extent larger or smaller than this desired scale (i.e. is width*desired_spacing > 250mm), then crop or pad as required. Finally, resize the image to your desired number of pixels for your processing. Before doing all that, you may wish to make sure that the aspect ratio is the same for all images (some studies are oriented horizontally rather than vertically, so you want to rotate those images to be vertical).",
      "votes": null
    },
    {
      "id": "109931",
      "postDate": "03/01/2016 15:55:32",
      "content": "<p>I tried a 2 channel architecture by concatenating a CNN with a Feed Forward network then adding FC7 and FC8 layers at the top. The CNN took image slices while the Feed Forward network took a vector containing metadata about the slice (pixel spacing, age, sex,slicelocation, e.t.c). I kept the original aspect ratios, just cropped the images. My thought  was the FC8 and 7 dense layers will learn image features and metadata and make the necessary adjustments and not have to do any fancy rescaling e.t.c but the results were not too promising, I still think this is a winning strategy. I disclose this because I have reached the end of the road, and hopefully someone can take my baby and run with it.</p>",
      "rawMarkdown": "I tried a 2 channel architecture by concatenating a CNN with a Feed Forward network then adding FC7 and FC8 layers at the top. The CNN took image slices while the Feed Forward network took a vector containing metadata about the slice (pixel spacing, age, sex,slicelocation, e.t.c). I kept the original aspect ratios, just cropped the images. My thought  was the FC8 and 7 dense layers will learn image features and metadata and make the necessary adjustments and not have to do any fancy rescaling e.t.c but the results were not too promising, I still think this is a winning strategy. I disclose this because I have reached the end of the road, and hopefully someone can take my baby and run with it.",
      "votes": null
    },
    {
      "id": "109948",
      "postDate": "03/01/2016 17:49:24",
      "content": "<p>Lets UP the GAME!, I'll also disclose I tried an EPIC! architecture called the &quot;spider&quot;. The spider was a 15 branch CNN, 15 CNNs concatenated at the top. Each branch looked at a separate slice of 30 images. Why 15? most patients have less than 15 slices This network could look at all slices of a patient and make a prediction (no clumsy averaging). if a patient has less than 15 slices, some slices are duplicated.  How this story ends is left to imagination.</p>",
      "rawMarkdown": "Lets UP the GAME!, I'll also disclose I tried an EPIC! architecture called the \"spider\". The spider was a 15 branch CNN, 15 CNNs concatenated at the top. Each branch looked at a separate slice of 30 images. Why 15? most patients have less than 15 slices This network could look at all slices of a patient and make a prediction (no clumsy averaging). if a patient has less than 15 slices, some slices are duplicated.  How this story ends is left to imagination.",
      "votes": null
    },
    {
      "id": "110007",
      "postDate": "03/02/2016 01:00:08",
      "content": "<p>@Pete - Thank you very much! It was that last step that I wasn't doing. Good luck in the final stage!</p>",
      "rawMarkdown": "Pete - Thank you very much! It was that last step that I wasn't doing. Good luck in the final stage!",
      "votes": null
    },
    {
      "id": "110008",
      "postDate": "03/02/2016 01:09:55",
      "content": "<p>I had to be creative when I cleaned up the brightness and contrast on the images. Linear adjustments just don't work on this data.</p>",
      "rawMarkdown": "I had to be creative when I cleaned up the brightness and contrast on the images. Linear adjustments just don't work on this data.",
      "votes": null
    }
  ],
  "comments": [
    {
      "id": 109816,
      "author_name": "florianm",
      "author_url": "",
      "post_date": "03/01/2016 02:53:20",
      "content": "<p>Maybe this is too much to give away, but could you give me a hint as to how to approach this?</p>\n\n<blockquote>\n  <p>Therefore, prior to any image resizing, we can scale all images to span the same physical extent by specifying a desired pixel spacing, adding or cropping a few pixels at the borders to ensure consistent dimensions, then resizing to our desired size for processing.</p>\n</blockquote>",
      "votes": null,
      "replies": []
    },
    {
      "id": 109827,
      "author_name": "yejiming",
      "author_url": "",
      "post_date": "03/01/2016 03:44:55",
      "content": "<p>Very helpful</p>",
      "votes": null,
      "replies": []
    },
    {
      "id": 109915,
      "author_name": "colinpriest",
      "author_url": "",
      "post_date": "03/01/2016 14:04:34",
      "content": "<p>Thanks for the useful information that made me realise that I had to use the pixel spacing value from the dicom files. No wonder my method isn't performing as well as I'd like!</p>",
      "votes": null,
      "replies": []
    },
    {
      "id": 109922,
      "author_name": "vanmape",
      "author_url": "",
      "post_date": "03/01/2016 14:29:44",
      "content": "<p>@Florian - It's pretty straightforward. Once you choose a pixel spacing for your entire stack (say 1mm), you can compute a scale factor to rescale the input image as (true_spacing) / (desired_spacing). After you rescale the image by this scale factor, it will have your desired pixel spacing. You also need to choose an image size in world coordinates (say 250mm) for the entire stack; after rescaling, test to see if your image has an extent larger or smaller than this desired scale (i.e. is width*desired_spacing &gt; 250mm), then crop or pad as required. Finally, resize the image to your desired number of pixels for your processing. Before doing all that, you may wish to make sure that the aspect ratio is the same for all images (some studies are oriented horizontally rather than vertically, so you want to rotate those images to be vertical).</p>",
      "votes": null,
      "replies": []
    },
    {
      "id": 109931,
      "author_name": "godaibo",
      "author_url": "",
      "post_date": "03/01/2016 15:55:32",
      "content": "<p>I tried a 2 channel architecture by concatenating a CNN with a Feed Forward network then adding FC7 and FC8 layers at the top. The CNN took image slices while the Feed Forward network took a vector containing metadata about the slice (pixel spacing, age, sex,slicelocation, e.t.c). I kept the original aspect ratios, just cropped the images. My thought  was the FC8 and 7 dense layers will learn image features and metadata and make the necessary adjustments and not have to do any fancy rescaling e.t.c but the results were not too promising, I still think this is a winning strategy. I disclose this because I have reached the end of the road, and hopefully someone can take my baby and run with it.</p>",
      "votes": null,
      "replies": []
    },
    {
      "id": 109948,
      "author_name": "godaibo",
      "author_url": "",
      "post_date": "03/01/2016 17:49:24",
      "content": "<p>Lets UP the GAME!, I'll also disclose I tried an EPIC! architecture called the &quot;spider&quot;. The spider was a 15 branch CNN, 15 CNNs concatenated at the top. Each branch looked at a separate slice of 30 images. Why 15? most patients have less than 15 slices This network could look at all slices of a patient and make a prediction (no clumsy averaging). if a patient has less than 15 slices, some slices are duplicated.  How this story ends is left to imagination.</p>",
      "votes": null,
      "replies": []
    },
    {
      "id": 110007,
      "author_name": "florianm",
      "author_url": "",
      "post_date": "03/02/2016 01:00:08",
      "content": "<p>@Pete - Thank you very much! It was that last step that I wasn't doing. Good luck in the final stage!</p>",
      "votes": null,
      "replies": []
    },
    {
      "id": 110008,
      "author_name": "colinpriest",
      "author_url": "",
      "post_date": "03/02/2016 01:09:55",
      "content": "<p>I had to be creative when I cleaned up the brightness and contrast on the images. Linear adjustments just don't work on this data.</p>",
      "votes": null,
      "replies": []
    }
  ],
  "raw_markdown_by_id": {
    "106035": "We're happy to share a few of the explorations into image pre-processing that we've implemented prior to our Deep Learning based solution. You can check out our post at the link below. And there will be much more to come as we get further into the competition!\r\n\r\nhttp://www.datasciencebowl.com/image-preprocessing-the-challenges-and-approach/",
    "109816": "Maybe this is too much to give away, but could you give me a hint as to how to approach this?\r\n\r\n> Therefore, prior to any image resizing, we can scale all images to span the same physical extent by specifying a desired pixel spacing, adding or cropping a few pixels at the borders to ensure consistent dimensions, then resizing to our desired size for processing.",
    "109827": "Very helpful",
    "109915": "Thanks for the useful information that made me realise that I had to use the pixel spacing value from the dicom files. No wonder my method isn't performing as well as I'd like!",
    "109922": "Florian - It's pretty straightforward. Once you choose a pixel spacing for your entire stack (say 1mm), you can compute a scale factor to rescale the input image as (true_spacing) / (desired_spacing). After you rescale the image by this scale factor, it will have your desired pixel spacing. You also need to choose an image size in world coordinates (say 250mm) for the entire stack; after rescaling, test to see if your image has an extent larger or smaller than this desired scale (i.e. is width*desired_spacing > 250mm), then crop or pad as required. Finally, resize the image to your desired number of pixels for your processing. Before doing all that, you may wish to make sure that the aspect ratio is the same for all images (some studies are oriented horizontally rather than vertically, so you want to rotate those images to be vertical).",
    "109931": "I tried a 2 channel architecture by concatenating a CNN with a Feed Forward network then adding FC7 and FC8 layers at the top. The CNN took image slices while the Feed Forward network took a vector containing metadata about the slice (pixel spacing, age, sex,slicelocation, e.t.c). I kept the original aspect ratios, just cropped the images. My thought  was the FC8 and 7 dense layers will learn image features and metadata and make the necessary adjustments and not have to do any fancy rescaling e.t.c but the results were not too promising, I still think this is a winning strategy. I disclose this because I have reached the end of the road, and hopefully someone can take my baby and run with it.",
    "109948": "Lets UP the GAME!, I'll also disclose I tried an EPIC! architecture called the \"spider\". The spider was a 15 branch CNN, 15 CNNs concatenated at the top. Each branch looked at a separate slice of 30 images. Why 15? most patients have less than 15 slices This network could look at all slices of a patient and make a prediction (no clumsy averaging). if a patient has less than 15 slices, some slices are duplicated.  How this story ends is left to imagination.",
    "110007": "Pete - Thank you very much! It was that last step that I wasn't doing. Good luck in the final stage!",
    "110008": "I had to be creative when I cleaned up the brightness and contrast on the images. Linear adjustments just don't work on this data."
  },
  "source": "meta"
}