{
  "id": 19343,
  "title": "Alternative route outline from scratch",
  "url": "/competitions/second-annual-data-science-bowl/discussion/19343",
  "author_name": "",
  "post_date": "2016-03-06T09:58:47.943Z",
  "votes": 3,
  "comment_count": 2,
  "views": 439,
  "content": "<p>As the competition starts to come to an end, I briefly wanted to share my rough solution outline not using anything supplied from the tutorials. I started to code seriously only two weeks back so I only score around place 50. Nevertheless, the approach might be of interest to build upon for someone.</p>\n\n<p>The model works the following way:</p>\n\n<ul>\n<li>At first the longest consecutive run of images is identified with the file numbers.\nThis is done since scans that are not done in an orderly fashion may have resulted from the patient being moved\nso that the ventricle position is not consistent.</li>\n<li>The middle scan is identified from the run.</li>\n<li>Within that run, the algorithm tries to identify the best circular region, scanning from the middle of the pictures.</li>\n<li>The search is being done using a region growing / contraction algorithm from a seed point.</li>\n<li>When a suitable region is found, the threshold is being optimized to separate the blood from the ventricle wall.</li>\n<li>Scans are rescaled &amp; cropped due to the ventricle usually lying in a square region</li>\n<li>After the first ventricle is identified other slices are processed and the algorithm is rolled out to the left\nand right side of the middle slice.</li>\n<li>After each processing of the slices, the systole and diastole are identified.</li>\n</ul>\n\n<p>Analysis:</p>\n\n<ul>\n<li>The train volumes are fit with a generalized logistic function to yield the sigmoid distribution.</li>\n</ul>\n\n<p>Notes:</p>\n\n<ul>\n<li>The algorithm works great to identify the first ventricle in the middle slice.</li>\n<li>If the ventricle is in an orderly fashion the algorithm works like a charm.</li>\n</ul>\n\n<p>Problems:</p>\n\n<ul>\n<li>Towards the larger end of the ventricle the segmentation quality collapses since often the region growing reaches out\ninto the rest of the heart.</li>\n<li>I did not have enough time to write a suitable algorithm to calculate a good volume from the cross section slices.\nHaving a method supplied would have probably improved competition quality a lot.</li>\n</ul>\n\n<p>Cheers and thanks for this nice challenge,</p>\n\n<p>Florian</p>",
  "messages": [
    {
      "id": "110527",
      "postDate": "03/06/2016 09:58:47",
      "content": "<p>As the competition starts to come to an end, I briefly wanted to share my rough solution outline not using anything supplied from the tutorials. I started to code seriously only two weeks back so I only score around place 50. Nevertheless, the approach might be of interest to build upon for someone.</p>\n\n<p>The model works the following way:</p>\n\n<ul>\n<li>At first the longest consecutive run of images is identified with the file numbers.\nThis is done since scans that are not done in an orderly fashion may have resulted from the patient being moved\nso that the ventricle position is not consistent.</li>\n<li>The middle scan is identified from the run.</li>\n<li>Within that run, the algorithm tries to identify the best circular region, scanning from the middle of the pictures.</li>\n<li>The search is being done using a region growing / contraction algorithm from a seed point.</li>\n<li>When a suitable region is found, the threshold is being optimized to separate the blood from the ventricle wall.</li>\n<li>Scans are rescaled &amp; cropped due to the ventricle usually lying in a square region</li>\n<li>After the first ventricle is identified other slices are processed and the algorithm is rolled out to the left\nand right side of the middle slice.</li>\n<li>After each processing of the slices, the systole and diastole are identified.</li>\n</ul>\n\n<p>Analysis:</p>\n\n<ul>\n<li>The train volumes are fit with a generalized logistic function to yield the sigmoid distribution.</li>\n</ul>\n\n<p>Notes:</p>\n\n<ul>\n<li>The algorithm works great to identify the first ventricle in the middle slice.</li>\n<li>If the ventricle is in an orderly fashion the algorithm works like a charm.</li>\n</ul>\n\n<p>Problems:</p>\n\n<ul>\n<li>Towards the larger end of the ventricle the segmentation quality collapses since often the region growing reaches out\ninto the rest of the heart.</li>\n<li>I did not have enough time to write a suitable algorithm to calculate a good volume from the cross section slices.\nHaving a method supplied would have probably improved competition quality a lot.</li>\n</ul>\n\n<p>Cheers and thanks for this nice challenge,</p>\n\n<p>Florian</p>",
      "rawMarkdown": "As the competition starts to come to an end, I briefly wanted to share my rough solution outline not using anything supplied from the tutorials. I started to code seriously only two weeks back so I only score around place 50. Nevertheless, the approach might be of interest to build upon for someone.\r\n\r\nThe model works the following way:\r\n\r\n- At first the longest consecutive run of images is identified with the file numbers.\r\n  This is done since scans that are not done in an orderly fashion may have resulted from the patient being moved\r\n  so that the ventricle position is not consistent.\r\n- The middle scan is identified from the run.\r\n- Within that run, the algorithm tries to identify the best circular region, scanning from the middle of the pictures.\r\n- The search is being done using a region growing / contraction algorithm from a seed point.\r\n- When a suitable region is found, the threshold is being optimized to separate the blood from the ventricle wall.\r\n- Scans are rescaled & cropped due to the ventricle usually lying in a square region\r\n- After the first ventricle is identified other slices are processed and the algorithm is rolled out to the left\r\n  and right side of the middle slice.\r\n- After each processing of the slices, the systole and diastole are identified.\r\n\r\nAnalysis:\r\n\r\n- The train volumes are fit with a generalized logistic function to yield the sigmoid distribution.\r\n\r\nNotes:\r\n\r\n- The algorithm works great to identify the first ventricle in the middle slice.\r\n- If the ventricle is in an orderly fashion the algorithm works like a charm.\r\n\r\nProblems:\r\n\r\n- Towards the larger end of the ventricle the segmentation quality collapses since often the region growing reaches out\r\n  into the rest of the heart.\r\n- I did not have enough time to write a suitable algorithm to calculate a good volume from the cross section slices.\r\n  Having a method supplied would have probably improved competition quality a lot.\r\n\r\n\r\nCheers and thanks for this nice challenge,\r\n\r\nFlorian",
      "votes": null
    },
    {
      "id": "110532",
      "postDate": "03/06/2016 10:41:20",
      "content": "<p>Sounds very familiar to what I've been doing - using R &amp; EBImage. Unfortunately my results are quite a bit behind yours but the approach is similar. Estimating the volumes is simply summation of area * slice thickness (obtainable from the image meta data), so you may still want to squeeze that in today.</p>",
      "rawMarkdown": "Sounds very familiar to what I've been doing - using R & EBImage. Unfortunately my results are quite a bit behind yours but the approach is similar. Estimating the volumes is simply summation of area * slice thickness (obtainable from the image meta data), so you may still want to squeeze that in today.",
      "votes": null
    },
    {
      "id": "110556",
      "postDate": "03/06/2016 15:59:48",
      "content": "<p>I'm doing similar too, although I'm segmenting the image differently. I'm using a CNN to find the location of the centroid of the chamber, then binarisation to find the boundaries of the chamber. Like you I had problems with some of the patients' left ventricle merging with the rest of the heart, but there is a way to deal with that if you constrain the change in location and size of the boundary between adjacent images.</p>",
      "rawMarkdown": "I'm doing similar too, although I'm segmenting the image differently. I'm using a CNN to find the location of the centroid of the chamber, then binarisation to find the boundaries of the chamber. Like you I had problems with some of the patients' left ventricle merging with the rest of the heart, but there is a way to deal with that if you constrain the change in location and size of the boundary between adjacent images.",
      "votes": null
    }
  ],
  "comments": [
    {
      "id": 110532,
      "author_name": "operdeck",
      "author_url": "",
      "post_date": "03/06/2016 10:41:20",
      "content": "<p>Sounds very familiar to what I've been doing - using R &amp; EBImage. Unfortunately my results are quite a bit behind yours but the approach is similar. Estimating the volumes is simply summation of area * slice thickness (obtainable from the image meta data), so you may still want to squeeze that in today.</p>",
      "votes": null,
      "replies": []
    },
    {
      "id": 110556,
      "author_name": "colinpriest",
      "author_url": "",
      "post_date": "03/06/2016 15:59:48",
      "content": "<p>I'm doing similar too, although I'm segmenting the image differently. I'm using a CNN to find the location of the centroid of the chamber, then binarisation to find the boundaries of the chamber. Like you I had problems with some of the patients' left ventricle merging with the rest of the heart, but there is a way to deal with that if you constrain the change in location and size of the boundary between adjacent images.</p>",
      "votes": null,
      "replies": []
    }
  ],
  "raw_markdown_by_id": {
    "110527": "As the competition starts to come to an end, I briefly wanted to share my rough solution outline not using anything supplied from the tutorials. I started to code seriously only two weeks back so I only score around place 50. Nevertheless, the approach might be of interest to build upon for someone.\r\n\r\nThe model works the following way:\r\n\r\n- At first the longest consecutive run of images is identified with the file numbers.\r\n  This is done since scans that are not done in an orderly fashion may have resulted from the patient being moved\r\n  so that the ventricle position is not consistent.\r\n- The middle scan is identified from the run.\r\n- Within that run, the algorithm tries to identify the best circular region, scanning from the middle of the pictures.\r\n- The search is being done using a region growing / contraction algorithm from a seed point.\r\n- When a suitable region is found, the threshold is being optimized to separate the blood from the ventricle wall.\r\n- Scans are rescaled & cropped due to the ventricle usually lying in a square region\r\n- After the first ventricle is identified other slices are processed and the algorithm is rolled out to the left\r\n  and right side of the middle slice.\r\n- After each processing of the slices, the systole and diastole are identified.\r\n\r\nAnalysis:\r\n\r\n- The train volumes are fit with a generalized logistic function to yield the sigmoid distribution.\r\n\r\nNotes:\r\n\r\n- The algorithm works great to identify the first ventricle in the middle slice.\r\n- If the ventricle is in an orderly fashion the algorithm works like a charm.\r\n\r\nProblems:\r\n\r\n- Towards the larger end of the ventricle the segmentation quality collapses since often the region growing reaches out\r\n  into the rest of the heart.\r\n- I did not have enough time to write a suitable algorithm to calculate a good volume from the cross section slices.\r\n  Having a method supplied would have probably improved competition quality a lot.\r\n\r\n\r\nCheers and thanks for this nice challenge,\r\n\r\nFlorian",
    "110532": "Sounds very familiar to what I've been doing - using R & EBImage. Unfortunately my results are quite a bit behind yours but the approach is similar. Estimating the volumes is simply summation of area * slice thickness (obtainable from the image meta data), so you may still want to squeeze that in today.",
    "110556": "I'm doing similar too, although I'm segmenting the image differently. I'm using a CNN to find the location of the centroid of the chamber, then binarisation to find the boundaries of the chamber. Like you I had problems with some of the patients' left ventricle merging with the rest of the heart, but there is a way to deal with that if you constrain the change in location and size of the boundary between adjacent images."
  },
  "source": "meta"
}