{
  "id": 223817,
  "title": "ETT Cropped Model",
  "url": "/competitions/ranzcr-clip-catheter-line-classification/discussion/223817",
  "author_name": "",
  "post_date": "2021-03-05T18:37:08.883302800Z",
  "votes": 8,
  "comment_count": 6,
  "views": 0,
  "content": "<p>Looking at the annotations of the ETT classes we can see that these lines only occur in a small region of the image. When resized to be 512x512 they never go below 282 pixels down and outside of 78-408 on the x axis. The lines always come from the top and only go part way down the x-ray. </p>\n<p>Histogram of the topmost point in each annotation</p>\n<p><img src=\"https://i.imgur.com/n2y2Ui7.png\" alt=\"\"></p>\n<p>Histogram of the lowest point in each annotation</p>\n<p><img src=\"https://i.imgur.com/YvkSKUM.png\" alt=\"\"></p>\n<p>Histogram of the leftmost point in each annotation</p>\n<p><img src=\"https://i.imgur.com/EwBUBfW.png\" alt=\"\"></p>\n<p>Histogram of the rightmost point in each annotation</p>\n<p><img src=\"https://i.imgur.com/lqspuG9.png\" alt=\"\"></p>\n<p>Training a model that is train just on this region with a little bit of extra padding shows some uplift. This yields a model that has a slightly higher effective resolution and less background noise because it is only seeing the region relevant to the classification. </p>\n<p>It poses a slight complexity increase because then multiple models will need to be trained and used during inference, but may be worth it for some small gains in the end. </p>",
  "messages": [
    {
      "id": "1227674",
      "postDate": "03/05/2021 18:37:08",
      "content": "<p>Looking at the annotations of the ETT classes we can see that these lines only occur in a small region of the image. When resized to be 512x512 they never go below 282 pixels down and outside of 78-408 on the x axis. The lines always come from the top and only go part way down the x-ray. </p>\n<p>Histogram of the topmost point in each annotation</p>\n<p><img src=\"https://i.imgur.com/n2y2Ui7.png\" alt=\"\"></p>\n<p>Histogram of the lowest point in each annotation</p>\n<p><img src=\"https://i.imgur.com/YvkSKUM.png\" alt=\"\"></p>\n<p>Histogram of the leftmost point in each annotation</p>\n<p><img src=\"https://i.imgur.com/EwBUBfW.png\" alt=\"\"></p>\n<p>Histogram of the rightmost point in each annotation</p>\n<p><img src=\"https://i.imgur.com/lqspuG9.png\" alt=\"\"></p>\n<p>Training a model that is train just on this region with a little bit of extra padding shows some uplift. This yields a model that has a slightly higher effective resolution and less background noise because it is only seeing the region relevant to the classification. </p>\n<p>It poses a slight complexity increase because then multiple models will need to be trained and used during inference, but may be worth it for some small gains in the end. </p>",
      "rawMarkdown": "Looking at the annotations of the ETT classes we can see that these lines only occur in a small region of the image. When resized to be 512x512 they never go below 282 pixels down and outside of 78-408 on the x axis. The lines always come from the top and only go part way down the x-ray. \n\nHistogram of the topmost point in each annotation\n\n![](https://i.imgur.com/n2y2Ui7.png)\n\nHistogram of the lowest point in each annotation\n\n![](https://i.imgur.com/YvkSKUM.png)\n\n\nHistogram of the leftmost point in each annotation\n\n![](https://i.imgur.com/EwBUBfW.png)\n\nHistogram of the rightmost point in each annotation\n\n![](https://i.imgur.com/lqspuG9.png)\n\n\nTraining a model that is train just on this region with a little bit of extra padding shows some uplift. This yields a model that has a slightly higher effective resolution and less background noise because it is only seeing the region relevant to the classification. \n\nIt poses a slight complexity increase because then multiple models will need to be trained and used during inference, but may be worth it for some small gains in the end.",
      "votes": null
    },
    {
      "id": "1227692",
      "postDate": "03/05/2021 19:11:25",
      "content": "<p>Example of ETT annotation:</p>\n<p><img src=\"https://i.imgur.com/udfCwJD.png\" alt=\"\"></p>\n<p>Cropping just within the percentage ranges 0/512:282/512, 78/512-408/512 before resizing to 512 or whatever your target resolution is seems to yield a slightly more focused model with higher resolution representation. </p>",
      "rawMarkdown": "Example of ETT annotation:\n\n![](https://i.imgur.com/udfCwJD.png)\n\nCropping just within the percentage ranges 0/512:282/512, 78/512-408/512 before resizing to 512 or whatever your target resolution is seems to yield a slightly more focused model with higher resolution representation.",
      "votes": null
    },
    {
      "id": "1227693",
      "postDate": "03/05/2021 19:12:39",
      "content": "<p>Resnet200d on ETT Abnormal, ETT Borderline, ETT Normal on fold 0<br>\noriginal: 0.9526 0.9566 0.9896<br>\nett only: [0.9721 0.957  0.9905]</p>\n<p>fold 1 original 0.981  0.9481 0.9885<br>\nett only(only 10 epochs in so far) [0.9872 0.9537 0.9897] </p>",
      "rawMarkdown": "Resnet200d on ETT Abnormal, ETT Borderline, ETT Normal on fold 0\noriginal: 0.9526 0.9566 0.9896\nett only: [0.9721 0.957  0.9905]\n\nfold 1 original 0.981  0.9481 0.9885\nett only(only 10 epochs in so far) [0.9872 0.9537 0.9897]",
      "votes": null
    },
    {
      "id": "1228727",
      "postDate": "03/06/2021 17:30:35",
      "content": "<p>Thanks for sharing! I did an experiment a while ago with cropped images and saw a tiny overall uplift (although not enough for me to look into it further at the time). I just looked again at the results in detail and looks like ETT in particular did see a slight boost. </p>\n<p>Yellow is with cropping, blue is the same model without. Interestingly NGT abnormal got a boost too</p>\n<p><img src=\"https://i.imgur.com/wkvUdIh.png\" alt=\"\"></p>",
      "rawMarkdown": "Thanks for sharing! I did an experiment a while ago with cropped images and saw a tiny overall uplift (although not enough for me to look into it further at the time). I just looked again at the results in detail and looks like ETT in particular did see a slight boost. \n\nYellow is with cropping, blue is the same model without. Interestingly NGT abnormal got a boost too\n\n![](https://i.imgur.com/wkvUdIh.png)",
      "votes": null
    },
    {
      "id": "1228838",
      "postDate": "03/06/2021 20:27:26",
      "content": "<p>How did you go about cropping the images for each type and what were these graphs created in? looks very nice</p>",
      "rawMarkdown": "How did you go about cropping the images for each type and what were these graphs created in? looks very nice",
      "votes": null
    },
    {
      "id": "1228856",
      "postDate": "03/06/2021 20:38:30",
      "content": "<p>I used a coarse UNet model with the catheter masks &amp; lung masks from Raddar - probably could do with some refinement, but was just experimenting at that point.</p>\n<p>The plots are from Weights and Biases. First time I've used it, but completely sold, much more convenient than TensorBoard.</p>",
      "rawMarkdown": "I used a coarse UNet model with the catheter masks & lung masks from Raddar - probably could do with some refinement, but was just experimenting at that point.\n\nThe plots are from Weights and Biases. First time I've used it, but completely sold, much more convenient than TensorBoard.",
      "votes": null
    },
    {
      "id": "1228897",
      "postDate": "03/06/2021 21:53:15",
      "content": "<p>Congratulations on your GM upgrade <a href=\"https://www.kaggle.com/ryches\" target=\"_blank\">@ryches</a> !</p>",
      "rawMarkdown": "Congratulations on your GM upgrade @ryches !",
      "votes": null
    }
  ],
  "comments": [
    {
      "id": 1227692,
      "author_name": "ryches",
      "author_url": "",
      "post_date": "03/05/2021 19:11:25",
      "content": "<p>Example of ETT annotation:</p>\n<p><img src=\"https://i.imgur.com/udfCwJD.png\" alt=\"\"></p>\n<p>Cropping just within the percentage ranges 0/512:282/512, 78/512-408/512 before resizing to 512 or whatever your target resolution is seems to yield a slightly more focused model with higher resolution representation. </p>",
      "votes": null,
      "replies": []
    },
    {
      "id": 1227693,
      "author_name": "ryches",
      "author_url": "",
      "post_date": "03/05/2021 19:12:39",
      "content": "<p>Resnet200d on ETT Abnormal, ETT Borderline, ETT Normal on fold 0<br>\noriginal: 0.9526 0.9566 0.9896<br>\nett only: [0.9721 0.957  0.9905]</p>\n<p>fold 1 original 0.981  0.9481 0.9885<br>\nett only(only 10 epochs in so far) [0.9872 0.9537 0.9897] </p>",
      "votes": null,
      "replies": []
    },
    {
      "id": 1228727,
      "author_name": "anjum48",
      "author_url": "",
      "post_date": "03/06/2021 17:30:35",
      "content": "<p>Thanks for sharing! I did an experiment a while ago with cropped images and saw a tiny overall uplift (although not enough for me to look into it further at the time). I just looked again at the results in detail and looks like ETT in particular did see a slight boost. </p>\n<p>Yellow is with cropping, blue is the same model without. Interestingly NGT abnormal got a boost too</p>\n<p><img src=\"https://i.imgur.com/wkvUdIh.png\" alt=\"\"></p>",
      "votes": null,
      "replies": [
        {
          "id": 1228838,
          "author_name": "ryches",
          "author_url": "",
          "post_date": "03/06/2021 20:27:26",
          "content": "<p>How did you go about cropping the images for each type and what were these graphs created in? looks very nice</p>",
          "votes": null,
          "replies": []
        },
        {
          "id": 1228856,
          "author_name": "anjum48",
          "author_url": "",
          "post_date": "03/06/2021 20:38:30",
          "content": "<p>I used a coarse UNet model with the catheter masks &amp; lung masks from Raddar - probably could do with some refinement, but was just experimenting at that point.</p>\n<p>The plots are from Weights and Biases. First time I've used it, but completely sold, much more convenient than TensorBoard.</p>",
          "votes": null,
          "replies": []
        }
      ]
    },
    {
      "id": 1228897,
      "author_name": "coreacasa",
      "author_url": "",
      "post_date": "03/06/2021 21:53:15",
      "content": "<p>Congratulations on your GM upgrade <a href=\"https://www.kaggle.com/ryches\" target=\"_blank\">@ryches</a> !</p>",
      "votes": null,
      "replies": []
    }
  ],
  "raw_markdown_by_id": {
    "1227674": "Looking at the annotations of the ETT classes we can see that these lines only occur in a small region of the image. When resized to be 512x512 they never go below 282 pixels down and outside of 78-408 on the x axis. The lines always come from the top and only go part way down the x-ray. \n\nHistogram of the topmost point in each annotation\n\n![](https://i.imgur.com/n2y2Ui7.png)\n\nHistogram of the lowest point in each annotation\n\n![](https://i.imgur.com/YvkSKUM.png)\n\n\nHistogram of the leftmost point in each annotation\n\n![](https://i.imgur.com/EwBUBfW.png)\n\nHistogram of the rightmost point in each annotation\n\n![](https://i.imgur.com/lqspuG9.png)\n\n\nTraining a model that is train just on this region with a little bit of extra padding shows some uplift. This yields a model that has a slightly higher effective resolution and less background noise because it is only seeing the region relevant to the classification. \n\nIt poses a slight complexity increase because then multiple models will need to be trained and used during inference, but may be worth it for some small gains in the end.",
    "1227692": "Example of ETT annotation:\n\n![](https://i.imgur.com/udfCwJD.png)\n\nCropping just within the percentage ranges 0/512:282/512, 78/512-408/512 before resizing to 512 or whatever your target resolution is seems to yield a slightly more focused model with higher resolution representation.",
    "1227693": "Resnet200d on ETT Abnormal, ETT Borderline, ETT Normal on fold 0\noriginal: 0.9526 0.9566 0.9896\nett only: [0.9721 0.957  0.9905]\n\nfold 1 original 0.981  0.9481 0.9885\nett only(only 10 epochs in so far) [0.9872 0.9537 0.9897]",
    "1228727": "Thanks for sharing! I did an experiment a while ago with cropped images and saw a tiny overall uplift (although not enough for me to look into it further at the time). I just looked again at the results in detail and looks like ETT in particular did see a slight boost. \n\nYellow is with cropping, blue is the same model without. Interestingly NGT abnormal got a boost too\n\n![](https://i.imgur.com/wkvUdIh.png)",
    "1228838": "How did you go about cropping the images for each type and what were these graphs created in? looks very nice",
    "1228856": "I used a coarse UNet model with the catheter masks & lung masks from Raddar - probably could do with some refinement, but was just experimenting at that point.\n\nThe plots are from Weights and Biases. First time I've used it, but completely sold, much more convenient than TensorBoard.",
    "1228897": "Congratulations on your GM upgrade @ryches !"
  },
  "source": "meta"
}