{
  "id": 285694,
  "title": "CLAHE Preprocessing",
  "url": "/competitions/sartorius-cell-instance-segmentation/discussion/285694",
  "author_name": "",
  "post_date": "2021-11-05T18:52:20.760876Z",
  "votes": 6,
  "comment_count": 7,
  "views": 0,
  "content": "<p>I took the original Lightning version of <a href=\"https://www.kaggle.com/julian3833\" target=\"_blank\">@julian3833</a>, pulled the <code>transforms</code> module into another notebook cell, and added <a href=\"https://scikit-image.org/docs/dev/api/skimage.exposure.html#skimage.exposure.equalize_adapthist\" target=\"_blank\">Adaptive Equalization</a>. I'll report back on how it does.</p>\n<p><a href=\"https://www.kaggle.com/evancofsky/sartorius-torch-lightning-mask-r-cnn/\" target=\"_blank\">Here's the link!</a></p>",
  "messages": [
    {
      "id": "1572576",
      "postDate": "11/05/2021 18:52:20",
      "content": "<p>I took the original Lightning version of <a href=\"https://www.kaggle.com/julian3833\" target=\"_blank\">@julian3833</a>, pulled the <code>transforms</code> module into another notebook cell, and added <a href=\"https://scikit-image.org/docs/dev/api/skimage.exposure.html#skimage.exposure.equalize_adapthist\" target=\"_blank\">Adaptive Equalization</a>. I'll report back on how it does.</p>\n<p><a href=\"https://www.kaggle.com/evancofsky/sartorius-torch-lightning-mask-r-cnn/\" target=\"_blank\">Here's the link!</a></p>",
      "rawMarkdown": "I took the original Lightning version of @julian3833, pulled the `transforms` module into another notebook cell, and added [Adaptive Equalization](https://scikit-image.org/docs/dev/api/skimage.exposure.html#skimage.exposure.equalize_adapthist). I'll report back on how it does.\n\n[Here's the link!](https://www.kaggle.com/evancofsky/sartorius-torch-lightning-mask-r-cnn/)",
      "votes": null
    },
    {
      "id": "1572676",
      "postDate": "11/05/2021 21:13:23",
      "content": "<p>Good luck with that! I tried adding augmentations with no luck till now</p>",
      "rawMarkdown": "Good luck with that! I tried adding augmentations with no luck till now",
      "votes": null
    },
    {
      "id": "1572679",
      "postDate": "11/05/2021 21:18:09",
      "content": "<p>I've been having that problem with a lot of competitions lately. I think I've got some bugs somewhere…</p>",
      "rawMarkdown": "I've been having that problem with a lot of competitions lately. I think I've got some bugs somewhere...",
      "votes": null
    },
    {
      "id": "1572846",
      "postDate": "11/06/2021 03:08:15",
      "content": "<p>0.03 wow what a time to be alive </p>",
      "rawMarkdown": "0.03 wow what a time to be alive",
      "votes": null
    },
    {
      "id": "1573392",
      "postDate": "11/06/2021 15:27:26",
      "content": "<pre><code># https://www.kaggle.com/hanmingliu/denoising-ben-s-preprocessing-better-clarity\ndef apply_ben_preprocessing(image, k=4, sigma=10, gamma=128):\n    return cv2.addWeighted(image, k, cv2.GaussianBlur(image, (0,0), sigma), -k, gamma)\n</code></pre>\n<p>Here's Ben's Preprocessing from Aptos Competition.<br>\nIt's basically (weighted) subtracting away a smoothed image from the original.</p>",
      "rawMarkdown": "```\n# https://www.kaggle.com/hanmingliu/denoising-ben-s-preprocessing-better-clarity\ndef apply_ben_preprocessing(image, k=4, sigma=10, gamma=128):\n    return cv2.addWeighted(image, k, cv2.GaussianBlur(image, (0,0), sigma), -k, gamma)\n```\n\nHere's Ben's Preprocessing from Aptos Competition.\nIt's basically (weighted) subtracting away a smoothed image from the original.",
      "votes": null
    },
    {
      "id": "1573414",
      "postDate": "11/06/2021 15:49:00",
      "content": "<p>Huh, that’s really cool! I’ll give that a try, thanks!</p>",
      "rawMarkdown": "Huh, that’s really cool! I’ll give that a try, thanks!",
      "votes": null
    },
    {
      "id": "1580337",
      "postDate": "11/12/2021 17:09:42",
      "content": "<p>I sort of played with the CLAHE parameters, and also added sobel edge detection and scribbled it straight on the image as part of the pipeline now. Let's see how this does! In colab it might converge faster, but honestly I'm not convinced I have the sartorius loss implemented right either. <a href=\"https://www.kaggle.com/evancofsky/sartorius-torch-lightning-mask-r-cnn/edit/run/79282741\" target=\"_blank\">https://www.kaggle.com/evancofsky/sartorius-torch-lightning-mask-r-cnn/edit/run/79282741</a></p>",
      "rawMarkdown": "I sort of played with the CLAHE parameters, and also added sobel edge detection and scribbled it straight on the image as part of the pipeline now. Let's see how this does! In colab it might converge faster, but honestly I'm not convinced I have the sartorius loss implemented right either. https://www.kaggle.com/evancofsky/sartorius-torch-lightning-mask-r-cnn/edit/run/79282741",
      "votes": null
    },
    {
      "id": "1580377",
      "postDate": "11/12/2021 17:45:29",
      "content": "<p>Also it occurs to me reviewing other notebooks that I don't actually know what the hell I'm doing hahaha! Lots of cool post processing done by mask probabilities and by cell types, and here I am playing with contrast enhancement and learning rates as if they'll really change the core model…</p>",
      "rawMarkdown": "Also it occurs to me reviewing other notebooks that I don't actually know what the hell I'm doing hahaha! Lots of cool post processing done by mask probabilities and by cell types, and here I am playing with contrast enhancement and learning rates as if they'll really change the core model...",
      "votes": null
    }
  ],
  "comments": [
    {
      "id": 1572676,
      "author_name": "julian3833",
      "author_url": "",
      "post_date": "11/05/2021 21:13:23",
      "content": "<p>Good luck with that! I tried adding augmentations with no luck till now</p>",
      "votes": null,
      "replies": [
        {
          "id": 1572679,
          "author_name": "evancofsky",
          "author_url": "",
          "post_date": "11/05/2021 21:18:09",
          "content": "<p>I've been having that problem with a lot of competitions lately. I think I've got some bugs somewhere…</p>",
          "votes": null,
          "replies": []
        }
      ]
    },
    {
      "id": 1572846,
      "author_name": "evancofsky",
      "author_url": "",
      "post_date": "11/06/2021 03:08:15",
      "content": "<p>0.03 wow what a time to be alive </p>",
      "votes": null,
      "replies": []
    },
    {
      "id": 1573392,
      "author_name": "mightyrains",
      "author_url": "",
      "post_date": "11/06/2021 15:27:26",
      "content": "<pre><code># https://www.kaggle.com/hanmingliu/denoising-ben-s-preprocessing-better-clarity\ndef apply_ben_preprocessing(image, k=4, sigma=10, gamma=128):\n    return cv2.addWeighted(image, k, cv2.GaussianBlur(image, (0,0), sigma), -k, gamma)\n</code></pre>\n<p>Here's Ben's Preprocessing from Aptos Competition.<br>\nIt's basically (weighted) subtracting away a smoothed image from the original.</p>",
      "votes": null,
      "replies": [
        {
          "id": 1573414,
          "author_name": "evancofsky",
          "author_url": "",
          "post_date": "11/06/2021 15:49:00",
          "content": "<p>Huh, that’s really cool! I’ll give that a try, thanks!</p>",
          "votes": null,
          "replies": []
        }
      ]
    },
    {
      "id": 1580337,
      "author_name": "evancofsky",
      "author_url": "",
      "post_date": "11/12/2021 17:09:42",
      "content": "<p>I sort of played with the CLAHE parameters, and also added sobel edge detection and scribbled it straight on the image as part of the pipeline now. Let's see how this does! In colab it might converge faster, but honestly I'm not convinced I have the sartorius loss implemented right either. <a href=\"https://www.kaggle.com/evancofsky/sartorius-torch-lightning-mask-r-cnn/edit/run/79282741\" target=\"_blank\">https://www.kaggle.com/evancofsky/sartorius-torch-lightning-mask-r-cnn/edit/run/79282741</a></p>",
      "votes": null,
      "replies": []
    },
    {
      "id": 1580377,
      "author_name": "evancofsky",
      "author_url": "",
      "post_date": "11/12/2021 17:45:29",
      "content": "<p>Also it occurs to me reviewing other notebooks that I don't actually know what the hell I'm doing hahaha! Lots of cool post processing done by mask probabilities and by cell types, and here I am playing with contrast enhancement and learning rates as if they'll really change the core model…</p>",
      "votes": null,
      "replies": []
    }
  ],
  "raw_markdown_by_id": {
    "1572576": "I took the original Lightning version of @julian3833, pulled the `transforms` module into another notebook cell, and added [Adaptive Equalization](https://scikit-image.org/docs/dev/api/skimage.exposure.html#skimage.exposure.equalize_adapthist). I'll report back on how it does.\n\n[Here's the link!](https://www.kaggle.com/evancofsky/sartorius-torch-lightning-mask-r-cnn/)",
    "1572676": "Good luck with that! I tried adding augmentations with no luck till now",
    "1572679": "I've been having that problem with a lot of competitions lately. I think I've got some bugs somewhere...",
    "1572846": "0.03 wow what a time to be alive",
    "1573392": "```\n# https://www.kaggle.com/hanmingliu/denoising-ben-s-preprocessing-better-clarity\ndef apply_ben_preprocessing(image, k=4, sigma=10, gamma=128):\n    return cv2.addWeighted(image, k, cv2.GaussianBlur(image, (0,0), sigma), -k, gamma)\n```\n\nHere's Ben's Preprocessing from Aptos Competition.\nIt's basically (weighted) subtracting away a smoothed image from the original.",
    "1573414": "Huh, that’s really cool! I’ll give that a try, thanks!",
    "1580337": "I sort of played with the CLAHE parameters, and also added sobel edge detection and scribbled it straight on the image as part of the pipeline now. Let's see how this does! In colab it might converge faster, but honestly I'm not convinced I have the sartorius loss implemented right either. https://www.kaggle.com/evancofsky/sartorius-torch-lightning-mask-r-cnn/edit/run/79282741",
    "1580377": "Also it occurs to me reviewing other notebooks that I don't actually know what the hell I'm doing hahaha! Lots of cool post processing done by mask probabilities and by cell types, and here I am playing with contrast enhancement and learning rates as if they'll really change the core model..."
  },
  "source": "meta"
}