{
  "id": 207183,
  "title": "Lung masks for training data",
  "url": "/competitions/ranzcr-clip-catheter-line-classification/discussion/207183",
  "author_name": "",
  "post_date": "2020-12-28T15:11:13.633982900Z",
  "votes": 79,
  "comment_count": 30,
  "views": 0,
  "content": "<p>This is a very interesting competition as I have worked with this problem a few years ago and I have personal interest in a good outcome of this competition. </p>\n<p>From my experience having lung masks is a critical aspect of detecting intubation/catheter malpositions - which is the hardest and most critical part of this competition.</p>\n<p>Therefore, I am releasing a dataset, which contains lung mask predictions for the training dataset of this competition. I cannot share the model used due to proprietary data used - however, it is very easy to build your own UNet model, as I provide lung masks mapping to the competition training data.</p>\n<p>The dataset can be found at:<br>\n<a href=\"https://www.kaggle.com/raddar/ranzcr-clip-lung-contours\" target=\"_blank\">https://www.kaggle.com/raddar/ranzcr-clip-lung-contours</a></p>\n<p>Simple explarotary notebook:<br>\n<a href=\"https://www.kaggle.com/raddar/simple-lung-contour-visualization\" target=\"_blank\">https://www.kaggle.com/raddar/simple-lung-contour-visualization</a></p>\n<p><img src=\"https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F405318%2F568740889eea317ec9a16a38bee2312f%2F__results___2_0.png?generation=1609168205449235&amp;alt=media\" alt=\"\"></p>\n<p>Hope you find this useful.<br>\nIf there is enough interest I could share more useful model-based predictions later on :)</p>",
  "messages": [
    {
      "id": "1129819",
      "postDate": "12/28/2020 15:11:13",
      "content": "<p>This is a very interesting competition as I have worked with this problem a few years ago and I have personal interest in a good outcome of this competition. </p>\n<p>From my experience having lung masks is a critical aspect of detecting intubation/catheter malpositions - which is the hardest and most critical part of this competition.</p>\n<p>Therefore, I am releasing a dataset, which contains lung mask predictions for the training dataset of this competition. I cannot share the model used due to proprietary data used - however, it is very easy to build your own UNet model, as I provide lung masks mapping to the competition training data.</p>\n<p>The dataset can be found at:<br>\n<a href=\"https://www.kaggle.com/raddar/ranzcr-clip-lung-contours\" target=\"_blank\">https://www.kaggle.com/raddar/ranzcr-clip-lung-contours</a></p>\n<p>Simple explarotary notebook:<br>\n<a href=\"https://www.kaggle.com/raddar/simple-lung-contour-visualization\" target=\"_blank\">https://www.kaggle.com/raddar/simple-lung-contour-visualization</a></p>\n<p><img src=\"https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F405318%2F568740889eea317ec9a16a38bee2312f%2F__results___2_0.png?generation=1609168205449235&amp;alt=media\" alt=\"\"></p>\n<p>Hope you find this useful.<br>\nIf there is enough interest I could share more useful model-based predictions later on :)</p>",
      "rawMarkdown": "This is a very interesting competition as I have worked with this problem a few years ago and I have personal interest in a good outcome of this competition. \n\nFrom my experience having lung masks is a critical aspect of detecting intubation/catheter malpositions - which is the hardest and most critical part of this competition.\n\nTherefore, I am releasing a dataset, which contains lung mask predictions for the training dataset of this competition. I cannot share the model used due to proprietary data used - however, it is very easy to build your own UNet model, as I provide lung masks mapping to the competition training data.\n\nThe dataset can be found at:\nhttps://www.kaggle.com/raddar/ranzcr-clip-lung-contours\n\nSimple explarotary notebook:\nhttps://www.kaggle.com/raddar/simple-lung-contour-visualization\n\n![](https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F405318%2F568740889eea317ec9a16a38bee2312f%2F__results___2_0.png?generation=1609168205449235&alt=media)\n\nHope you find this useful.\nIf there is enough interest I could share more useful model-based predictions later on :)",
      "votes": null
    },
    {
      "id": "1129890",
      "postDate": "12/28/2020 16:02:52",
      "content": "<p>Thanks for sharing!</p>",
      "rawMarkdown": "Thanks for sharing!",
      "votes": null
    },
    {
      "id": "1129897",
      "postDate": "12/28/2020 16:12:31",
      "content": "<p>Awesome. Thanks. </p>",
      "rawMarkdown": "Awesome. Thanks.",
      "votes": null
    },
    {
      "id": "1129936",
      "postDate": "12/28/2020 16:54:16",
      "content": "<p>For those who are thinking how to use lung masks.</p>\n<p><img src=\"https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F405318%2F581ee84e2348b540fa23a3e7d5ca1094%2F__results___2_0_CVC.png?generation=1609173976683459&amp;alt=media\" alt=\"\"></p>\n<p>I eye-balled the refrence areas where CVC position is considered normal (green), borderline (yellow), abnormal (red). So having two reference points, one could use the input of CVC segmentation tail position with reference area boxes to determine normal/borderline/malposition of CVC - one could think of this as coordinate meta modelling. I do hope someone thinks of a better way to do it :)</p>\n<p>p.s. red box is just one of the types of \"abnormal CVC\", there many other \"abnormal CVC\" cases, i.e. CVC tail ending in a neck, a CVC tail having a hook shape, etc.</p>\n<p>p.s.s. normal/borderline/abormal CVC is very subjective and different radiologists can have different opinions. Subjectivity is another challenge of the competition.</p>",
      "rawMarkdown": "For those who are thinking how to use lung masks.\n\n![](https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F405318%2F581ee84e2348b540fa23a3e7d5ca1094%2F__results___2_0_CVC.png?generation=1609173976683459&alt=media)\n\nI eye-balled the refrence areas where CVC position is considered normal (green), borderline (yellow), abnormal (red). So having two reference points, one could use the input of CVC segmentation tail position with reference area boxes to determine normal/borderline/malposition of CVC - one could think of this as coordinate meta modelling. I do hope someone thinks of a better way to do it :)\n\np.s. red box is just one of the types of \"abnormal CVC\", there many other \"abnormal CVC\" cases, i.e. CVC tail ending in a neck, a CVC tail having a hook shape, etc.\n\np.s.s. normal/borderline/abormal CVC is very subjective and different radiologists can have different opinions. Subjectivity is another challenge of the competition.",
      "votes": null
    },
    {
      "id": "1132561",
      "postDate": "12/30/2020 13:51:15",
      "content": "<p>check this:<br>\nA Deep-Learning System for Fully-Automated Peripherally Inserted Central Catheter (PICC) Tip Detection</p>\n<p><img src=\"https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F113660%2F30d9306ba3367a2b1464ae962b148639%2FSelection_259.png?generation=1609336244828743&amp;alt=media\" alt=\"\"></p>\n<p><img src=\"https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F113660%2F93136aba5e4a07046d23dcce45676cca%2FSelection_260.png?generation=1609336272720926&amp;alt=media\" alt=\"\"></p>",
      "rawMarkdown": "check this:\nA Deep-Learning System for Fully-Automated Peripherally Inserted Central Catheter (PICC) Tip Detection\n\n![](https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F113660%2F30d9306ba3367a2b1464ae962b148639%2FSelection_259.png?generation=1609336244828743&alt=media)\n\n![](https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F113660%2F93136aba5e4a07046d23dcce45676cca%2FSelection_260.png?generation=1609336272720926&alt=media)",
      "votes": null
    },
    {
      "id": "1132607",
      "postDate": "12/30/2020 14:34:24",
      "content": "<p>I was just reading this paper and wanted to give it a try :)</p>",
      "rawMarkdown": "I was just reading this paper and wanted to give it a try :)",
      "votes": null
    },
    {
      "id": "1134833",
      "postDate": "01/01/2021 16:07:47",
      "content": "<p><a href=\"https://www.kaggle.com/raddar\" target=\"_blank\">@raddar</a>,</p>\n<p>if someone… who already did parallel projection DRR…  could implement this:<br>\n<a href=\"https://clinicalimagingscience.org/drrgenerator-a-three-dimensional-slicer-extension-for-the-rapid-and-easy-development-of-digitally-reconstructed-radiographs/\" target=\"_blank\">https://clinicalimagingscience.org/drrgenerator-a-three-dimensional-slicer-extension-for-the-rapid-and-easy-development-of-digitally-reconstructed-radiographs/</a><br>\nin a slicer independent way… then i would have some ideas how to make reference areas for the detection of the malposition of the CVC.<br>\nThe idea is not new, just a <a href=\"https://www.kaggle.com/c/rsna-pneumonia-detection-challenge/discussion/64979\" target=\"_blank\">hint</a>.</p>",
      "rawMarkdown": "raddar,\n\nif someone... who already did parallel projection DRR...  could implement this:\nhttps://clinicalimagingscience.org/drrgenerator-a-three-dimensional-slicer-extension-for-the-rapid-and-easy-development-of-digitally-reconstructed-radiographs/\nin a slicer independent way... then i would have some ideas how to make reference areas for the detection of the malposition of the CVC.\nThe idea is not new, just a [hint](https://www.kaggle.com/c/rsna-pneumonia-detection-challenge/discussion/64979).",
      "votes": null
    },
    {
      "id": "1134863",
      "postDate": "01/01/2021 16:43:47",
      "content": "<p>Wow. I will definetly study this, I had some fun with DRR before - <a href=\"https://www.kaggle.com/raddar/bone-drr-unet\" target=\"_blank\">https://www.kaggle.com/raddar/bone-drr-unet</a>. The no.1 problem was that most of publicly available CT's are done with contrast, which was a bottleneck for realistic DRR X-rays.</p>\n<p>As for malpositions and lung segmentation - the hardest part is the right atrium cases (hard to differentiante between borderline and abnormal); Other malpositions (wrong venae, kinking) can be solved easily with CVC segmentation/detection logic.</p>",
      "rawMarkdown": "Wow. I will definetly study this, I had some fun with DRR before - https://www.kaggle.com/raddar/bone-drr-unet. The no.1 problem was that most of publicly available CT's are done with contrast, which was a bottleneck for realistic DRR X-rays.\n\nAs for malpositions and lung segmentation - the hardest part is the right atrium cases (hard to differentiante between borderline and abnormal); Other malpositions (wrong venae, kinking) can be solved easily with CVC segmentation/detection logic.",
      "votes": null
    },
    {
      "id": "1134883",
      "postDate": "01/01/2021 17:09:40",
      "content": "<p><a href=\"https://www.kaggle.com/raddar\" target=\"_blank\">@raddar</a>, <br>\nif it was not obvious yet, i knew about your DRR, this is why i wrote like that =)</p>\n<p>I think maybe an automatisation of the slicer extension with multiple angles and automatic export of the viewport could do the trick. The contrast agent problem - true, however there are some datasets that contain few dozen thin slice thorax ct's w/o contrast. Think on the COPDgene, the fibrosis comp… etc.</p>\n<p>I was not thinking on lung segmentation… take a look <a href=\"https://www.kaggle.com/sandorkonya/ct-lung-heart-trachea-segmentation\" target=\"_blank\">at this</a>, the result of the   surpising fibrosis progression competition.</p>\n<p>I think the borderline / abnormal problem is way to subjective, there will be huge variation among the results!</p>",
      "rawMarkdown": "raddar, \nif it was not obvious yet, i knew about your DRR, this is why i wrote like that =)\n\nI think maybe an automatisation of the slicer extension with multiple angles and automatic export of the viewport could do the trick. The contrast agent problem - true, however there are some datasets that contain few dozen thin slice thorax ct's w/o contrast. Think on the COPDgene, the fibrosis comp... etc.\n\nI was not thinking on lung segmentation... take a look [at this](https://www.kaggle.com/sandorkonya/ct-lung-heart-trachea-segmentation), the result of the  ~~scandalous~~ surpising fibrosis progression competition.\n\nI think the borderline / abnormal problem is way to subjective, there will be huge variation among the results!",
      "votes": null
    },
    {
      "id": "1137222",
      "postDate": "01/03/2021 19:02:04",
      "content": "<p>Thank you for sharing radda!  As you have suggested I build my own simple UNet model, that can map the x-ray chest of the competition data to lung masks. In my first try I used my own custom architecture and trained from scratch but the results are poor: <a href=\"https://www.kaggle.com/philippschwarz/ranzcr-lung-mask-model-not-pretrained\" target=\"_blank\">Notebook</a><br>\nIn my second attempt, I use pretrained UNet models and it works really well. <a href=\"https://www.kaggle.com/philippschwarz/ranzcr-lung-mask-transfer-learning\" target=\"_blank\">Notebook</a><br>\nI have shared the lung segmentation model as dataset so others can also make use of it. <a href=\"https://www.kaggle.com/philippschwarz/ranzcr-lungmask-model\" target=\"_blank\">Dataset</a></p>\n<p>I am thinking of simply using 4 channels, RGB + masks as input to the network. Does this make sense or do you have a another suggestion how to leverage the masks in this competition? </p>",
      "rawMarkdown": "Thank you for sharing radda!  As you have suggested I build my own simple UNet model, that can map the x-ray chest of the competition data to lung masks. In my first try I used my own custom architecture and trained from scratch but the results are poor: [Notebook](https://www.kaggle.com/philippschwarz/ranzcr-lung-mask-model-not-pretrained)\nIn my second attempt, I use pretrained UNet models and it works really well. [Notebook](https://www.kaggle.com/philippschwarz/ranzcr-lung-mask-transfer-learning)\nI have shared the lung segmentation model as dataset so others can also make use of it. [Dataset](https://www.kaggle.com/philippschwarz/ranzcr-lungmask-model)\n\nI am thinking of simply using 4 channels, RGB + masks as input to the network. Does this make sense or do you have a another suggestion how to leverage the masks in this competition?",
      "votes": null
    },
    {
      "id": "1142339",
      "postDate": "01/07/2021 10:23:58",
      "content": "<p>here are some results of detecting CVC tips</p>\n<p><img src=\"https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F113660%2Ffdd13506736cce9699c08ac72e7073e6%2FSelection_086.png?generation=1610014997523184&amp;alt=media\" alt=\"\"></p>",
      "rawMarkdown": "here are some results of detecting CVC tips\n\n![](https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F113660%2Ffdd13506736cce9699c08ac72e7073e6%2FSelection_086.png?generation=1610014997523184&alt=media)",
      "votes": null
    },
    {
      "id": "1142387",
      "postDate": "01/07/2021 10:50:49",
      "content": "<p>is this classifier based? looks amazing</p>",
      "rawMarkdown": "is this classifier based? looks amazing",
      "votes": null
    },
    {
      "id": "1142836",
      "postDate": "01/07/2021 16:11:12",
      "content": "<p>it is  a pixel classifier (like segmentation).<br>\nbasically it works but you need to work at high resolution, e.g. at the original resolution, if you want to be very accurate. you can inspect the images at the original resolution. there, the end of the line is more visible.</p>",
      "rawMarkdown": "it is  a pixel classifier (like segmentation).\nbasically it works but you need to work at high resolution, e.g. at the original resolution, if you want to be very accurate. you can inspect the images at the original resolution. there, the end of the line is more visible.",
      "votes": null
    },
    {
      "id": "1142915",
      "postDate": "01/07/2021 17:03:49",
      "content": "<p>Thanks <a href=\"https://www.kaggle.com/raddar\" target=\"_blank\">@raddar</a> - I am curious if competition rules allow to use this data though as it is pretrained on private data? What license does the data have?</p>",
      "rawMarkdown": "Thanks @raddar - I am curious if competition rules allow to use this data though as it is pretrained on private data? What license does the data have?",
      "votes": null
    },
    {
      "id": "1143126",
      "postDate": "01/07/2021 19:04:30",
      "content": "<p>i did another experiment on detecting the line pixel<br>\n<img src=\"https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F113660%2F61d2fdb64990bfe89e38733c15889dad%2FSelection_090.png?generation=1610046200202324&amp;alt=media\" alt=\"\"></p>\n<p>i come to the conclusion that the best method is to train and softmax pixel classifier to label:</p>\n<ul>\n<li>end point normal</li>\n<li>end point abnormal</li>\n<li>end point borderline</li>\n<li>point on the line (optional)</li>\n</ul>",
      "rawMarkdown": "i did another experiment on detecting the line pixel\n![](https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F113660%2F61d2fdb64990bfe89e38733c15889dad%2FSelection_090.png?generation=1610046200202324&alt=media)\n\ni come to the conclusion that the best method is to train and softmax pixel classifier to label:\n- end point normal\n- end point abnormal\n- end point borderline\n- point on the line (optional)",
      "votes": null
    },
    {
      "id": "1143808",
      "postDate": "01/08/2021 04:33:18",
      "content": "<p><img src=\"https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F113660%2F9fd1d04b46f7eb84e5d5d99225e2c32c%2FSelection_111.png?generation=1610080396552834&amp;alt=media\" alt=\"\"></p>",
      "rawMarkdown": "![](https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F113660%2F9fd1d04b46f7eb84e5d5d99225e2c32c%2FSelection_111.png?generation=1610080396552834&alt=media)",
      "votes": null
    },
    {
      "id": "1144146",
      "postDate": "01/08/2021 09:05:28",
      "content": "<p>maybe a stupid question, how to get the right tip, since there are two possible tip(first point and last point in annotation's data column)</p>",
      "rawMarkdown": "maybe a stupid question, how to get the right tip, since there are two possible tip(first point and last point in annotation's data column)",
      "votes": null
    },
    {
      "id": "1144312",
      "postDate": "01/08/2021 11:36:48",
      "content": "<p>for a simple solution, just choose the endpoint closest to the center of the image. this is about 99% correct. </p>\n<p>a complete solution will have to include human verification at the end.</p>",
      "rawMarkdown": "for a simple solution, just choose the endpoint closest to the center of the image. this is about 99% correct. \n\na complete solution will have to include human verification at the end.",
      "votes": null
    },
    {
      "id": "1144339",
      "postDate": "01/08/2021 12:05:25",
      "content": "<p>i think this method is good. i am seeing the spectrum of color as I would expect</p>\n<p><img src=\"https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F113660%2Fb987079067903d6b3df0c7a1325d7c9c%2FSelection_117.png?generation=1610107506325141&amp;alt=media\" alt=\"\"> </p>\n<p>one can create synthetic data by extending or shorten the tip</p>\n<p>the lung segmentation can help to normalize the image to the correct size.</p>",
      "rawMarkdown": "i think this method is good. i am seeing the spectrum of color as I would expect\n\n![](https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F113660%2Fb987079067903d6b3df0c7a1325d7c9c%2FSelection_117.png?generation=1610107506325141&alt=media) \n\none can create synthetic data by extending or shorten the tip\n\nthe lung segmentation can help to normalize the image to the correct size.",
      "votes": null
    },
    {
      "id": "1144347",
      "postDate": "01/08/2021 12:11:44",
      "content": "<p>thanks a lot</p>",
      "rawMarkdown": "thanks a lot",
      "votes": null
    },
    {
      "id": "1144434",
      "postDate": "01/08/2021 13:11:14",
      "content": "<p>The data (as images) where taken from Public Domain (CC0) datasets, such as NIH <a href=\"https://www.kaggle.com/nih-chest-xrays/data\" target=\"_blank\">https://www.kaggle.com/nih-chest-xrays/data</a></p>",
      "rawMarkdown": "The data (as images) where taken from Public Domain (CC0) datasets, such as NIH https://www.kaggle.com/nih-chest-xrays/data",
      "votes": null
    },
    {
      "id": "1144845",
      "postDate": "01/08/2021 17:50:35",
      "content": "<p><a href=\"https://www.kaggle.com/hengck23\" target=\"_blank\">@hengck23</a> ,<br>\nare you \"generating tubes\" by changing the pixels on the original image or you are generating maps for the \" additional supervision\", you <a href=\"https://www.kaggle.com/c/ranzcr-clip-catheter-line-classification/discussion/205243\" target=\"_blank\">explained here</a>?</p>",
      "rawMarkdown": "hengck23 ,\nare you \"generating tubes\" by changing the pixels on the original image or you are generating maps for the \" additional supervision\", you [explained here](https://www.kaggle.com/c/ranzcr-clip-catheter-line-classification/discussion/205243)?",
      "votes": null
    },
    {
      "id": "1145064",
      "postDate": "01/08/2021 21:11:32",
      "content": "<p>there is one more dataset that may be useful<br>\n<img src=\"https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcRKnTwzBb8rQVoXaGDQjUTvRAx2L0hxFpYkzg&amp;usqp=CAU\" alt=\"\"><br>\n<a href=\"https://arxiv.org/abs/1703.08770\" target=\"_blank\">https://arxiv.org/abs/1703.08770</a></p>",
      "rawMarkdown": "there is one more dataset that may be useful\n![](https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcRKnTwzBb8rQVoXaGDQjUTvRAx2L0hxFpYkzg&usqp=CAU)\nhttps://arxiv.org/abs/1703.08770",
      "votes": null
    },
    {
      "id": "1145366",
      "postDate": "01/09/2021 05:03:13",
      "content": "<p>the plan is to make an advance photoshop GAN for inpainting</p>\n<p><img src=\"https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F113660%2F1d22a511d2ee82e1870e1e7e405d1f93%2FSelection_120.png?generation=1610168565598515&amp;alt=media\" alt=\"\"></p>",
      "rawMarkdown": "the plan is to make an advance photoshop GAN for inpainting\n\n![](https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F113660%2F1d22a511d2ee82e1870e1e7e405d1f93%2FSelection_120.png?generation=1610168565598515&alt=media)",
      "votes": null
    },
    {
      "id": "1145600",
      "postDate": "01/09/2021 08:48:03",
      "content": "<p>it seems there are two types of abnormal : too high or too low<br>\n<img src=\"https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F113660%2Faf78a6cea36a90abf04fc4312c1d83c8%2FSelection_134.png?generation=1610182052490961&amp;alt=media\" alt=\"\"></p>\n<p>a clustering algorithm would reveal better</p>",
      "rawMarkdown": "it seems there are two types of abnormal : too high or too low\n![](https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F113660%2Faf78a6cea36a90abf04fc4312c1d83c8%2FSelection_134.png?generation=1610182052490961&alt=media)\n\na clustering algorithm would reveal better",
      "votes": null
    },
    {
      "id": "1145625",
      "postDate": "01/09/2021 09:06:26",
      "content": "<p><a href=\"https://www.kaggle.com/hengck23\" target=\"_blank\">@hengck23</a> ,</p>\n<p>no need to cluster, I can confirm it, these are the most common abnormal positions.</p>",
      "rawMarkdown": "hengck23 ,\n\nno need to cluster, I can confirm it, these are the most common abnormal positions.",
      "votes": null
    },
    {
      "id": "1145627",
      "postDate": "01/09/2021 09:08:04",
      "content": "<p><a href=\"https://www.kaggle.com/hengck23\" target=\"_blank\">@hengck23</a> ,<br>\nsounds good with the inpainting. The areas are only few dozen pixels of radius, a GAN could possibly learn to fill this small area pretty confidently.</p>",
      "rawMarkdown": "hengck23 ,\nsounds good with the inpainting. The areas are only few dozen pixels of radius, a GAN could possibly learn to fill this small area pretty confidently.",
      "votes": null
    },
    {
      "id": "1146067",
      "postDate": "01/09/2021 14:17:27",
      "content": "<p>what I have done is split CVC - Abnormal to <code>Right Atrium</code> and <code>Other</code>. Then did the same with CVC - Borderline.</p>\n<p>Then plot heatmaps of CVC tips. This is how normal looks:</p>\n<p><img src=\"https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F405318%2F7941c78df4971e6b12b0c2659a944b48%2Fnormal.png?generation=1610201668234131&amp;alt=media\" alt=\"\"></p>\n<p>Abnormal (top right atrium, bottom other):</p>\n<p><img src=\"https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F405318%2F8a3c2cc7d697bf2e115b40840649fb4a%2Fborderline.png?generation=1610201701859443&amp;alt=media\" alt=\"\"></p>\n<p>Borderline (top right atrium, bottom other):</p>\n<p><img src=\"https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F405318%2Fd75bb10692996f6ed2b1bf14f4e1d380%2Fabnormal.png?generation=1610201724738402&amp;alt=media\" alt=\"\"></p>\n<p>So when the tip is close to the heart, tip variance is pretty small. however all other positions are tough. I even calculated AUC scores for each category with one of the models I have:</p>\n<pre><code>AUC - Normal 0.9260295990186276\nAUC - Borderline - Right Atrium 0.8789892389197191\nAUC - Borderline - Other 0.7966479038305525\nAUC - Abnormal - Right Atrium 0.9434947157845324\nAUC - Abnormal - Other 0.913221206423610\n</code></pre>\n<p>So the highest problem with classification is with CVC Borderline Other category. So quite the opposite problem <a href=\"https://www.kaggle.com/hengck23\" target=\"_blank\">@hengck23</a> has been focusing so far:)</p>",
      "rawMarkdown": "what I have done is split CVC - Abnormal to `Right Atrium` and `Other`. Then did the same with CVC - Borderline.\n\nThen plot heatmaps of CVC tips. This is how normal looks:\n\n![](https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F405318%2F7941c78df4971e6b12b0c2659a944b48%2Fnormal.png?generation=1610201668234131&alt=media)\n\nAbnormal (top right atrium, bottom other):\n\n![](https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F405318%2F8a3c2cc7d697bf2e115b40840649fb4a%2Fborderline.png?generation=1610201701859443&alt=media)\n\nBorderline (top right atrium, bottom other):\n\n![](https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F405318%2Fd75bb10692996f6ed2b1bf14f4e1d380%2Fabnormal.png?generation=1610201724738402&alt=media)\n\n\nSo when the tip is close to the heart, tip variance is pretty small. however all other positions are tough. I even calculated AUC scores for each category with one of the models I have:\n\n```\nAUC - Normal 0.9260295990186276\nAUC - Borderline - Right Atrium 0.8789892389197191\nAUC - Borderline - Other 0.7966479038305525\nAUC - Abnormal - Right Atrium 0.9434947157845324\nAUC - Abnormal - Other 0.913221206423610\n```\n\n\nSo the highest problem with classification is with CVC Borderline Other category. So quite the opposite problem @hengck23 has been focusing so far:)",
      "votes": null
    },
    {
      "id": "1146094",
      "postDate": "01/09/2021 14:36:14",
      "content": "<p>note that there is an \"additional\" class \"CVC incomplete  imaged\", which becomes a subset of cvc abnormal</p>\n<p><img src=\"https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F113660%2Fdae39474df7534bf9b74c2bb9628dacf%2FSelection_025.png?generation=1610202952494636&amp;alt=media\" alt=\"\"></p>",
      "rawMarkdown": "note that there is an \"additional\" class \"CVC incomplete  imaged\", which becomes a subset of cvc abnormal\n\n\n![](https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F113660%2Fdae39474df7534bf9b74c2bb9628dacf%2FSelection_025.png?generation=1610202952494636&alt=media)",
      "votes": null
    },
    {
      "id": "1171192",
      "postDate": "01/26/2021 17:14:05",
      "content": "<p>Hi <a href=\"https://www.kaggle.com/raddar\" target=\"_blank\">@raddar</a> , sorry to hack the thread. But I noticed from the NIH link that the dataset does not contain lung segmentation masks to be used as ground-truth, is that correct? How did you get the masks to train a segmentation model?</p>\n<p>Thanks </p>",
      "rawMarkdown": "Hi @raddar , sorry to hack the thread. But I noticed from the NIH link that the dataset does not contain lung segmentation masks to be used as ground-truth, is that correct? How did you get the masks to train a segmentation model?\n\nThanks",
      "votes": null
    },
    {
      "id": "1284538",
      "postDate": "04/26/2021 04:12:18",
      "content": "<p>awesome…</p>",
      "rawMarkdown": "awesome...",
      "votes": null
    }
  ],
  "comments": [
    {
      "id": 1129890,
      "author_name": "nguyenbadung",
      "author_url": "",
      "post_date": "12/28/2020 16:02:52",
      "content": "<p>Thanks for sharing!</p>",
      "votes": null,
      "replies": []
    },
    {
      "id": 1129897,
      "author_name": "ipythonx",
      "author_url": "",
      "post_date": "12/28/2020 16:12:31",
      "content": "<p>Awesome. Thanks. </p>",
      "votes": null,
      "replies": []
    },
    {
      "id": 1129936,
      "author_name": "raddar",
      "author_url": "",
      "post_date": "12/28/2020 16:54:16",
      "content": "<p>For those who are thinking how to use lung masks.</p>\n<p><img src=\"https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F405318%2F581ee84e2348b540fa23a3e7d5ca1094%2F__results___2_0_CVC.png?generation=1609173976683459&amp;alt=media\" alt=\"\"></p>\n<p>I eye-balled the refrence areas where CVC position is considered normal (green), borderline (yellow), abnormal (red). So having two reference points, one could use the input of CVC segmentation tail position with reference area boxes to determine normal/borderline/malposition of CVC - one could think of this as coordinate meta modelling. I do hope someone thinks of a better way to do it :)</p>\n<p>p.s. red box is just one of the types of \"abnormal CVC\", there many other \"abnormal CVC\" cases, i.e. CVC tail ending in a neck, a CVC tail having a hook shape, etc.</p>\n<p>p.s.s. normal/borderline/abormal CVC is very subjective and different radiologists can have different opinions. Subjectivity is another challenge of the competition.</p>",
      "votes": null,
      "replies": [
        {
          "id": 1134833,
          "author_name": "sandorkonya",
          "author_url": "",
          "post_date": "01/01/2021 16:07:47",
          "content": "<p><a href=\"https://www.kaggle.com/raddar\" target=\"_blank\">@raddar</a>,</p>\n<p>if someone… who already did parallel projection DRR…  could implement this:<br>\n<a href=\"https://clinicalimagingscience.org/drrgenerator-a-three-dimensional-slicer-extension-for-the-rapid-and-easy-development-of-digitally-reconstructed-radiographs/\" target=\"_blank\">https://clinicalimagingscience.org/drrgenerator-a-three-dimensional-slicer-extension-for-the-rapid-and-easy-development-of-digitally-reconstructed-radiographs/</a><br>\nin a slicer independent way… then i would have some ideas how to make reference areas for the detection of the malposition of the CVC.<br>\nThe idea is not new, just a <a href=\"https://www.kaggle.com/c/rsna-pneumonia-detection-challenge/discussion/64979\" target=\"_blank\">hint</a>.</p>",
          "votes": null,
          "replies": []
        },
        {
          "id": 1134863,
          "author_name": "raddar",
          "author_url": "",
          "post_date": "01/01/2021 16:43:47",
          "content": "<p>Wow. I will definetly study this, I had some fun with DRR before - <a href=\"https://www.kaggle.com/raddar/bone-drr-unet\" target=\"_blank\">https://www.kaggle.com/raddar/bone-drr-unet</a>. The no.1 problem was that most of publicly available CT's are done with contrast, which was a bottleneck for realistic DRR X-rays.</p>\n<p>As for malpositions and lung segmentation - the hardest part is the right atrium cases (hard to differentiante between borderline and abnormal); Other malpositions (wrong venae, kinking) can be solved easily with CVC segmentation/detection logic.</p>",
          "votes": null,
          "replies": []
        },
        {
          "id": 1134883,
          "author_name": "sandorkonya",
          "author_url": "",
          "post_date": "01/01/2021 17:09:40",
          "content": "<p><a href=\"https://www.kaggle.com/raddar\" target=\"_blank\">@raddar</a>, <br>\nif it was not obvious yet, i knew about your DRR, this is why i wrote like that =)</p>\n<p>I think maybe an automatisation of the slicer extension with multiple angles and automatic export of the viewport could do the trick. The contrast agent problem - true, however there are some datasets that contain few dozen thin slice thorax ct's w/o contrast. Think on the COPDgene, the fibrosis comp… etc.</p>\n<p>I was not thinking on lung segmentation… take a look <a href=\"https://www.kaggle.com/sandorkonya/ct-lung-heart-trachea-segmentation\" target=\"_blank\">at this</a>, the result of the   surpising fibrosis progression competition.</p>\n<p>I think the borderline / abnormal problem is way to subjective, there will be huge variation among the results!</p>",
          "votes": null,
          "replies": []
        }
      ]
    },
    {
      "id": 1132561,
      "author_name": "hengck23",
      "author_url": "",
      "post_date": "12/30/2020 13:51:15",
      "content": "<p>check this:<br>\nA Deep-Learning System for Fully-Automated Peripherally Inserted Central Catheter (PICC) Tip Detection</p>\n<p><img src=\"https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F113660%2F30d9306ba3367a2b1464ae962b148639%2FSelection_259.png?generation=1609336244828743&amp;alt=media\" alt=\"\"></p>\n<p><img src=\"https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F113660%2F93136aba5e4a07046d23dcce45676cca%2FSelection_260.png?generation=1609336272720926&amp;alt=media\" alt=\"\"></p>",
      "votes": null,
      "replies": [
        {
          "id": 1132607,
          "author_name": "raddar",
          "author_url": "",
          "post_date": "12/30/2020 14:34:24",
          "content": "<p>I was just reading this paper and wanted to give it a try :)</p>",
          "votes": null,
          "replies": []
        }
      ]
    },
    {
      "id": 1137222,
      "author_name": "philippschwarz",
      "author_url": "",
      "post_date": "01/03/2021 19:02:04",
      "content": "<p>Thank you for sharing radda!  As you have suggested I build my own simple UNet model, that can map the x-ray chest of the competition data to lung masks. In my first try I used my own custom architecture and trained from scratch but the results are poor: <a href=\"https://www.kaggle.com/philippschwarz/ranzcr-lung-mask-model-not-pretrained\" target=\"_blank\">Notebook</a><br>\nIn my second attempt, I use pretrained UNet models and it works really well. <a href=\"https://www.kaggle.com/philippschwarz/ranzcr-lung-mask-transfer-learning\" target=\"_blank\">Notebook</a><br>\nI have shared the lung segmentation model as dataset so others can also make use of it. <a href=\"https://www.kaggle.com/philippschwarz/ranzcr-lungmask-model\" target=\"_blank\">Dataset</a></p>\n<p>I am thinking of simply using 4 channels, RGB + masks as input to the network. Does this make sense or do you have a another suggestion how to leverage the masks in this competition? </p>",
      "votes": null,
      "replies": []
    },
    {
      "id": 1142339,
      "author_name": "hengck23",
      "author_url": "",
      "post_date": "01/07/2021 10:23:58",
      "content": "<p>here are some results of detecting CVC tips</p>\n<p><img src=\"https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F113660%2Ffdd13506736cce9699c08ac72e7073e6%2FSelection_086.png?generation=1610014997523184&amp;alt=media\" alt=\"\"></p>",
      "votes": null,
      "replies": [
        {
          "id": 1142387,
          "author_name": "raddar",
          "author_url": "",
          "post_date": "01/07/2021 10:50:49",
          "content": "<p>is this classifier based? looks amazing</p>",
          "votes": null,
          "replies": []
        },
        {
          "id": 1142836,
          "author_name": "hengck23",
          "author_url": "",
          "post_date": "01/07/2021 16:11:12",
          "content": "<p>it is  a pixel classifier (like segmentation).<br>\nbasically it works but you need to work at high resolution, e.g. at the original resolution, if you want to be very accurate. you can inspect the images at the original resolution. there, the end of the line is more visible.</p>",
          "votes": null,
          "replies": []
        },
        {
          "id": 1143126,
          "author_name": "hengck23",
          "author_url": "",
          "post_date": "01/07/2021 19:04:30",
          "content": "<p>i did another experiment on detecting the line pixel<br>\n<img src=\"https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F113660%2F61d2fdb64990bfe89e38733c15889dad%2FSelection_090.png?generation=1610046200202324&amp;alt=media\" alt=\"\"></p>\n<p>i come to the conclusion that the best method is to train and softmax pixel classifier to label:</p>\n<ul>\n<li>end point normal</li>\n<li>end point abnormal</li>\n<li>end point borderline</li>\n<li>point on the line (optional)</li>\n</ul>",
          "votes": null,
          "replies": []
        },
        {
          "id": 1143808,
          "author_name": "hengck23",
          "author_url": "",
          "post_date": "01/08/2021 04:33:18",
          "content": "<p><img src=\"https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F113660%2F9fd1d04b46f7eb84e5d5d99225e2c32c%2FSelection_111.png?generation=1610080396552834&amp;alt=media\" alt=\"\"></p>",
          "votes": null,
          "replies": []
        },
        {
          "id": 1144146,
          "author_name": "newbiejailer",
          "author_url": "",
          "post_date": "01/08/2021 09:05:28",
          "content": "<p>maybe a stupid question, how to get the right tip, since there are two possible tip(first point and last point in annotation's data column)</p>",
          "votes": null,
          "replies": []
        },
        {
          "id": 1144312,
          "author_name": "hengck23",
          "author_url": "",
          "post_date": "01/08/2021 11:36:48",
          "content": "<p>for a simple solution, just choose the endpoint closest to the center of the image. this is about 99% correct. </p>\n<p>a complete solution will have to include human verification at the end.</p>",
          "votes": null,
          "replies": []
        },
        {
          "id": 1144339,
          "author_name": "hengck23",
          "author_url": "",
          "post_date": "01/08/2021 12:05:25",
          "content": "<p>i think this method is good. i am seeing the spectrum of color as I would expect</p>\n<p><img src=\"https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F113660%2Fb987079067903d6b3df0c7a1325d7c9c%2FSelection_117.png?generation=1610107506325141&amp;alt=media\" alt=\"\"> </p>\n<p>one can create synthetic data by extending or shorten the tip</p>\n<p>the lung segmentation can help to normalize the image to the correct size.</p>",
          "votes": null,
          "replies": []
        },
        {
          "id": 1144347,
          "author_name": "newbiejailer",
          "author_url": "",
          "post_date": "01/08/2021 12:11:44",
          "content": "<p>thanks a lot</p>",
          "votes": null,
          "replies": []
        },
        {
          "id": 1144845,
          "author_name": "sandorkonya",
          "author_url": "",
          "post_date": "01/08/2021 17:50:35",
          "content": "<p><a href=\"https://www.kaggle.com/hengck23\" target=\"_blank\">@hengck23</a> ,<br>\nare you \"generating tubes\" by changing the pixels on the original image or you are generating maps for the \" additional supervision\", you <a href=\"https://www.kaggle.com/c/ranzcr-clip-catheter-line-classification/discussion/205243\" target=\"_blank\">explained here</a>?</p>",
          "votes": null,
          "replies": []
        },
        {
          "id": 1145366,
          "author_name": "hengck23",
          "author_url": "",
          "post_date": "01/09/2021 05:03:13",
          "content": "<p>the plan is to make an advance photoshop GAN for inpainting</p>\n<p><img src=\"https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F113660%2F1d22a511d2ee82e1870e1e7e405d1f93%2FSelection_120.png?generation=1610168565598515&amp;alt=media\" alt=\"\"></p>",
          "votes": null,
          "replies": []
        },
        {
          "id": 1145600,
          "author_name": "hengck23",
          "author_url": "",
          "post_date": "01/09/2021 08:48:03",
          "content": "<p>it seems there are two types of abnormal : too high or too low<br>\n<img src=\"https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F113660%2Faf78a6cea36a90abf04fc4312c1d83c8%2FSelection_134.png?generation=1610182052490961&amp;alt=media\" alt=\"\"></p>\n<p>a clustering algorithm would reveal better</p>",
          "votes": null,
          "replies": []
        },
        {
          "id": 1145625,
          "author_name": "sandorkonya",
          "author_url": "",
          "post_date": "01/09/2021 09:06:26",
          "content": "<p><a href=\"https://www.kaggle.com/hengck23\" target=\"_blank\">@hengck23</a> ,</p>\n<p>no need to cluster, I can confirm it, these are the most common abnormal positions.</p>",
          "votes": null,
          "replies": []
        },
        {
          "id": 1145627,
          "author_name": "sandorkonya",
          "author_url": "",
          "post_date": "01/09/2021 09:08:04",
          "content": "<p><a href=\"https://www.kaggle.com/hengck23\" target=\"_blank\">@hengck23</a> ,<br>\nsounds good with the inpainting. The areas are only few dozen pixels of radius, a GAN could possibly learn to fill this small area pretty confidently.</p>",
          "votes": null,
          "replies": []
        },
        {
          "id": 1146067,
          "author_name": "raddar",
          "author_url": "",
          "post_date": "01/09/2021 14:17:27",
          "content": "<p>what I have done is split CVC - Abnormal to <code>Right Atrium</code> and <code>Other</code>. Then did the same with CVC - Borderline.</p>\n<p>Then plot heatmaps of CVC tips. This is how normal looks:</p>\n<p><img src=\"https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F405318%2F7941c78df4971e6b12b0c2659a944b48%2Fnormal.png?generation=1610201668234131&amp;alt=media\" alt=\"\"></p>\n<p>Abnormal (top right atrium, bottom other):</p>\n<p><img src=\"https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F405318%2F8a3c2cc7d697bf2e115b40840649fb4a%2Fborderline.png?generation=1610201701859443&amp;alt=media\" alt=\"\"></p>\n<p>Borderline (top right atrium, bottom other):</p>\n<p><img src=\"https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F405318%2Fd75bb10692996f6ed2b1bf14f4e1d380%2Fabnormal.png?generation=1610201724738402&amp;alt=media\" alt=\"\"></p>\n<p>So when the tip is close to the heart, tip variance is pretty small. however all other positions are tough. I even calculated AUC scores for each category with one of the models I have:</p>\n<pre><code>AUC - Normal 0.9260295990186276\nAUC - Borderline - Right Atrium 0.8789892389197191\nAUC - Borderline - Other 0.7966479038305525\nAUC - Abnormal - Right Atrium 0.9434947157845324\nAUC - Abnormal - Other 0.913221206423610\n</code></pre>\n<p>So the highest problem with classification is with CVC Borderline Other category. So quite the opposite problem <a href=\"https://www.kaggle.com/hengck23\" target=\"_blank\">@hengck23</a> has been focusing so far:)</p>",
          "votes": null,
          "replies": []
        },
        {
          "id": 1146094,
          "author_name": "hengck23",
          "author_url": "",
          "post_date": "01/09/2021 14:36:14",
          "content": "<p>note that there is an \"additional\" class \"CVC incomplete  imaged\", which becomes a subset of cvc abnormal</p>\n<p><img src=\"https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F113660%2Fdae39474df7534bf9b74c2bb9628dacf%2FSelection_025.png?generation=1610202952494636&amp;alt=media\" alt=\"\"></p>",
          "votes": null,
          "replies": []
        }
      ]
    },
    {
      "id": 1142915,
      "author_name": "philippsinger",
      "author_url": "",
      "post_date": "01/07/2021 17:03:49",
      "content": "<p>Thanks <a href=\"https://www.kaggle.com/raddar\" target=\"_blank\">@raddar</a> - I am curious if competition rules allow to use this data though as it is pretrained on private data? What license does the data have?</p>",
      "votes": null,
      "replies": [
        {
          "id": 1144434,
          "author_name": "raddar",
          "author_url": "",
          "post_date": "01/08/2021 13:11:14",
          "content": "<p>The data (as images) where taken from Public Domain (CC0) datasets, such as NIH <a href=\"https://www.kaggle.com/nih-chest-xrays/data\" target=\"_blank\">https://www.kaggle.com/nih-chest-xrays/data</a></p>",
          "votes": null,
          "replies": []
        },
        {
          "id": 1171192,
          "author_name": "arc144",
          "author_url": "",
          "post_date": "01/26/2021 17:14:05",
          "content": "<p>Hi <a href=\"https://www.kaggle.com/raddar\" target=\"_blank\">@raddar</a> , sorry to hack the thread. But I noticed from the NIH link that the dataset does not contain lung segmentation masks to be used as ground-truth, is that correct? How did you get the masks to train a segmentation model?</p>\n<p>Thanks </p>",
          "votes": null,
          "replies": []
        }
      ]
    },
    {
      "id": 1145064,
      "author_name": "hengck23",
      "author_url": "",
      "post_date": "01/08/2021 21:11:32",
      "content": "<p>there is one more dataset that may be useful<br>\n<img src=\"https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcRKnTwzBb8rQVoXaGDQjUTvRAx2L0hxFpYkzg&amp;usqp=CAU\" alt=\"\"><br>\n<a href=\"https://arxiv.org/abs/1703.08770\" target=\"_blank\">https://arxiv.org/abs/1703.08770</a></p>",
      "votes": null,
      "replies": []
    },
    {
      "id": 1284538,
      "author_name": "junghoonchoi",
      "author_url": "",
      "post_date": "04/26/2021 04:12:18",
      "content": "<p>awesome…</p>",
      "votes": null,
      "replies": []
    }
  ],
  "raw_markdown_by_id": {
    "1129819": "This is a very interesting competition as I have worked with this problem a few years ago and I have personal interest in a good outcome of this competition. \n\nFrom my experience having lung masks is a critical aspect of detecting intubation/catheter malpositions - which is the hardest and most critical part of this competition.\n\nTherefore, I am releasing a dataset, which contains lung mask predictions for the training dataset of this competition. I cannot share the model used due to proprietary data used - however, it is very easy to build your own UNet model, as I provide lung masks mapping to the competition training data.\n\nThe dataset can be found at:\nhttps://www.kaggle.com/raddar/ranzcr-clip-lung-contours\n\nSimple explarotary notebook:\nhttps://www.kaggle.com/raddar/simple-lung-contour-visualization\n\n![](https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F405318%2F568740889eea317ec9a16a38bee2312f%2F__results___2_0.png?generation=1609168205449235&alt=media)\n\nHope you find this useful.\nIf there is enough interest I could share more useful model-based predictions later on :)",
    "1129890": "Thanks for sharing!",
    "1129897": "Awesome. Thanks.",
    "1129936": "For those who are thinking how to use lung masks.\n\n![](https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F405318%2F581ee84e2348b540fa23a3e7d5ca1094%2F__results___2_0_CVC.png?generation=1609173976683459&alt=media)\n\nI eye-balled the refrence areas where CVC position is considered normal (green), borderline (yellow), abnormal (red). So having two reference points, one could use the input of CVC segmentation tail position with reference area boxes to determine normal/borderline/malposition of CVC - one could think of this as coordinate meta modelling. I do hope someone thinks of a better way to do it :)\n\np.s. red box is just one of the types of \"abnormal CVC\", there many other \"abnormal CVC\" cases, i.e. CVC tail ending in a neck, a CVC tail having a hook shape, etc.\n\np.s.s. normal/borderline/abormal CVC is very subjective and different radiologists can have different opinions. Subjectivity is another challenge of the competition.",
    "1132561": "check this:\nA Deep-Learning System for Fully-Automated Peripherally Inserted Central Catheter (PICC) Tip Detection\n\n![](https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F113660%2F30d9306ba3367a2b1464ae962b148639%2FSelection_259.png?generation=1609336244828743&alt=media)\n\n![](https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F113660%2F93136aba5e4a07046d23dcce45676cca%2FSelection_260.png?generation=1609336272720926&alt=media)",
    "1132607": "I was just reading this paper and wanted to give it a try :)",
    "1134833": "raddar,\n\nif someone... who already did parallel projection DRR...  could implement this:\nhttps://clinicalimagingscience.org/drrgenerator-a-three-dimensional-slicer-extension-for-the-rapid-and-easy-development-of-digitally-reconstructed-radiographs/\nin a slicer independent way... then i would have some ideas how to make reference areas for the detection of the malposition of the CVC.\nThe idea is not new, just a [hint](https://www.kaggle.com/c/rsna-pneumonia-detection-challenge/discussion/64979).",
    "1134863": "Wow. I will definetly study this, I had some fun with DRR before - https://www.kaggle.com/raddar/bone-drr-unet. The no.1 problem was that most of publicly available CT's are done with contrast, which was a bottleneck for realistic DRR X-rays.\n\nAs for malpositions and lung segmentation - the hardest part is the right atrium cases (hard to differentiante between borderline and abnormal); Other malpositions (wrong venae, kinking) can be solved easily with CVC segmentation/detection logic.",
    "1134883": "raddar, \nif it was not obvious yet, i knew about your DRR, this is why i wrote like that =)\n\nI think maybe an automatisation of the slicer extension with multiple angles and automatic export of the viewport could do the trick. The contrast agent problem - true, however there are some datasets that contain few dozen thin slice thorax ct's w/o contrast. Think on the COPDgene, the fibrosis comp... etc.\n\nI was not thinking on lung segmentation... take a look [at this](https://www.kaggle.com/sandorkonya/ct-lung-heart-trachea-segmentation), the result of the  ~~scandalous~~ surpising fibrosis progression competition.\n\nI think the borderline / abnormal problem is way to subjective, there will be huge variation among the results!",
    "1137222": "Thank you for sharing radda!  As you have suggested I build my own simple UNet model, that can map the x-ray chest of the competition data to lung masks. In my first try I used my own custom architecture and trained from scratch but the results are poor: [Notebook](https://www.kaggle.com/philippschwarz/ranzcr-lung-mask-model-not-pretrained)\nIn my second attempt, I use pretrained UNet models and it works really well. [Notebook](https://www.kaggle.com/philippschwarz/ranzcr-lung-mask-transfer-learning)\nI have shared the lung segmentation model as dataset so others can also make use of it. [Dataset](https://www.kaggle.com/philippschwarz/ranzcr-lungmask-model)\n\nI am thinking of simply using 4 channels, RGB + masks as input to the network. Does this make sense or do you have a another suggestion how to leverage the masks in this competition?",
    "1142339": "here are some results of detecting CVC tips\n\n![](https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F113660%2Ffdd13506736cce9699c08ac72e7073e6%2FSelection_086.png?generation=1610014997523184&alt=media)",
    "1142387": "is this classifier based? looks amazing",
    "1142836": "it is  a pixel classifier (like segmentation).\nbasically it works but you need to work at high resolution, e.g. at the original resolution, if you want to be very accurate. you can inspect the images at the original resolution. there, the end of the line is more visible.",
    "1142915": "Thanks @raddar - I am curious if competition rules allow to use this data though as it is pretrained on private data? What license does the data have?",
    "1143126": "i did another experiment on detecting the line pixel\n![](https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F113660%2F61d2fdb64990bfe89e38733c15889dad%2FSelection_090.png?generation=1610046200202324&alt=media)\n\ni come to the conclusion that the best method is to train and softmax pixel classifier to label:\n- end point normal\n- end point abnormal\n- end point borderline\n- point on the line (optional)",
    "1143808": "![](https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F113660%2F9fd1d04b46f7eb84e5d5d99225e2c32c%2FSelection_111.png?generation=1610080396552834&alt=media)",
    "1144146": "maybe a stupid question, how to get the right tip, since there are two possible tip(first point and last point in annotation's data column)",
    "1144312": "for a simple solution, just choose the endpoint closest to the center of the image. this is about 99% correct. \n\na complete solution will have to include human verification at the end.",
    "1144339": "i think this method is good. i am seeing the spectrum of color as I would expect\n\n![](https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F113660%2Fb987079067903d6b3df0c7a1325d7c9c%2FSelection_117.png?generation=1610107506325141&alt=media) \n\none can create synthetic data by extending or shorten the tip\n\nthe lung segmentation can help to normalize the image to the correct size.",
    "1144347": "thanks a lot",
    "1144434": "The data (as images) where taken from Public Domain (CC0) datasets, such as NIH https://www.kaggle.com/nih-chest-xrays/data",
    "1144845": "hengck23 ,\nare you \"generating tubes\" by changing the pixels on the original image or you are generating maps for the \" additional supervision\", you [explained here](https://www.kaggle.com/c/ranzcr-clip-catheter-line-classification/discussion/205243)?",
    "1145064": "there is one more dataset that may be useful\n![](https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcRKnTwzBb8rQVoXaGDQjUTvRAx2L0hxFpYkzg&usqp=CAU)\nhttps://arxiv.org/abs/1703.08770",
    "1145366": "the plan is to make an advance photoshop GAN for inpainting\n\n![](https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F113660%2F1d22a511d2ee82e1870e1e7e405d1f93%2FSelection_120.png?generation=1610168565598515&alt=media)",
    "1145600": "it seems there are two types of abnormal : too high or too low\n![](https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F113660%2Faf78a6cea36a90abf04fc4312c1d83c8%2FSelection_134.png?generation=1610182052490961&alt=media)\n\na clustering algorithm would reveal better",
    "1145625": "hengck23 ,\n\nno need to cluster, I can confirm it, these are the most common abnormal positions.",
    "1145627": "hengck23 ,\nsounds good with the inpainting. The areas are only few dozen pixels of radius, a GAN could possibly learn to fill this small area pretty confidently.",
    "1146067": "what I have done is split CVC - Abnormal to `Right Atrium` and `Other`. Then did the same with CVC - Borderline.\n\nThen plot heatmaps of CVC tips. This is how normal looks:\n\n![](https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F405318%2F7941c78df4971e6b12b0c2659a944b48%2Fnormal.png?generation=1610201668234131&alt=media)\n\nAbnormal (top right atrium, bottom other):\n\n![](https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F405318%2F8a3c2cc7d697bf2e115b40840649fb4a%2Fborderline.png?generation=1610201701859443&alt=media)\n\nBorderline (top right atrium, bottom other):\n\n![](https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F405318%2Fd75bb10692996f6ed2b1bf14f4e1d380%2Fabnormal.png?generation=1610201724738402&alt=media)\n\n\nSo when the tip is close to the heart, tip variance is pretty small. however all other positions are tough. I even calculated AUC scores for each category with one of the models I have:\n\n```\nAUC - Normal 0.9260295990186276\nAUC - Borderline - Right Atrium 0.8789892389197191\nAUC - Borderline - Other 0.7966479038305525\nAUC - Abnormal - Right Atrium 0.9434947157845324\nAUC - Abnormal - Other 0.913221206423610\n```\n\n\nSo the highest problem with classification is with CVC Borderline Other category. So quite the opposite problem @hengck23 has been focusing so far:)",
    "1146094": "note that there is an \"additional\" class \"CVC incomplete  imaged\", which becomes a subset of cvc abnormal\n\n\n![](https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F113660%2Fdae39474df7534bf9b74c2bb9628dacf%2FSelection_025.png?generation=1610202952494636&alt=media)",
    "1171192": "Hi @raddar , sorry to hack the thread. But I noticed from the NIH link that the dataset does not contain lung segmentation masks to be used as ground-truth, is that correct? How did you get the masks to train a segmentation model?\n\nThanks",
    "1284538": "awesome..."
  },
  "source": "meta"
}