{
  "id": 161719,
  "title": "Shades of Gray prepossessed data (both JPEG's and tfrecords) ",
  "url": "/competitions/siim-isic-melanoma-classification/discussion/161719",
  "author_name": "Alexey Pronin",
  "post_date": "2020-06-25T23:54:32.432000",
  "votes": 18,
  "comment_count": 19,
  "views": 0,
  "content": "<p>Today, I came across this <a href=\"https://www.kaggle.com/apacheco/shades-of-gray-color-constancy\">nice kernel</a> illustrating how to apply the Shades of Gray algorithm which is a color compensation technique. The pictures below illustrate the difference between the original images (left) and the same images after they have been pre-processed with the Shades of Gray algorithm (right):\n<img src=\"https://www.googleapis.com/download/storage/v1/b/kaggle-user-content/o/inbox%2F1461289%2F54ef1c22afc3551ed6836ccaf7ac175a%2F__results___7_0.png?generation=1593128228898324&amp;alt=media\" alt=\"\">\n<img src=\"https://www.googleapis.com/download/storage/v1/b/kaggle-user-content/o/inbox%2F1461289%2F46bc75a92cb6a9c4c65273f56c3cf269%2F__results___7_5.png?generation=1593128229005617&amp;alt=media\" alt=\"\">\n<img src=\"https://www.googleapis.com/download/storage/v1/b/kaggle-user-content/o/inbox%2F1461289%2F9799a11b9ff0e3b420ad70ba9b097bc8%2F__results___7_2.png?generation=1593128229022083&amp;alt=media\" alt=\"\">\n<img src=\"https://www.googleapis.com/download/storage/v1/b/kaggle-user-content/o/inbox%2F1461289%2Fa9547009e025cca65751e6aefde15ac8%2F__results___7_7.png?generation=1593128229509720&amp;alt=media\" alt=\"\">\n<img src=\"https://www.googleapis.com/download/storage/v1/b/kaggle-user-content/o/inbox%2F1461289%2F7a981ca2b1ba0d6086f6b26691e97990%2F__results___7_3.png?generation=1593128229093026&amp;alt=media\" alt=\"\">\n<img src=\"https://www.googleapis.com/download/storage/v1/b/kaggle-user-content/o/inbox%2F1461289%2Fe623e72c0d12f7bd6ab953fbffe81cfb%2F__results___7_4.png?generation=1593128229792045&amp;alt=media\" alt=\"\"></p>\n\n<p>I decided to play with this idea and made both JPEG and tfrecords files for <code>train</code>, <code>test</code>, and the external data from ISIC 2019 competition. I also included the tabular features in the tfrecords following the procedure from <a href=\"https://www.kaggle.com/graf10a/siim-example-of-making-tfrec-files-512x512\">this old kernel of mine</a>. Here are the data:</p>\n\n<p><strong>JPEG's:</strong> \n<a href=\"https://www.kaggle.com/graf10a/siim-color-constant-512-train\">Train set data, 512x512</a>\n<a href=\"https://www.kaggle.com/graf10a/siim-color-constant-512-test\">Test set data, 512x512</a>\n<a href=\"https://www.kaggle.com/graf10a/siim-color-constant-512-external\">ISIC 2019 external data, 512x512</a></p>\n\n<p><strong>tfrecords:</strong>\n<a href=\"https://www.kaggle.com/graf10a/siim-tfrec-cc-512-train\">Train set, 512x512</a>\n<a href=\"https://www.kaggle.com/graf10a/siim-tfrec-cc-512-test\">Test set, 512x512</a>\n<a href=\"https://www.kaggle.com/graf10a/siim-tfrec-cc-512-external\">ISIC 2019 external data, 512x512</a></p>\n\n<p>Here is <a href=\"https://www.kaggle.com/graf10a/effnb0-tabular-features-tf-cv5-512x512\">an example</a> illustrating how to include tfrecords into your machine learning pipeline. More discussion is <a href=\"https://www.kaggle.com/c/siim-isic-melanoma-classification/discussion/158395\">here</a>.</p>\n\n<p><em>Disclaimer:</em> I have no idea if this is going to help us to improve the score. Also, I have not removed duplicates from the external data. This means that including external data in your validation set will most probably break your cross-validation. It seems to be okay though to include the external data in your train set. </p>\n\n<p>UPDATE 1: I am currently running an experiment with the color constant images in Version 10 of <a href=\"https://www.kaggle.com/graf10a/effnb0-tabular-features-tf-cv5-512x512\">my public notebook</a>.  We will know the result in a few hours.</p>\n\n<p>UPDATE 2:  I have just finished running the experiment.  It did not show an improvement in the CV score (the CV AUC went down from ~0.903 to ~0.897). However, I do not think it means that this idea does not work -- the change is too small to draw any conclusions -- let's not forget that the standard deviation across our 5 CV-folds is of order 0.015. Try it with more advanced models, with more data, with proper augmentation -- you might be surprised!</p>",
  "messages": [
    {
      "id": 902099,
      "postDate": "2020-06-25T23:54:32.433Z",
      "content": "<p>Today, I came across this <a href=\"https://www.kaggle.com/apacheco/shades-of-gray-color-constancy\">nice kernel</a> illustrating how to apply the Shades of Gray algorithm which is a color compensation technique. The pictures below illustrate the difference between the original images (left) and the same images after they have been pre-processed with the Shades of Gray algorithm (right):\n<img src=\"https://www.googleapis.com/download/storage/v1/b/kaggle-user-content/o/inbox%2F1461289%2F54ef1c22afc3551ed6836ccaf7ac175a%2F__results___7_0.png?generation=1593128228898324&amp;alt=media\" alt=\"\">\n<img src=\"https://www.googleapis.com/download/storage/v1/b/kaggle-user-content/o/inbox%2F1461289%2F46bc75a92cb6a9c4c65273f56c3cf269%2F__results___7_5.png?generation=1593128229005617&amp;alt=media\" alt=\"\">\n<img src=\"https://www.googleapis.com/download/storage/v1/b/kaggle-user-content/o/inbox%2F1461289%2F9799a11b9ff0e3b420ad70ba9b097bc8%2F__results___7_2.png?generation=1593128229022083&amp;alt=media\" alt=\"\">\n<img src=\"https://www.googleapis.com/download/storage/v1/b/kaggle-user-content/o/inbox%2F1461289%2Fa9547009e025cca65751e6aefde15ac8%2F__results___7_7.png?generation=1593128229509720&amp;alt=media\" alt=\"\">\n<img src=\"https://www.googleapis.com/download/storage/v1/b/kaggle-user-content/o/inbox%2F1461289%2F7a981ca2b1ba0d6086f6b26691e97990%2F__results___7_3.png?generation=1593128229093026&amp;alt=media\" alt=\"\">\n<img src=\"https://www.googleapis.com/download/storage/v1/b/kaggle-user-content/o/inbox%2F1461289%2Fe623e72c0d12f7bd6ab953fbffe81cfb%2F__results___7_4.png?generation=1593128229792045&amp;alt=media\" alt=\"\"></p>\n\n<p>I decided to play with this idea and made both JPEG and tfrecords files for <code>train</code>, <code>test</code>, and the external data from ISIC 2019 competition. I also included the tabular features in the tfrecords following the procedure from <a href=\"https://www.kaggle.com/graf10a/siim-example-of-making-tfrec-files-512x512\">this old kernel of mine</a>. Here are the data:</p>\n\n<p><strong>JPEG's:</strong> \n<a href=\"https://www.kaggle.com/graf10a/siim-color-constant-512-train\">Train set data, 512x512</a>\n<a href=\"https://www.kaggle.com/graf10a/siim-color-constant-512-test\">Test set data, 512x512</a>\n<a href=\"https://www.kaggle.com/graf10a/siim-color-constant-512-external\">ISIC 2019 external data, 512x512</a></p>\n\n<p><strong>tfrecords:</strong>\n<a href=\"https://www.kaggle.com/graf10a/siim-tfrec-cc-512-train\">Train set, 512x512</a>\n<a href=\"https://www.kaggle.com/graf10a/siim-tfrec-cc-512-test\">Test set, 512x512</a>\n<a href=\"https://www.kaggle.com/graf10a/siim-tfrec-cc-512-external\">ISIC 2019 external data, 512x512</a></p>\n\n<p>Here is <a href=\"https://www.kaggle.com/graf10a/effnb0-tabular-features-tf-cv5-512x512\">an example</a> illustrating how to include tfrecords into your machine learning pipeline. More discussion is <a href=\"https://www.kaggle.com/c/siim-isic-melanoma-classification/discussion/158395\">here</a>.</p>\n\n<p><em>Disclaimer:</em> I have no idea if this is going to help us to improve the score. Also, I have not removed duplicates from the external data. This means that including external data in your validation set will most probably break your cross-validation. It seems to be okay though to include the external data in your train set. </p>\n\n<p>UPDATE 1: I am currently running an experiment with the color constant images in Version 10 of <a href=\"https://www.kaggle.com/graf10a/effnb0-tabular-features-tf-cv5-512x512\">my public notebook</a>.  We will know the result in a few hours.</p>\n\n<p>UPDATE 2:  I have just finished running the experiment.  It did not show an improvement in the CV score (the CV AUC went down from ~0.903 to ~0.897). However, I do not think it means that this idea does not work -- the change is too small to draw any conclusions -- let's not forget that the standard deviation across our 5 CV-folds is of order 0.015. Try it with more advanced models, with more data, with proper augmentation -- you might be surprised!</p>",
      "rawMarkdown": "Today, I came across this [nice kernel](https://www.kaggle.com/apacheco/shades-of-gray-color-constancy) illustrating how to apply the Shades of Gray algorithm which is a color compensation technique. The pictures below illustrate the difference between the original images (left) and the same images after they have been pre-processed with the Shades of Gray algorithm (right):\n![](https://www.googleapis.com/download/storage/v1/b/kaggle-user-content/o/inbox%2F1461289%2F54ef1c22afc3551ed6836ccaf7ac175a%2F__results___7_0.png?generation=1593128228898324&amp;alt=media)\n![](https://www.googleapis.com/download/storage/v1/b/kaggle-user-content/o/inbox%2F1461289%2F46bc75a92cb6a9c4c65273f56c3cf269%2F__results___7_5.png?generation=1593128229005617&amp;alt=media)\n![](https://www.googleapis.com/download/storage/v1/b/kaggle-user-content/o/inbox%2F1461289%2F9799a11b9ff0e3b420ad70ba9b097bc8%2F__results___7_2.png?generation=1593128229022083&amp;alt=media)\n![](https://www.googleapis.com/download/storage/v1/b/kaggle-user-content/o/inbox%2F1461289%2Fa9547009e025cca65751e6aefde15ac8%2F__results___7_7.png?generation=1593128229509720&amp;alt=media)\n![](https://www.googleapis.com/download/storage/v1/b/kaggle-user-content/o/inbox%2F1461289%2F7a981ca2b1ba0d6086f6b26691e97990%2F__results___7_3.png?generation=1593128229093026&amp;alt=media)\n![](https://www.googleapis.com/download/storage/v1/b/kaggle-user-content/o/inbox%2F1461289%2Fe623e72c0d12f7bd6ab953fbffe81cfb%2F__results___7_4.png?generation=1593128229792045&amp;alt=media)\n\nI decided to play with this idea and made both JPEG and tfrecords files for `train`, `test`, and the external data from ISIC 2019 competition. I also included the tabular features in the tfrecords following the procedure from [this old kernel of mine](https://www.kaggle.com/graf10a/siim-example-of-making-tfrec-files-512x512). Here are the data:\n\n**JPEG's:** \n[Train set data, 512x512](https://www.kaggle.com/graf10a/siim-color-constant-512-train)\n[Test set data, 512x512](https://www.kaggle.com/graf10a/siim-color-constant-512-test)\n[ISIC 2019 external data, 512x512](https://www.kaggle.com/graf10a/siim-color-constant-512-external)\n\n**tfrecords:**\n[Train set, 512x512](https://www.kaggle.com/graf10a/siim-tfrec-cc-512-train)\n[Test set, 512x512](https://www.kaggle.com/graf10a/siim-tfrec-cc-512-test)\n[ISIC 2019 external data, 512x512](https://www.kaggle.com/graf10a/siim-tfrec-cc-512-external)\n\nHere is [an example](https://www.kaggle.com/graf10a/effnb0-tabular-features-tf-cv5-512x512) illustrating how to include tfrecords into your machine learning pipeline. More discussion is [here](https://www.kaggle.com/c/siim-isic-melanoma-classification/discussion/158395).\n\n *Disclaimer:* I have no idea if this is going to help us to improve the score. Also, I have not removed duplicates from the external data. This means that including external data in your validation set will most probably break your cross-validation. It seems to be okay though to include the external data in your train set. \n\nUPDATE 1: I am currently running an experiment with the color constant images in Version 10 of [my public notebook](https://www.kaggle.com/graf10a/effnb0-tabular-features-tf-cv5-512x512).  We will know the result in a few hours.\n\nUPDATE 2:  I have just finished running the experiment.  It did not show an improvement in the CV score (the CV AUC went down from ~0.903 to ~0.897). However, I do not think it means that this idea does not work -- the change is too small to draw any conclusions -- let's not forget that the standard deviation across our 5 CV-folds is of order 0.015. Try it with more advanced models, with more data, with proper augmentation -- you might be surprised!",
      "votes": 18
    },
    {
      "id": 937326,
      "postDate": "2020-07-20T23:46:56.697Z",
      "content": "<p><a href=\"/graf10a\">@graf10a</a> had some hope in color constancy as my next step of improvement. I am discouraged now :)\nwill try pseudo labeling instead - did you try?</p>",
      "rawMarkdown": "@graf10a had some hope in color constancy as my next step of improvement. I am discouraged now :)\nwill try pseudo labeling instead - did you try?",
      "votes": 1,
      "replies": [
        {
          "id": 937372,
          "postDate": "2020-07-21T01:09:44.503Z",
          "content": "<p>No, I did not try pseudo labeling.</p>",
          "rawMarkdown": "No, I did not try pseudo labeling.",
          "votes": 1
        },
        {
          "id": 948027,
          "postDate": "2020-07-27T16:08:11.667Z",
          "content": "<p>Hello <a href=\"/romanweilguny\">@romanweilguny</a> have you had any good results with pseudo labeling yet? </p>",
          "rawMarkdown": "Hello @romanweilguny have you had any good results with pseudo labeling yet? ",
          "votes": 1
        },
        {
          "id": 948152,
          "postDate": "2020-07-27T17:36:11.840Z",
          "content": "<p>Just beginning</p>",
          "rawMarkdown": "Just beginning",
          "votes": 1
        }
      ]
    },
    {
      "id": 903315,
      "postDate": "2020-06-26T18:16:20.027Z",
      "content": "<p>I also faced the downfall in auc score after some  image processing. I cropped the black border and get rid of hair. But I couldn't find the bug. So, had to get back to the original one...</p>",
      "rawMarkdown": "I also faced the downfall in auc score after some  image processing. I cropped the black border and get rid of hair. But I couldn't find the bug. So, had to get back to the original one...",
      "votes": 1,
      "replies": [
        {
          "id": 903321,
          "postDate": "2020-06-26T18:24:03.567Z",
          "content": "<p>We should not expect that all our ideas would work. But it is still worth trying.</p>",
          "rawMarkdown": "We should not expect that all our ideas would work. But it is still worth trying.",
          "votes": 2
        },
        {
          "id": 903345,
          "postDate": "2020-06-26T18:39:24.817Z",
          "content": "<p>It's really disappointing when things don't go according to our intuition and we can't even find the reason behind it. I guess this the difference between research and competition that in research we must have to think about why that happened...  </p>",
          "rawMarkdown": "It's really disappointing when things don't go according to our intuition and we can't even find the reason behind it. I guess this the difference between research and competition that in research we must have to think about why that happened...  ",
          "votes": 2
        },
        {
          "id": 903347,
          "postDate": "2020-06-26T18:43:24.880Z",
          "content": "<p>I think we can tackle color inconsistency by doing proper augmentation. It should improve the result...</p>",
          "rawMarkdown": "I think we can tackle color inconsistency by doing proper augmentation. It should improve the result...",
          "votes": 1
        },
        {
          "id": 918990,
          "postDate": "2020-07-07T16:21:21.763Z",
          "content": "<p>Actually, I do not think that the result is conclusive. The change is the CV is too small compared to the standard deviation across the folds and the model we used is the simplest one. Try it with a more advanced model, with more data, with proper augmentation and you might be surprised.</p>",
          "rawMarkdown": "Actually, I do not think that the result is conclusive. The change is the CV is too small compared to the standard deviation across the folds and the model we used is the simplest one. Try it with a more advanced model, with more data, with proper augmentation and you might be surprised.",
          "votes": 1
        },
        {
          "id": 948246,
          "postDate": "2020-07-27T18:58:27.977Z",
          "content": "<p>hello <a href=\"/awsaf49\">@awsaf49</a> \ncan you share idea how to crop black border from the images? is it just (0,0,0) everywhere? </p>",
          "rawMarkdown": "hello @awsaf49 \ncan you share idea how to crop black border from the images? is it just (0,0,0) everywhere? ",
          "votes": 1
        }
      ]
    },
    {
      "id": 902541,
      "postDate": "2020-06-26T07:59:45.250Z",
      "content": "<p>Looking at your processed version of ISIC 2019, it looks like some of the images contain artifacts from the color corrections. These are just a few examples I found while skimming the first ~100 images. Not sure how this affects training (if at all).</p>\n\n<p><img src=\"https://storage.googleapis.com/kagglesdsdata/datasets%2F738684%2F1280239%2FISIC_0000052_downsampled.jpg?GoogleAccessId=databundle-worker-v2@kaggle-161607.iam.gserviceaccount.com&amp;Expires=1593330916&amp;Signature=tHj%2BtQbB1LokkjDsq8E%2BB1bYJaSpCpeQ%2FZjrmahQAHWRki29lvA5TkevVQdpXpfN%2FzPjEVyj6HDhd9z6rgobeuCtNAAOu8mrqHDjGhm8Jpa3hij4snXX4YJTSQoK9ZJCZifFYd2puWJCD7bVZULqAuL9iw1IoXf8TCPidOMHOhVCXky%2FedXdBnkUYW1gPcCq2nA3keF5r5odrQuo8bXLyESmaKCoEg68kDh6jz8I1tPTbsHQ3dWlss0sCwwsUvVpsCdE03U6jaKit2mhnWV8ar70eFkqQFGBrL522gJ9v80mbsqg1gI%2B4uhU8LLTkQ3yL8raSDxKPQOfR8ykiuA1xQ%3D%3D\" alt=\"\"></p>\n\n<p><img src=\"https://storage.googleapis.com/kagglesdsdata/datasets%2F738684%2F1280239%2FISIC_0000004.jpg?GoogleAccessId=databundle-worker-v2@kaggle-161607.iam.gserviceaccount.com&amp;Expires=1593330851&amp;Signature=tJYlAvekUr7Lllm9yu%2F2g7MIPdVWkIOsxErD0gyYLlMRgUBfZzcPBuXLEDccgcXKAI56hYeBsCmL1%2F%2FTWdnpkV1f6%2FGY%2FDkz778vnkzLPjrKBFhx9AHDdaPHvhICMMg4rP02Siq%2FJe%2BzuRe4CEpaQdVc491Gvx8Q5zogTOSNrirpxScRghkErXOg9g5a4ANrd8kg7wrP%2FrXU6csY5V6wTjlV%2FZpkvJN%2B7VUQe1CKQndkK9oyfEfQ8JPOujzoIsEpojUR0kKSwz35arJ%2FuwYvajm%2Bv9rGuOOF28FbobNOQmKu749nvUx9aODC20k2sG4sfPhH9ZPAB%2BOEe42Rd7ZbXQ%3D%3D\" alt=\"\"></p>\n\n<p><img src=\"https://storage.googleapis.com/kagglesdsdata/datasets%2F738684%2F1280239%2FISIC_0000043_downsampled.jpg?GoogleAccessId=databundle-worker-v2@kaggle-161607.iam.gserviceaccount.com&amp;Expires=1593330900&amp;Signature=Z%2B4Jq2ALhEkgK8a%2FD6P09CJHT8VaG4JSoUEQmg5Pzr7qJN6h4pm25Q3etJfrIK6hd9gNmqPZw1OYOfmjCRwEsPDeswUhUu%2FC4oaQV%2F59XZqdvvZC%2BcEZwmLNr7cRiLxkwUp5vXr2MrUMbtMBnhS3o7okdHFYf%2F7Rw4gTplenqmJBlQueqTNyx41fousldxozypjFkLDcrgm6jRRoexlwzVPcHIMzanoVTXIiO5zT3V%2FtpCzMbJEM6P9W16gXuCVEUdIpQYwqsdImcdOY6FpZiUhKFRJu4U%2BgcMu8G2uJ7wVL23gvjJZsHuRoHOajPvVoQG4ytjCZXbBegwezjIMu6Q%3D%3D\" alt=\"\"></p>",
      "rawMarkdown": "Looking at your processed version of ISIC 2019, it looks like some of the images contain artifacts from the color corrections. These are just a few examples I found while skimming the first ~100 images. Not sure how this affects training (if at all).\n\n![](https://storage.googleapis.com/kagglesdsdata/datasets%2F738684%2F1280239%2FISIC_0000052_downsampled.jpg?GoogleAccessId=databundle-worker-v2@kaggle-161607.iam.gserviceaccount.com&amp;Expires=1593330916&amp;Signature=tHj%2BtQbB1LokkjDsq8E%2BB1bYJaSpCpeQ%2FZjrmahQAHWRki29lvA5TkevVQdpXpfN%2FzPjEVyj6HDhd9z6rgobeuCtNAAOu8mrqHDjGhm8Jpa3hij4snXX4YJTSQoK9ZJCZifFYd2puWJCD7bVZULqAuL9iw1IoXf8TCPidOMHOhVCXky%2FedXdBnkUYW1gPcCq2nA3keF5r5odrQuo8bXLyESmaKCoEg68kDh6jz8I1tPTbsHQ3dWlss0sCwwsUvVpsCdE03U6jaKit2mhnWV8ar70eFkqQFGBrL522gJ9v80mbsqg1gI%2B4uhU8LLTkQ3yL8raSDxKPQOfR8ykiuA1xQ%3D%3D)\n\n![](https://storage.googleapis.com/kagglesdsdata/datasets%2F738684%2F1280239%2FISIC_0000004.jpg?GoogleAccessId=databundle-worker-v2@kaggle-161607.iam.gserviceaccount.com&amp;Expires=1593330851&amp;Signature=tJYlAvekUr7Lllm9yu%2F2g7MIPdVWkIOsxErD0gyYLlMRgUBfZzcPBuXLEDccgcXKAI56hYeBsCmL1%2F%2FTWdnpkV1f6%2FGY%2FDkz778vnkzLPjrKBFhx9AHDdaPHvhICMMg4rP02Siq%2FJe%2BzuRe4CEpaQdVc491Gvx8Q5zogTOSNrirpxScRghkErXOg9g5a4ANrd8kg7wrP%2FrXU6csY5V6wTjlV%2FZpkvJN%2B7VUQe1CKQndkK9oyfEfQ8JPOujzoIsEpojUR0kKSwz35arJ%2FuwYvajm%2Bv9rGuOOF28FbobNOQmKu749nvUx9aODC20k2sG4sfPhH9ZPAB%2BOEe42Rd7ZbXQ%3D%3D)\n\n![](https://storage.googleapis.com/kagglesdsdata/datasets%2F738684%2F1280239%2FISIC_0000043_downsampled.jpg?GoogleAccessId=databundle-worker-v2@kaggle-161607.iam.gserviceaccount.com&amp;Expires=1593330900&amp;Signature=Z%2B4Jq2ALhEkgK8a%2FD6P09CJHT8VaG4JSoUEQmg5Pzr7qJN6h4pm25Q3etJfrIK6hd9gNmqPZw1OYOfmjCRwEsPDeswUhUu%2FC4oaQV%2F59XZqdvvZC%2BcEZwmLNr7cRiLxkwUp5vXr2MrUMbtMBnhS3o7okdHFYf%2F7Rw4gTplenqmJBlQueqTNyx41fousldxozypjFkLDcrgm6jRRoexlwzVPcHIMzanoVTXIiO5zT3V%2FtpCzMbJEM6P9W16gXuCVEUdIpQYwqsdImcdOY6FpZiUhKFRJu4U%2BgcMu8G2uJ7wVL23gvjJZsHuRoHOajPvVoQG4ytjCZXbBegwezjIMu6Q%3D%3D)",
      "votes": 1,
      "replies": [
        {
          "id": 903773,
          "postDate": "2020-06-27T05:22:01.377Z",
          "content": "<p><a href=\"/chriscareaga\">@chriscareaga</a> Nice catch!</p>\n\n<p><a href=\"/graf10a\">@graf10a</a> I am also seeing yellow, pink and (few) red patches, especially in areas which are <em>bright</em>.\nDo you have a solution for this issue?</p>",
          "rawMarkdown": "@chriscareaga Nice catch!\n\n@graf10a I am also seeing yellow, pink and (few) red patches, especially in areas which are *bright*.\nDo you have a solution for this issue?",
          "votes": 2
        },
        {
          "id": 903799,
          "postDate": "2020-06-27T05:44:09.820Z",
          "content": "<p>I am not sure that it is an issue. In principle, if you show a sufficient number of diverse examples to your learning algorithm, it should learn to ignore these artifacts. Is the number of examples that we have in our disposal sufficient? I don't know. But in principle, there are a number of things that you can try, for example,  filtering or augmenting the images with similar-looking patches. </p>",
          "rawMarkdown": "I am not sure that it is an issue. In principle, if you show a sufficient number of diverse examples to your learning algorithm, it should learn to ignore these artifacts. Is the number of examples that we have in our disposal sufficient? I don't know. But in principle, there are a number of things that you can try, for example,  filtering or augmenting the images with similar-looking patches. ",
          "votes": 1
        },
        {
          "id": 926895,
          "postDate": "2020-07-13T04:33:19.493Z",
          "content": "<p><a href=\"/chriscareaga\">@chriscareaga</a> <a href=\"/sirishks\">@sirishks</a> <a href=\"/awsaf49\">@awsaf49</a> \nUPDATE: I removed the color artifacts from the color constant images. These artifacts were caused by the data type conversion. The updated JPEGS and tfrecords are available at the links provided in the discussion post.</p>",
          "rawMarkdown": "@chriscareaga @sirishks @awsaf49 \nUPDATE: I removed the color artifacts from the color constant images. These artifacts were caused by the data type conversion. The updated JPEGS and tfrecords are available at the links provided in the discussion post.",
          "votes": 1
        }
      ]
    },
    {
      "id": 903213,
      "postDate": "2020-06-26T16:35:58.927Z",
      "content": "<p>Neat idea. Preprocessing has been used successfully in other Kaggle image competitions. Here is an example from APTOS Blindness Comp, link <a href=\"https://www.kaggle.com/ratthachat/aptos-eye-preprocessing-in-diabetic-retinopathy\">here</a>.</p>",
      "rawMarkdown": "Neat idea. Preprocessing has been used successfully in other Kaggle image competitions. Here is an example from APTOS Blindness Comp, link [here][1].\n\n[1]: https://www.kaggle.com/ratthachat/aptos-eye-preprocessing-in-diabetic-retinopathy",
      "votes": 2,
      "replies": [
        {
          "id": 903215,
          "postDate": "2020-06-26T16:39:34.213Z",
          "content": "<p>Thank you for the link -- I will look into it.</p>",
          "rawMarkdown": "Thank you for the link -- I will look into it.",
          "votes": 1
        }
      ]
    },
    {
      "id": 902287,
      "postDate": "2020-06-26T03:46:21.280Z",
      "content": "<p>Sounds interesting. Could you update us the results of the experiment?</p>",
      "rawMarkdown": "Sounds interesting. Could you update us the results of the experiment?",
      "votes": 2,
      "replies": [
        {
          "id": 902295,
          "postDate": "2020-06-26T03:48:49.093Z",
          "content": "<p><a href=\"/santiviquez\">@santiviquez</a> I just started it -- it is going to take about 2.5 hours for the notebook to run. If the CV score looks any good then I will submit it to the leader board. After that you will be able to see the result in <a href=\"https://www.kaggle.com/graf10a/effnb0-tabular-features-tf-cv5-512x512\">the kernel</a>.</p>",
          "rawMarkdown": "@santiviquez I just started it -- it is going to take about 2.5 hours for the notebook to run. If the CV score looks any good then I will submit it to the leader board. After that you will be able to see the result in [the kernel](https://www.kaggle.com/graf10a/effnb0-tabular-features-tf-cv5-512x512).",
          "votes": 1
        }
      ]
    },
    {
      "id": 902289,
      "postDate": "2020-06-26T03:46:27.733Z",
      "rawMarkdown": "",
      "votes": 1,
      "isDeleted": true
    }
  ],
  "comments": [
    {
      "id": 937326,
      "author_name": "Roman Weilguny",
      "author_url": "",
      "post_date": "2020-07-20T23:46:56.697000",
      "content": "<p><a href=\"/graf10a\">@graf10a</a> had some hope in color constancy as my next step of improvement. I am discouraged now :)\nwill try pseudo labeling instead - did you try?</p>",
      "votes": 1,
      "replies": [
        {
          "id": 937372,
          "author_name": "Alexey Pronin",
          "author_url": "",
          "post_date": "2020-07-21T01:09:44.503000",
          "content": "<p>No, I did not try pseudo labeling.</p>",
          "votes": 1,
          "replies": []
        },
        {
          "id": 948027,
          "author_name": "Janek Idziak",
          "author_url": "",
          "post_date": "2020-07-27T16:08:11.667000",
          "content": "<p>Hello <a href=\"/romanweilguny\">@romanweilguny</a> have you had any good results with pseudo labeling yet? </p>",
          "votes": 1,
          "replies": []
        },
        {
          "id": 948152,
          "author_name": "Roman Weilguny",
          "author_url": "",
          "post_date": "2020-07-27T17:36:11.840000",
          "content": "<p>Just beginning</p>",
          "votes": 1,
          "replies": []
        }
      ]
    },
    {
      "id": 903315,
      "author_name": "Awsaf",
      "author_url": "",
      "post_date": "2020-06-26T18:16:20.027000",
      "content": "<p>I also faced the downfall in auc score after some  image processing. I cropped the black border and get rid of hair. But I couldn't find the bug. So, had to get back to the original one...</p>",
      "votes": 1,
      "replies": [
        {
          "id": 903321,
          "author_name": "Alexey Pronin",
          "author_url": "",
          "post_date": "2020-06-26T18:24:03.567000",
          "content": "<p>We should not expect that all our ideas would work. But it is still worth trying.</p>",
          "votes": 2,
          "replies": []
        },
        {
          "id": 903345,
          "author_name": "Awsaf",
          "author_url": "",
          "post_date": "2020-06-26T18:39:24.817000",
          "content": "<p>It's really disappointing when things don't go according to our intuition and we can't even find the reason behind it. I guess this the difference between research and competition that in research we must have to think about why that happened...  </p>",
          "votes": 2,
          "replies": []
        },
        {
          "id": 903347,
          "author_name": "Awsaf",
          "author_url": "",
          "post_date": "2020-06-26T18:43:24.880000",
          "content": "<p>I think we can tackle color inconsistency by doing proper augmentation. It should improve the result...</p>",
          "votes": 1,
          "replies": []
        },
        {
          "id": 918990,
          "author_name": "Alexey Pronin",
          "author_url": "",
          "post_date": "2020-07-07T16:21:21.763000",
          "content": "<p>Actually, I do not think that the result is conclusive. The change is the CV is too small compared to the standard deviation across the folds and the model we used is the simplest one. Try it with a more advanced model, with more data, with proper augmentation and you might be surprised.</p>",
          "votes": 1,
          "replies": []
        },
        {
          "id": 948246,
          "author_name": "Jacek Poplawski",
          "author_url": "",
          "post_date": "2020-07-27T18:58:27.977000",
          "content": "<p>hello <a href=\"/awsaf49\">@awsaf49</a> \ncan you share idea how to crop black border from the images? is it just (0,0,0) everywhere? </p>",
          "votes": 1,
          "replies": []
        }
      ]
    },
    {
      "id": 902541,
      "author_name": "chris",
      "author_url": "",
      "post_date": "2020-06-26T07:59:45.250000",
      "content": "<p>Looking at your processed version of ISIC 2019, it looks like some of the images contain artifacts from the color corrections. These are just a few examples I found while skimming the first ~100 images. Not sure how this affects training (if at all).</p>\n\n<p><img src=\"https://storage.googleapis.com/kagglesdsdata/datasets%2F738684%2F1280239%2FISIC_0000052_downsampled.jpg?GoogleAccessId=databundle-worker-v2@kaggle-161607.iam.gserviceaccount.com&amp;Expires=1593330916&amp;Signature=tHj%2BtQbB1LokkjDsq8E%2BB1bYJaSpCpeQ%2FZjrmahQAHWRki29lvA5TkevVQdpXpfN%2FzPjEVyj6HDhd9z6rgobeuCtNAAOu8mrqHDjGhm8Jpa3hij4snXX4YJTSQoK9ZJCZifFYd2puWJCD7bVZULqAuL9iw1IoXf8TCPidOMHOhVCXky%2FedXdBnkUYW1gPcCq2nA3keF5r5odrQuo8bXLyESmaKCoEg68kDh6jz8I1tPTbsHQ3dWlss0sCwwsUvVpsCdE03U6jaKit2mhnWV8ar70eFkqQFGBrL522gJ9v80mbsqg1gI%2B4uhU8LLTkQ3yL8raSDxKPQOfR8ykiuA1xQ%3D%3D\" alt=\"\"></p>\n\n<p><img src=\"https://storage.googleapis.com/kagglesdsdata/datasets%2F738684%2F1280239%2FISIC_0000004.jpg?GoogleAccessId=databundle-worker-v2@kaggle-161607.iam.gserviceaccount.com&amp;Expires=1593330851&amp;Signature=tJYlAvekUr7Lllm9yu%2F2g7MIPdVWkIOsxErD0gyYLlMRgUBfZzcPBuXLEDccgcXKAI56hYeBsCmL1%2F%2FTWdnpkV1f6%2FGY%2FDkz778vnkzLPjrKBFhx9AHDdaPHvhICMMg4rP02Siq%2FJe%2BzuRe4CEpaQdVc491Gvx8Q5zogTOSNrirpxScRghkErXOg9g5a4ANrd8kg7wrP%2FrXU6csY5V6wTjlV%2FZpkvJN%2B7VUQe1CKQndkK9oyfEfQ8JPOujzoIsEpojUR0kKSwz35arJ%2FuwYvajm%2Bv9rGuOOF28FbobNOQmKu749nvUx9aODC20k2sG4sfPhH9ZPAB%2BOEe42Rd7ZbXQ%3D%3D\" alt=\"\"></p>\n\n<p><img src=\"https://storage.googleapis.com/kagglesdsdata/datasets%2F738684%2F1280239%2FISIC_0000043_downsampled.jpg?GoogleAccessId=databundle-worker-v2@kaggle-161607.iam.gserviceaccount.com&amp;Expires=1593330900&amp;Signature=Z%2B4Jq2ALhEkgK8a%2FD6P09CJHT8VaG4JSoUEQmg5Pzr7qJN6h4pm25Q3etJfrIK6hd9gNmqPZw1OYOfmjCRwEsPDeswUhUu%2FC4oaQV%2F59XZqdvvZC%2BcEZwmLNr7cRiLxkwUp5vXr2MrUMbtMBnhS3o7okdHFYf%2F7Rw4gTplenqmJBlQueqTNyx41fousldxozypjFkLDcrgm6jRRoexlwzVPcHIMzanoVTXIiO5zT3V%2FtpCzMbJEM6P9W16gXuCVEUdIpQYwqsdImcdOY6FpZiUhKFRJu4U%2BgcMu8G2uJ7wVL23gvjJZsHuRoHOajPvVoQG4ytjCZXbBegwezjIMu6Q%3D%3D\" alt=\"\"></p>",
      "votes": 1,
      "replies": [
        {
          "id": 903773,
          "author_name": "Sirish Somanchi",
          "author_url": "",
          "post_date": "2020-06-27T05:22:01.377000",
          "content": "<p><a href=\"/chriscareaga\">@chriscareaga</a> Nice catch!</p>\n\n<p><a href=\"/graf10a\">@graf10a</a> I am also seeing yellow, pink and (few) red patches, especially in areas which are <em>bright</em>.\nDo you have a solution for this issue?</p>",
          "votes": 2,
          "replies": []
        },
        {
          "id": 903799,
          "author_name": "Alexey Pronin",
          "author_url": "",
          "post_date": "2020-06-27T05:44:09.820000",
          "content": "<p>I am not sure that it is an issue. In principle, if you show a sufficient number of diverse examples to your learning algorithm, it should learn to ignore these artifacts. Is the number of examples that we have in our disposal sufficient? I don't know. But in principle, there are a number of things that you can try, for example,  filtering or augmenting the images with similar-looking patches. </p>",
          "votes": 1,
          "replies": []
        },
        {
          "id": 926895,
          "author_name": "Alexey Pronin",
          "author_url": "",
          "post_date": "2020-07-13T04:33:19.493000",
          "content": "<p><a href=\"/chriscareaga\">@chriscareaga</a> <a href=\"/sirishks\">@sirishks</a> <a href=\"/awsaf49\">@awsaf49</a> \nUPDATE: I removed the color artifacts from the color constant images. These artifacts were caused by the data type conversion. The updated JPEGS and tfrecords are available at the links provided in the discussion post.</p>",
          "votes": 1,
          "replies": []
        }
      ]
    },
    {
      "id": 903213,
      "author_name": "Chris Deotte",
      "author_url": "",
      "post_date": "2020-06-26T16:35:58.927000",
      "content": "<p>Neat idea. Preprocessing has been used successfully in other Kaggle image competitions. Here is an example from APTOS Blindness Comp, link <a href=\"https://www.kaggle.com/ratthachat/aptos-eye-preprocessing-in-diabetic-retinopathy\">here</a>.</p>",
      "votes": 2,
      "replies": [
        {
          "id": 903215,
          "author_name": "Alexey Pronin",
          "author_url": "",
          "post_date": "2020-06-26T16:39:34.213000",
          "content": "<p>Thank you for the link -- I will look into it.</p>",
          "votes": 1,
          "replies": []
        }
      ]
    },
    {
      "id": 902287,
      "author_name": "Santiago Viquez",
      "author_url": "",
      "post_date": "2020-06-26T03:46:21.280000",
      "content": "<p>Sounds interesting. Could you update us the results of the experiment?</p>",
      "votes": 2,
      "replies": [
        {
          "id": 902295,
          "author_name": "Alexey Pronin",
          "author_url": "",
          "post_date": "2020-06-26T03:48:49.093000",
          "content": "<p><a href=\"/santiviquez\">@santiviquez</a> I just started it -- it is going to take about 2.5 hours for the notebook to run. If the CV score looks any good then I will submit it to the leader board. After that you will be able to see the result in <a href=\"https://www.kaggle.com/graf10a/effnb0-tabular-features-tf-cv5-512x512\">the kernel</a>.</p>",
          "votes": 1,
          "replies": []
        }
      ]
    },
    {
      "id": 902289,
      "author_name": "",
      "author_url": "",
      "post_date": "2020-06-26T03:46:27.733000",
      "content": "",
      "votes": 1,
      "replies": []
    }
  ],
  "raw_markdown_by_id": {
    "902099": "Today, I came across this [nice kernel](https://www.kaggle.com/apacheco/shades-of-gray-color-constancy) illustrating how to apply the Shades of Gray algorithm which is a color compensation technique. The pictures below illustrate the difference between the original images (left) and the same images after they have been pre-processed with the Shades of Gray algorithm (right):\n![](https://www.googleapis.com/download/storage/v1/b/kaggle-user-content/o/inbox%2F1461289%2F54ef1c22afc3551ed6836ccaf7ac175a%2F__results___7_0.png?generation=1593128228898324&amp;alt=media)\n![](https://www.googleapis.com/download/storage/v1/b/kaggle-user-content/o/inbox%2F1461289%2F46bc75a92cb6a9c4c65273f56c3cf269%2F__results___7_5.png?generation=1593128229005617&amp;alt=media)\n![](https://www.googleapis.com/download/storage/v1/b/kaggle-user-content/o/inbox%2F1461289%2F9799a11b9ff0e3b420ad70ba9b097bc8%2F__results___7_2.png?generation=1593128229022083&amp;alt=media)\n![](https://www.googleapis.com/download/storage/v1/b/kaggle-user-content/o/inbox%2F1461289%2Fa9547009e025cca65751e6aefde15ac8%2F__results___7_7.png?generation=1593128229509720&amp;alt=media)\n![](https://www.googleapis.com/download/storage/v1/b/kaggle-user-content/o/inbox%2F1461289%2F7a981ca2b1ba0d6086f6b26691e97990%2F__results___7_3.png?generation=1593128229093026&amp;alt=media)\n![](https://www.googleapis.com/download/storage/v1/b/kaggle-user-content/o/inbox%2F1461289%2Fe623e72c0d12f7bd6ab953fbffe81cfb%2F__results___7_4.png?generation=1593128229792045&amp;alt=media)\n\nI decided to play with this idea and made both JPEG and tfrecords files for `train`, `test`, and the external data from ISIC 2019 competition. I also included the tabular features in the tfrecords following the procedure from [this old kernel of mine](https://www.kaggle.com/graf10a/siim-example-of-making-tfrec-files-512x512). Here are the data:\n\n**JPEG's:** \n[Train set data, 512x512](https://www.kaggle.com/graf10a/siim-color-constant-512-train)\n[Test set data, 512x512](https://www.kaggle.com/graf10a/siim-color-constant-512-test)\n[ISIC 2019 external data, 512x512](https://www.kaggle.com/graf10a/siim-color-constant-512-external)\n\n**tfrecords:**\n[Train set, 512x512](https://www.kaggle.com/graf10a/siim-tfrec-cc-512-train)\n[Test set, 512x512](https://www.kaggle.com/graf10a/siim-tfrec-cc-512-test)\n[ISIC 2019 external data, 512x512](https://www.kaggle.com/graf10a/siim-tfrec-cc-512-external)\n\nHere is [an example](https://www.kaggle.com/graf10a/effnb0-tabular-features-tf-cv5-512x512) illustrating how to include tfrecords into your machine learning pipeline. More discussion is [here](https://www.kaggle.com/c/siim-isic-melanoma-classification/discussion/158395).\n\n *Disclaimer:* I have no idea if this is going to help us to improve the score. Also, I have not removed duplicates from the external data. This means that including external data in your validation set will most probably break your cross-validation. It seems to be okay though to include the external data in your train set. \n\nUPDATE 1: I am currently running an experiment with the color constant images in Version 10 of [my public notebook](https://www.kaggle.com/graf10a/effnb0-tabular-features-tf-cv5-512x512).  We will know the result in a few hours.\n\nUPDATE 2:  I have just finished running the experiment.  It did not show an improvement in the CV score (the CV AUC went down from ~0.903 to ~0.897). However, I do not think it means that this idea does not work -- the change is too small to draw any conclusions -- let's not forget that the standard deviation across our 5 CV-folds is of order 0.015. Try it with more advanced models, with more data, with proper augmentation -- you might be surprised!",
    "937326": "@graf10a had some hope in color constancy as my next step of improvement. I am discouraged now :)\nwill try pseudo labeling instead - did you try?",
    "903315": "I also faced the downfall in auc score after some  image processing. I cropped the black border and get rid of hair. But I couldn't find the bug. So, had to get back to the original one...",
    "902541": "Looking at your processed version of ISIC 2019, it looks like some of the images contain artifacts from the color corrections. These are just a few examples I found while skimming the first ~100 images. Not sure how this affects training (if at all).\n\n![](https://storage.googleapis.com/kagglesdsdata/datasets%2F738684%2F1280239%2FISIC_0000052_downsampled.jpg?GoogleAccessId=databundle-worker-v2@kaggle-161607.iam.gserviceaccount.com&amp;Expires=1593330916&amp;Signature=tHj%2BtQbB1LokkjDsq8E%2BB1bYJaSpCpeQ%2FZjrmahQAHWRki29lvA5TkevVQdpXpfN%2FzPjEVyj6HDhd9z6rgobeuCtNAAOu8mrqHDjGhm8Jpa3hij4snXX4YJTSQoK9ZJCZifFYd2puWJCD7bVZULqAuL9iw1IoXf8TCPidOMHOhVCXky%2FedXdBnkUYW1gPcCq2nA3keF5r5odrQuo8bXLyESmaKCoEg68kDh6jz8I1tPTbsHQ3dWlss0sCwwsUvVpsCdE03U6jaKit2mhnWV8ar70eFkqQFGBrL522gJ9v80mbsqg1gI%2B4uhU8LLTkQ3yL8raSDxKPQOfR8ykiuA1xQ%3D%3D)\n\n![](https://storage.googleapis.com/kagglesdsdata/datasets%2F738684%2F1280239%2FISIC_0000004.jpg?GoogleAccessId=databundle-worker-v2@kaggle-161607.iam.gserviceaccount.com&amp;Expires=1593330851&amp;Signature=tJYlAvekUr7Lllm9yu%2F2g7MIPdVWkIOsxErD0gyYLlMRgUBfZzcPBuXLEDccgcXKAI56hYeBsCmL1%2F%2FTWdnpkV1f6%2FGY%2FDkz778vnkzLPjrKBFhx9AHDdaPHvhICMMg4rP02Siq%2FJe%2BzuRe4CEpaQdVc491Gvx8Q5zogTOSNrirpxScRghkErXOg9g5a4ANrd8kg7wrP%2FrXU6csY5V6wTjlV%2FZpkvJN%2B7VUQe1CKQndkK9oyfEfQ8JPOujzoIsEpojUR0kKSwz35arJ%2FuwYvajm%2Bv9rGuOOF28FbobNOQmKu749nvUx9aODC20k2sG4sfPhH9ZPAB%2BOEe42Rd7ZbXQ%3D%3D)\n\n![](https://storage.googleapis.com/kagglesdsdata/datasets%2F738684%2F1280239%2FISIC_0000043_downsampled.jpg?GoogleAccessId=databundle-worker-v2@kaggle-161607.iam.gserviceaccount.com&amp;Expires=1593330900&amp;Signature=Z%2B4Jq2ALhEkgK8a%2FD6P09CJHT8VaG4JSoUEQmg5Pzr7qJN6h4pm25Q3etJfrIK6hd9gNmqPZw1OYOfmjCRwEsPDeswUhUu%2FC4oaQV%2F59XZqdvvZC%2BcEZwmLNr7cRiLxkwUp5vXr2MrUMbtMBnhS3o7okdHFYf%2F7Rw4gTplenqmJBlQueqTNyx41fousldxozypjFkLDcrgm6jRRoexlwzVPcHIMzanoVTXIiO5zT3V%2FtpCzMbJEM6P9W16gXuCVEUdIpQYwqsdImcdOY6FpZiUhKFRJu4U%2BgcMu8G2uJ7wVL23gvjJZsHuRoHOajPvVoQG4ytjCZXbBegwezjIMu6Q%3D%3D)",
    "903213": "Neat idea. Preprocessing has been used successfully in other Kaggle image competitions. Here is an example from APTOS Blindness Comp, link [here][1].\n\n[1]: https://www.kaggle.com/ratthachat/aptos-eye-preprocessing-in-diabetic-retinopathy",
    "902287": "Sounds interesting. Could you update us the results of the experiment?",
    "902289": ""
  }
}