{
  "id": 175372,
  "title": "Hacking super-resolution images",
  "url": "/competitions/siim-isic-melanoma-classification/discussion/175372",
  "author_name": "",
  "post_date": "2020-08-18T02:51:01.114793900Z",
  "votes": 6,
  "comment_count": 13,
  "views": 0,
  "content": "<h3>Hacking Super-resolution Images</h3>\n<p>First, thank you to the organizers and Kaggle for this competition. Thank you to everyone who contributed to making this image based competition fun. </p>\n<p>Special thanks to <a href=\"https://www.kaggle.com/cdeotte\" target=\"_blank\">@cdeotte</a> for all of his notebooks and discussion. I would not have been able to create my tfrecords and explore this idea without his work.</p>\n<p>Congrats to the winners and everyone who achieved a medal!</p>\n<h3>Intro</h3>\n<p>Image resolutions were all over the place, but a large majority of the images were downsampled from resolutions greater than 1024x1024, thus a major consideration was how to extract the most out of super-resolution images while being able to train a reasonably well performing model with the highest resolution given limited time and resources.</p>\n<h3>Approach</h3>\n<p>Toward the last week of the competition, I wanted to run 1024x1024 but with limited time and resources I came up with a hack: <strong>center crop 1024x1024 resolution sizes of 512x512</strong>. To my surprise, by including the entire upsample center crop in train, there was no leakage. Somehow the 4x increased pixel density and zoom contributed to generalizing better without leakage. </p>\n<p>While this approach appears to be a mix of data augmentation and upsampling both positive and negatives, I believe it was not. Images that were originally super-resolution were downsampled (resized to a lower resolution) just to fit within a pre-trained model. Downsampled images have lost so much information which is precisely why image sizes mattered so much in this competition.</p>\n<p>Edit: to clarify - I trained on both 2020 512x512 resolutions <strong>and</strong> 512x512 super resolution crops from 1024x1024. I validated on only 2020 original 512x512 resolutions.</p>\n<h3>Final Single Model Results</h3>\n<table>\n<thead>\n<tr>\n<th>CV</th>\n<th>LB</th>\n<th>Private LB</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>0.9379</td>\n<td>0.9394</td>\n<td>0.9325</td>\n</tr>\n</tbody>\n</table>\n<p>B6 512x512 15 fold took over 22 hours to train on TPU with 75000 images per epoch. While the LB was somewhat low, I felt confident that private LB would be close judging by how close CV was to LB.</p>\n<p>Edit: Using this approach, I was able to increase CV by 0.02-0.03, which was huge!</p>\n<h3>Extra</h3>\n<p>This same approach was briefly explored with 2018 + 2017 images in addition to 2020 with some success but I ran out of time to get conclusive results. </p>\n<p>Side note: </p>\n<ul>\n<li>I refer to upsampling as the approach to increase the size of a training dataset. </li>\n<li>On the other hand, I refer to downsampled resolutions as a process by which pixel information is lost due to resizing a larger image to a smaller one.</li>\n</ul>",
  "messages": [
    {
      "id": "974709",
      "postDate": "08/18/2020 02:51:01",
      "content": "<h3>Hacking Super-resolution Images</h3>\n<p>First, thank you to the organizers and Kaggle for this competition. Thank you to everyone who contributed to making this image based competition fun. </p>\n<p>Special thanks to <a href=\"https://www.kaggle.com/cdeotte\" target=\"_blank\">@cdeotte</a> for all of his notebooks and discussion. I would not have been able to create my tfrecords and explore this idea without his work.</p>\n<p>Congrats to the winners and everyone who achieved a medal!</p>\n<h3>Intro</h3>\n<p>Image resolutions were all over the place, but a large majority of the images were downsampled from resolutions greater than 1024x1024, thus a major consideration was how to extract the most out of super-resolution images while being able to train a reasonably well performing model with the highest resolution given limited time and resources.</p>\n<h3>Approach</h3>\n<p>Toward the last week of the competition, I wanted to run 1024x1024 but with limited time and resources I came up with a hack: <strong>center crop 1024x1024 resolution sizes of 512x512</strong>. To my surprise, by including the entire upsample center crop in train, there was no leakage. Somehow the 4x increased pixel density and zoom contributed to generalizing better without leakage. </p>\n<p>While this approach appears to be a mix of data augmentation and upsampling both positive and negatives, I believe it was not. Images that were originally super-resolution were downsampled (resized to a lower resolution) just to fit within a pre-trained model. Downsampled images have lost so much information which is precisely why image sizes mattered so much in this competition.</p>\n<p>Edit: to clarify - I trained on both 2020 512x512 resolutions <strong>and</strong> 512x512 super resolution crops from 1024x1024. I validated on only 2020 original 512x512 resolutions.</p>\n<h3>Final Single Model Results</h3>\n<table>\n<thead>\n<tr>\n<th>CV</th>\n<th>LB</th>\n<th>Private LB</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>0.9379</td>\n<td>0.9394</td>\n<td>0.9325</td>\n</tr>\n</tbody>\n</table>\n<p>B6 512x512 15 fold took over 22 hours to train on TPU with 75000 images per epoch. While the LB was somewhat low, I felt confident that private LB would be close judging by how close CV was to LB.</p>\n<p>Edit: Using this approach, I was able to increase CV by 0.02-0.03, which was huge!</p>\n<h3>Extra</h3>\n<p>This same approach was briefly explored with 2018 + 2017 images in addition to 2020 with some success but I ran out of time to get conclusive results. </p>\n<p>Side note: </p>\n<ul>\n<li>I refer to upsampling as the approach to increase the size of a training dataset. </li>\n<li>On the other hand, I refer to downsampled resolutions as a process by which pixel information is lost due to resizing a larger image to a smaller one.</li>\n</ul>",
      "rawMarkdown": "### Hacking Super-resolution Images\n\nFirst, thank you to the organizers and Kaggle for this competition. Thank you to everyone who contributed to making this image based competition fun. \n\nSpecial thanks to @cdeotte for all of his notebooks and discussion. I would not have been able to create my tfrecords and explore this idea without his work.\n\nCongrats to the winners and everyone who achieved a medal!\n\n### Intro\n\nImage resolutions were all over the place, but a large majority of the images were downsampled from resolutions greater than 1024x1024, thus a major consideration was how to extract the most out of super-resolution images while being able to train a reasonably well performing model with the highest resolution given limited time and resources.\n\n### Approach \n\nToward the last week of the competition, I wanted to run 1024x1024 but with limited time and resources I came up with a hack: **center crop 1024x1024 resolution sizes of 512x512**. To my surprise, by including the entire upsample center crop in train, there was no leakage. Somehow the 4x increased pixel density and zoom contributed to generalizing better without leakage. \n\nWhile this approach appears to be a mix of data augmentation and upsampling both positive and negatives, I believe it was not. Images that were originally super-resolution were downsampled (resized to a lower resolution) just to fit within a pre-trained model. Downsampled images have lost so much information which is precisely why image sizes mattered so much in this competition.\n\nEdit: to clarify - I trained on both 2020 512x512 resolutions **and** 512x512 super resolution crops from 1024x1024. I validated on only 2020 original 512x512 resolutions.\n\n### Final Single Model Results \n\n| CV | LB | Private LB |\n| --- | --- | --- |\n| 0.9379 | 0.9394 | 0.9325\n\nB6 512x512 15 fold took over 22 hours to train on TPU with 75000 images per epoch. While the LB was somewhat low, I felt confident that private LB would be close judging by how close CV was to LB.\n\nEdit: Using this approach, I was able to increase CV by 0.02-0.03, which was huge!\n\n### Extra\n\nThis same approach was briefly explored with 2018 + 2017 images in addition to 2020 with some success but I ran out of time to get conclusive results. \n\nSide note: \n- I refer to upsampling as the approach to increase the size of a training dataset. \n- On the other hand, I refer to downsampled resolutions as a process by which pixel information is lost due to resizing a larger image to a smaller one.",
      "votes": null
    },
    {
      "id": "974728",
      "postDate": "08/18/2020 03:10:17",
      "content": "<p>Nice trick Tim. Congrats on a great solo silver finish. By starting with 1024x1024 and then cropping to 512x512, you're getting all the information of the larger images but get to train at the speed of smaller images. I'm confused about the following:</p>\n<blockquote>\n  <p>To my surprise, by including the entire upsample center crop in train, there was no leakage.</p>\n</blockquote>\n<p>Are you saying that you included all the extra malignant images including the ones in your validation fold? Also did you both center crop train and validation? So aren't the exact same malignant images now in both train and val?</p>",
      "rawMarkdown": "Nice trick Tim. Congrats on a great solo silver finish. By starting with 1024x1024 and then cropping to 512x512, you're getting all the information of the larger images but get to train at the speed of smaller images. I'm confused about the following:\n\n> To my surprise, by including the entire upsample center crop in train, there was no leakage.\n\nAre you saying that you included all the extra malignant images including the ones in your validation fold? Also did you both center crop train and validation? So aren't the exact same malignant images now in both train and val?",
      "votes": null
    },
    {
      "id": "974738",
      "postDate": "08/18/2020 03:17:07",
      "content": "<p>So I included the center cropped images for the entire 2020 (positive/negative) as train for each of the 15 folds. In all likelihood there may have been a slight leakage at best. Certainly I managed to get away with it even though it was generally not a recommended approach.</p>\n<p>I was also editing this idea in real-time since I had to split the notebook up into 15 individual runs. So actually about half had the same images (albeit augmented) in both train and validation and the other half did not.</p>",
      "rawMarkdown": "So I included the center cropped images for the entire 2020 (positive/negative) as train for each of the 15 folds. In all likelihood there may have been a slight leakage at best. Certainly I managed to get away with it even though it was generally not a recommended approach.\n\nI was also editing this idea in real-time since I had to split the notebook up into 15 individual runs. So actually about half had the same images (albeit augmented) in both train and validation and the other half did not.",
      "votes": null
    },
    {
      "id": "974817",
      "postDate": "08/18/2020 04:10:37",
      "content": "<blockquote>\n  <p>B6 512x512 15 fold took over 22 hours to train on TPU with 75000 images per epoch. While the LB was somewhat low, I felt confident that private LB would be close judging by how close CV was to LB.</p>\n</blockquote>\n<p>After removed all duplicates from all sources, there're only ~57k images left.</p>",
      "rawMarkdown": "> B6 512x512 15 fold took over 22 hours to train on TPU with 75000 images per epoch. While the LB was somewhat low, I felt confident that private LB would be close judging by how close CV was to LB.\n\nAfter removed all duplicates from all sources, there're only ~57k images left.",
      "votes": null
    },
    {
      "id": "974852",
      "postDate": "08/18/2020 04:28:01",
      "content": "<p>So there here's the breakdown of the 75000 training images: </p>\n<ul>\n<li>32692 images in 2020 with duplicates removed (center cropped 512)</li>\n<li>12900 2018 images * 14/15 = 12040</li>\n<li>32692 2020 original images * 14/15 = 30512 </li>\n</ul>\n<p>32692 + 12040 + 30512 = 75224</p>",
      "rawMarkdown": "So there here's the breakdown of the 75000 training images: \n\n- 32692 images in 2020 with duplicates removed (center cropped 512)\n- 12900 2018 images * 14/15 = 12040\n- 32692 2020 original images * 14/15 = 30512 \n\n32692 + 12040 + 30512 = 75224",
      "votes": null
    },
    {
      "id": "974868",
      "postDate": "08/18/2020 04:34:02",
      "content": "<p>how about method that uses:</p>\n<ol>\n<li>self supervised to train on crops<br>\n2.freeze pretrained self supervised model. add a classification head and train head on large images?</li>\n</ol>\n<p>self-super tasks could be like predicting one part of image from other part (like GPT3, wavtovec) or clustering or contrastive loss.</p>",
      "rawMarkdown": "how about method that uses:\n1. self supervised to train on crops\n2.freeze pretrained self supervised model. add a classification head and train head on large images?\n\nself-super tasks could be like predicting one part of image from other part (like GPT3, wavtovec) or clustering or contrastive loss.",
      "votes": null
    },
    {
      "id": "974931",
      "postDate": "08/18/2020 05:01:10",
      "content": "<p>Oh so you added center cropped 512 images. I don't know if this could  be consider a leakage??</p>",
      "rawMarkdown": "Oh so you added center cropped 512 images. I don't know if this could  be consider a leakage??",
      "votes": null
    },
    {
      "id": "974939",
      "postDate": "08/18/2020 05:05:43",
      "content": "<p>You can try it. My dataset melanoma008 is 2020 center crop 512 with no meta data. Let me know if you notice leakage. Based on what I've seen, I don't think there's much leakage if any. On the safe side, you can easily just include only the same folds as train.</p>",
      "rawMarkdown": "You can try it. My dataset melanoma008 is 2020 center crop 512 with no meta data. Let me know if you notice leakage. Based on what I've seen, I don't think there's much leakage if any. On the safe side, you can easily just include only the same folds as train.",
      "votes": null
    },
    {
      "id": "974949",
      "postDate": "08/18/2020 05:09:39",
      "content": "<p>I'm still a little confused. Did you use both 512 full images and 512 center cropped (from 1024) to train with?</p>",
      "rawMarkdown": "I'm still a little confused. Did you use both 512 full images and 512 center cropped (from 1024) to train with?",
      "votes": null
    },
    {
      "id": "974957",
      "postDate": "08/18/2020 05:12:34",
      "content": "<p>Yes! I added a full upsample of 512 center crop of 1024x1024 to 512 2020 original train. It added 0.2x to CV.</p>",
      "rawMarkdown": "Yes! I added a full upsample of 512 center crop of 1024x1024 to 512 2020 original train. It added 0.2x to CV.",
      "votes": null
    },
    {
      "id": "974966",
      "postDate": "08/18/2020 05:16:35",
      "content": "<p>You get the benefit of seeing the original image at 512x512, <strong>and</strong> the benefit of zoomed in super-resolution crops at 1024x1024. Validation is only 2020 original 512x512.</p>",
      "rawMarkdown": "You get the benefit of seeing the original image at 512x512, **and** the benefit of zoomed in super-resolution crops at 1024x1024. Validation is only 2020 original 512x512.",
      "votes": null
    },
    {
      "id": "974970",
      "postDate": "08/18/2020 05:19:00",
      "content": "<p>Wow, that's very creative. I need to try this. I thought about doing something like this and then forgot, haha.</p>",
      "rawMarkdown": "Wow, that's very creative. I need to try this. I thought about doing something like this and then forgot, haha.",
      "votes": null
    },
    {
      "id": "974991",
      "postDate": "08/18/2020 05:28:18",
      "content": "<p>Interestingly, I trained 2018 512x512 original + 512x512 center crop 1024x1024 + 2020 512x512 center crop 1024x1024 and validated on the entire 2020 training data - all 32692 images and was able to achieve 0.895 CV. That's how I knew there was no leakage. If there was the entire 2020 validation would be way higher.</p>",
      "rawMarkdown": "Interestingly, I trained 2018 512x512 original + 512x512 center crop 1024x1024 + 2020 512x512 center crop 1024x1024 and validated on the entire 2020 training data - all 32692 images and was able to achieve 0.895 CV. That's how I knew there was no leakage. If there was the entire 2020 validation would be way higher.",
      "votes": null
    },
    {
      "id": "975943",
      "postDate": "08/18/2020 14:45:20",
      "content": "<p>Congratulations ! This is one solution that put smile on my face. I would not have thought of purposefully putting  center cropped images for the entire 2020 (positive/negative) as train given that this would cause a leak. Tells me how assumptions fail. </p>",
      "rawMarkdown": "Congratulations ! This is one solution that put smile on my face. I would not have thought of purposefully putting  center cropped images for the entire 2020 (positive/negative) as train given that this would cause a leak. Tells me how assumptions fail.",
      "votes": null
    }
  ],
  "comments": [
    {
      "id": 974728,
      "author_name": "cdeotte",
      "author_url": "",
      "post_date": "08/18/2020 03:10:17",
      "content": "<p>Nice trick Tim. Congrats on a great solo silver finish. By starting with 1024x1024 and then cropping to 512x512, you're getting all the information of the larger images but get to train at the speed of smaller images. I'm confused about the following:</p>\n<blockquote>\n  <p>To my surprise, by including the entire upsample center crop in train, there was no leakage.</p>\n</blockquote>\n<p>Are you saying that you included all the extra malignant images including the ones in your validation fold? Also did you both center crop train and validation? So aren't the exact same malignant images now in both train and val?</p>",
      "votes": null,
      "replies": [
        {
          "id": 974738,
          "author_name": "teeyee314",
          "author_url": "",
          "post_date": "08/18/2020 03:17:07",
          "content": "<p>So I included the center cropped images for the entire 2020 (positive/negative) as train for each of the 15 folds. In all likelihood there may have been a slight leakage at best. Certainly I managed to get away with it even though it was generally not a recommended approach.</p>\n<p>I was also editing this idea in real-time since I had to split the notebook up into 15 individual runs. So actually about half had the same images (albeit augmented) in both train and validation and the other half did not.</p>",
          "votes": null,
          "replies": []
        }
      ]
    },
    {
      "id": 974817,
      "author_name": "quandapro",
      "author_url": "",
      "post_date": "08/18/2020 04:10:37",
      "content": "<blockquote>\n  <p>B6 512x512 15 fold took over 22 hours to train on TPU with 75000 images per epoch. While the LB was somewhat low, I felt confident that private LB would be close judging by how close CV was to LB.</p>\n</blockquote>\n<p>After removed all duplicates from all sources, there're only ~57k images left.</p>",
      "votes": null,
      "replies": [
        {
          "id": 974852,
          "author_name": "teeyee314",
          "author_url": "",
          "post_date": "08/18/2020 04:28:01",
          "content": "<p>So there here's the breakdown of the 75000 training images: </p>\n<ul>\n<li>32692 images in 2020 with duplicates removed (center cropped 512)</li>\n<li>12900 2018 images * 14/15 = 12040</li>\n<li>32692 2020 original images * 14/15 = 30512 </li>\n</ul>\n<p>32692 + 12040 + 30512 = 75224</p>",
          "votes": null,
          "replies": []
        },
        {
          "id": 974931,
          "author_name": "quandapro",
          "author_url": "",
          "post_date": "08/18/2020 05:01:10",
          "content": "<p>Oh so you added center cropped 512 images. I don't know if this could  be consider a leakage??</p>",
          "votes": null,
          "replies": []
        },
        {
          "id": 974939,
          "author_name": "teeyee314",
          "author_url": "",
          "post_date": "08/18/2020 05:05:43",
          "content": "<p>You can try it. My dataset melanoma008 is 2020 center crop 512 with no meta data. Let me know if you notice leakage. Based on what I've seen, I don't think there's much leakage if any. On the safe side, you can easily just include only the same folds as train.</p>",
          "votes": null,
          "replies": []
        },
        {
          "id": 974949,
          "author_name": "cdeotte",
          "author_url": "",
          "post_date": "08/18/2020 05:09:39",
          "content": "<p>I'm still a little confused. Did you use both 512 full images and 512 center cropped (from 1024) to train with?</p>",
          "votes": null,
          "replies": []
        },
        {
          "id": 974957,
          "author_name": "teeyee314",
          "author_url": "",
          "post_date": "08/18/2020 05:12:34",
          "content": "<p>Yes! I added a full upsample of 512 center crop of 1024x1024 to 512 2020 original train. It added 0.2x to CV.</p>",
          "votes": null,
          "replies": []
        },
        {
          "id": 974966,
          "author_name": "teeyee314",
          "author_url": "",
          "post_date": "08/18/2020 05:16:35",
          "content": "<p>You get the benefit of seeing the original image at 512x512, <strong>and</strong> the benefit of zoomed in super-resolution crops at 1024x1024. Validation is only 2020 original 512x512.</p>",
          "votes": null,
          "replies": []
        },
        {
          "id": 974970,
          "author_name": "cdeotte",
          "author_url": "",
          "post_date": "08/18/2020 05:19:00",
          "content": "<p>Wow, that's very creative. I need to try this. I thought about doing something like this and then forgot, haha.</p>",
          "votes": null,
          "replies": []
        },
        {
          "id": 974991,
          "author_name": "teeyee314",
          "author_url": "",
          "post_date": "08/18/2020 05:28:18",
          "content": "<p>Interestingly, I trained 2018 512x512 original + 512x512 center crop 1024x1024 + 2020 512x512 center crop 1024x1024 and validated on the entire 2020 training data - all 32692 images and was able to achieve 0.895 CV. That's how I knew there was no leakage. If there was the entire 2020 validation would be way higher.</p>",
          "votes": null,
          "replies": []
        }
      ]
    },
    {
      "id": 974868,
      "author_name": "hengck23",
      "author_url": "",
      "post_date": "08/18/2020 04:34:02",
      "content": "<p>how about method that uses:</p>\n<ol>\n<li>self supervised to train on crops<br>\n2.freeze pretrained self supervised model. add a classification head and train head on large images?</li>\n</ol>\n<p>self-super tasks could be like predicting one part of image from other part (like GPT3, wavtovec) or clustering or contrastive loss.</p>",
      "votes": null,
      "replies": []
    },
    {
      "id": 975943,
      "author_name": "realsid",
      "author_url": "",
      "post_date": "08/18/2020 14:45:20",
      "content": "<p>Congratulations ! This is one solution that put smile on my face. I would not have thought of purposefully putting  center cropped images for the entire 2020 (positive/negative) as train given that this would cause a leak. Tells me how assumptions fail. </p>",
      "votes": null,
      "replies": []
    }
  ],
  "raw_markdown_by_id": {
    "974709": "### Hacking Super-resolution Images\n\nFirst, thank you to the organizers and Kaggle for this competition. Thank you to everyone who contributed to making this image based competition fun. \n\nSpecial thanks to @cdeotte for all of his notebooks and discussion. I would not have been able to create my tfrecords and explore this idea without his work.\n\nCongrats to the winners and everyone who achieved a medal!\n\n### Intro\n\nImage resolutions were all over the place, but a large majority of the images were downsampled from resolutions greater than 1024x1024, thus a major consideration was how to extract the most out of super-resolution images while being able to train a reasonably well performing model with the highest resolution given limited time and resources.\n\n### Approach \n\nToward the last week of the competition, I wanted to run 1024x1024 but with limited time and resources I came up with a hack: **center crop 1024x1024 resolution sizes of 512x512**. To my surprise, by including the entire upsample center crop in train, there was no leakage. Somehow the 4x increased pixel density and zoom contributed to generalizing better without leakage. \n\nWhile this approach appears to be a mix of data augmentation and upsampling both positive and negatives, I believe it was not. Images that were originally super-resolution were downsampled (resized to a lower resolution) just to fit within a pre-trained model. Downsampled images have lost so much information which is precisely why image sizes mattered so much in this competition.\n\nEdit: to clarify - I trained on both 2020 512x512 resolutions **and** 512x512 super resolution crops from 1024x1024. I validated on only 2020 original 512x512 resolutions.\n\n### Final Single Model Results \n\n| CV | LB | Private LB |\n| --- | --- | --- |\n| 0.9379 | 0.9394 | 0.9325\n\nB6 512x512 15 fold took over 22 hours to train on TPU with 75000 images per epoch. While the LB was somewhat low, I felt confident that private LB would be close judging by how close CV was to LB.\n\nEdit: Using this approach, I was able to increase CV by 0.02-0.03, which was huge!\n\n### Extra\n\nThis same approach was briefly explored with 2018 + 2017 images in addition to 2020 with some success but I ran out of time to get conclusive results. \n\nSide note: \n- I refer to upsampling as the approach to increase the size of a training dataset. \n- On the other hand, I refer to downsampled resolutions as a process by which pixel information is lost due to resizing a larger image to a smaller one.",
    "974728": "Nice trick Tim. Congrats on a great solo silver finish. By starting with 1024x1024 and then cropping to 512x512, you're getting all the information of the larger images but get to train at the speed of smaller images. I'm confused about the following:\n\n> To my surprise, by including the entire upsample center crop in train, there was no leakage.\n\nAre you saying that you included all the extra malignant images including the ones in your validation fold? Also did you both center crop train and validation? So aren't the exact same malignant images now in both train and val?",
    "974738": "So I included the center cropped images for the entire 2020 (positive/negative) as train for each of the 15 folds. In all likelihood there may have been a slight leakage at best. Certainly I managed to get away with it even though it was generally not a recommended approach.\n\nI was also editing this idea in real-time since I had to split the notebook up into 15 individual runs. So actually about half had the same images (albeit augmented) in both train and validation and the other half did not.",
    "974817": "> B6 512x512 15 fold took over 22 hours to train on TPU with 75000 images per epoch. While the LB was somewhat low, I felt confident that private LB would be close judging by how close CV was to LB.\n\nAfter removed all duplicates from all sources, there're only ~57k images left.",
    "974852": "So there here's the breakdown of the 75000 training images: \n\n- 32692 images in 2020 with duplicates removed (center cropped 512)\n- 12900 2018 images * 14/15 = 12040\n- 32692 2020 original images * 14/15 = 30512 \n\n32692 + 12040 + 30512 = 75224",
    "974868": "how about method that uses:\n1. self supervised to train on crops\n2.freeze pretrained self supervised model. add a classification head and train head on large images?\n\nself-super tasks could be like predicting one part of image from other part (like GPT3, wavtovec) or clustering or contrastive loss.",
    "974931": "Oh so you added center cropped 512 images. I don't know if this could  be consider a leakage??",
    "974939": "You can try it. My dataset melanoma008 is 2020 center crop 512 with no meta data. Let me know if you notice leakage. Based on what I've seen, I don't think there's much leakage if any. On the safe side, you can easily just include only the same folds as train.",
    "974949": "I'm still a little confused. Did you use both 512 full images and 512 center cropped (from 1024) to train with?",
    "974957": "Yes! I added a full upsample of 512 center crop of 1024x1024 to 512 2020 original train. It added 0.2x to CV.",
    "974966": "You get the benefit of seeing the original image at 512x512, **and** the benefit of zoomed in super-resolution crops at 1024x1024. Validation is only 2020 original 512x512.",
    "974970": "Wow, that's very creative. I need to try this. I thought about doing something like this and then forgot, haha.",
    "974991": "Interestingly, I trained 2018 512x512 original + 512x512 center crop 1024x1024 + 2020 512x512 center crop 1024x1024 and validated on the entire 2020 training data - all 32692 images and was able to achieve 0.895 CV. That's how I knew there was no leakage. If there was the entire 2020 validation would be way higher.",
    "975943": "Congratulations ! This is one solution that put smile on my face. I would not have thought of purposefully putting  center cropped images for the entire 2020 (positive/negative) as train given that this would cause a leak. Tells me how assumptions fail."
  },
  "source": "meta"
}