{
  "id": 266564,
  "title": "Simple Bronze Solution",
  "url": "/competitions/seti-breakthrough-listen/discussion/266564",
  "author_name": "Tucker Arrants",
  "post_date": "2021-08-19T14:58:51.431000",
  "votes": 13,
  "comment_count": 2,
  "views": 0,
  "content": "<p>Firstly, congratulations to the winners and everyone else that medaled. Thank you Kaggle and SETI for organizing this competition, it has been fun indeed. </p>\n<p>I was very invested in this competition early on, but after the reset, I could not find the time to continue experimenting. I managed to squeeze out a bronze medal, which I am content with, all things considered. Here is what I did:</p>\n<h3>Learned Image Resizing</h3>\n<p>I released a <a href=\"https://www.kaggle.com/tuckerarrants/seti-learned-image-resizing\" target=\"_blank\">kernel </a> early on in this competition. After rerunning this notebook with the new data, I noticed that my CV-LB gap was much lower than others had reported. I do not really know why, but I used this notebook to generate 2/4 model predictions for my final submission. I am excited to test this 'learned image resizing' in future competitions as I think it can be fairly powerful for certain image datasets. </p>\n<h3>Augmentations</h3>\n<p>TTA gave me significant CV improvements. I settled for 15 TTA steps and used the same augmentations during inference that I used during training. To be precise: <code>HFlip</code>, <code>VFlip</code>, <code>ShiftScaleRotate(rotate_limit=0, shift_limit=0)</code>, <code>MotionBlur</code>, and <code>IAASharpen</code>. I also used MixUp during training. I only trained with <code>ON</code> cadence snippets to reduce training time and stacked them spatially. I tried randomly swapping the snippets before stacking them as an augmentation technique and saw marginal improvements, but did not run enough experiments to confirm this. </p>\n<h3>Simple Ensembling</h3>\n<p>I used 5 folds for each model stratified by the target variable. For each model, I averaged the predictions of <code>best_loss</code> and <code>best_score</code> checkpoints. For diversity, I trained different EfficientNets with different image sizes. My final submission was the harmonic mean of 4 models.</p>\n<ul>\n<li>B0 input_size=512, output_size=256 - CV 0.872, LB 0.761</li>\n<li>B0 NS input_size=original, output_size=256 - CV 0.869, LB 0.758</li>\n<li>B0 input_size=512 (no resizing network) - CV 0.882, LB 0.766</li>\n<li>B2 NS input_size=512 (no resizing network) - CV 0.888, LB 0.771</li>\n</ul>\n<p>I used <code>timm</code> to train with different EfficientNet pre-trained weights for additional diversity. </p>\n<p>My final CV with this simple averaging was 0.8971 with a public score of 0.7764 and a private score of 0.7744, just barely giving me a bronze medal. </p>\n<p>All models were trained on a Z by HP Z8 Workstation with a Quadro RTX 8000 </p>",
  "messages": [
    {
      "id": 1481521,
      "postDate": "2021-08-19T14:58:51.430Z",
      "content": "<p>Firstly, congratulations to the winners and everyone else that medaled. Thank you Kaggle and SETI for organizing this competition, it has been fun indeed. </p>\n<p>I was very invested in this competition early on, but after the reset, I could not find the time to continue experimenting. I managed to squeeze out a bronze medal, which I am content with, all things considered. Here is what I did:</p>\n<h3>Learned Image Resizing</h3>\n<p>I released a <a href=\"https://www.kaggle.com/tuckerarrants/seti-learned-image-resizing\" target=\"_blank\">kernel </a> early on in this competition. After rerunning this notebook with the new data, I noticed that my CV-LB gap was much lower than others had reported. I do not really know why, but I used this notebook to generate 2/4 model predictions for my final submission. I am excited to test this 'learned image resizing' in future competitions as I think it can be fairly powerful for certain image datasets. </p>\n<h3>Augmentations</h3>\n<p>TTA gave me significant CV improvements. I settled for 15 TTA steps and used the same augmentations during inference that I used during training. To be precise: <code>HFlip</code>, <code>VFlip</code>, <code>ShiftScaleRotate(rotate_limit=0, shift_limit=0)</code>, <code>MotionBlur</code>, and <code>IAASharpen</code>. I also used MixUp during training. I only trained with <code>ON</code> cadence snippets to reduce training time and stacked them spatially. I tried randomly swapping the snippets before stacking them as an augmentation technique and saw marginal improvements, but did not run enough experiments to confirm this. </p>\n<h3>Simple Ensembling</h3>\n<p>I used 5 folds for each model stratified by the target variable. For each model, I averaged the predictions of <code>best_loss</code> and <code>best_score</code> checkpoints. For diversity, I trained different EfficientNets with different image sizes. My final submission was the harmonic mean of 4 models.</p>\n<ul>\n<li>B0 input_size=512, output_size=256 - CV 0.872, LB 0.761</li>\n<li>B0 NS input_size=original, output_size=256 - CV 0.869, LB 0.758</li>\n<li>B0 input_size=512 (no resizing network) - CV 0.882, LB 0.766</li>\n<li>B2 NS input_size=512 (no resizing network) - CV 0.888, LB 0.771</li>\n</ul>\n<p>I used <code>timm</code> to train with different EfficientNet pre-trained weights for additional diversity. </p>\n<p>My final CV with this simple averaging was 0.8971 with a public score of 0.7764 and a private score of 0.7744, just barely giving me a bronze medal. </p>\n<p>All models were trained on a Z by HP Z8 Workstation with a Quadro RTX 8000 </p>",
      "rawMarkdown": "Firstly, congratulations to the winners and everyone else that medaled. Thank you Kaggle and SETI for organizing this competition, it has been fun indeed. \n\nI was very invested in this competition early on, but after the reset, I could not find the time to continue experimenting. I managed to squeeze out a bronze medal, which I am content with, all things considered. Here is what I did:\n\n### Learned Image Resizing\nI released a [kernel ](https://www.kaggle.com/tuckerarrants/seti-learned-image-resizing) early on in this competition. After rerunning this notebook with the new data, I noticed that my CV-LB gap was much lower than others had reported. I do not really know why, but I used this notebook to generate 2/4 model predictions for my final submission. I am excited to test this 'learned image resizing' in future competitions as I think it can be fairly powerful for certain image datasets. \n\n### Augmentations\nTTA gave me significant CV improvements. I settled for 15 TTA steps and used the same augmentations during inference that I used during training. To be precise: `HFlip`, `VFlip`, `ShiftScaleRotate(rotate_limit=0, shift_limit=0)`, `MotionBlur`, and `IAASharpen`. I also used MixUp during training. I only trained with `ON` cadence snippets to reduce training time and stacked them spatially. I tried randomly swapping the snippets before stacking them as an augmentation technique and saw marginal improvements, but did not run enough experiments to confirm this. \n\n### Simple Ensembling\nI used 5 folds for each model stratified by the target variable. For each model, I averaged the predictions of `best_loss` and `best_score` checkpoints. For diversity, I trained different EfficientNets with different image sizes. My final submission was the harmonic mean of 4 models.\n\n* B0 input_size=512, output_size=256 - CV 0.872, LB 0.761\n* B0 NS input_size=original, output_size=256 - CV 0.869, LB 0.758\n* B0 input_size=512 (no resizing network) - CV 0.882, LB 0.766\n* B2 NS input_size=512 (no resizing network) - CV 0.888, LB 0.771\n\nI used `timm` to train with different EfficientNet pre-trained weights for additional diversity. \n\nMy final CV with this simple averaging was 0.8971 with a public score of 0.7764 and a private score of 0.7744, just barely giving me a bronze medal. \n\nAll models were trained on a Z by HP Z8 Workstation with a Quadro RTX 8000 ",
      "votes": 13
    },
    {
      "id": 1481547,
      "postDate": "2021-08-19T15:17:56.403Z",
      "content": "<p>Congratulations. Great job achieving bronze. This was a difficult competition. Thanks for sharing your notebook.</p>\n<p>In addition to using it for my solution, I also gained insight by displaying images before and after your model's resize module. After training a model, you can display images before and after they go through your resize module. Here is an example.</p>\n<p>We see that the resize module applies filter in addition to resize. The image going is in 640x640 and the image coming out is 320x320. Additionally it appears that the module applied emboss and histogram equalization to make the needles more visible.</p>\n<p>I believe it is the process of applying this filter which makes the train and test data more similar and closes the CV LB gap. (Because i tried just your models data augmentation on my model's gap and that did not close the gap).</p>\n<p><img src=\"https://raw.githubusercontent.com/cdeotte/Kaggle_Images/main/Aug-2021/ex12.png\" alt=\"\"></p>",
      "rawMarkdown": "Congratulations. Great job achieving bronze. This was a difficult competition. Thanks for sharing your notebook.\n\nIn addition to using it for my solution, I also gained insight by displaying images before and after your model's resize module. After training a model, you can display images before and after they go through your resize module. Here is an example.\n\nWe see that the resize module applies filter in addition to resize. The image going is in 640x640 and the image coming out is 320x320. Additionally it appears that the module applied emboss and histogram equalization to make the needles more visible.\n\nI believe it is the process of applying this filter which makes the train and test data more similar and closes the CV LB gap. (Because i tried just your models data augmentation on my model's gap and that did not close the gap).\n\n![](https://raw.githubusercontent.com/cdeotte/Kaggle_Images/main/Aug-2021/ex12.png)",
      "votes": 9,
      "replies": [
        {
          "id": 1481594,
          "postDate": "2021-08-19T15:38:38.220Z",
          "content": "<p>Thank you Chris. Wow, these images / graphs are very interesting. I assumed the resizer network was learning and applying some sort of task-specific filtering, but did not realize how drastic these effects were. How fascinating! I think there is much to be explored with this notion of 'learned image resizing', especially for medical images, where we often have high resolution images and small 'signals'. </p>",
          "rawMarkdown": "Thank you Chris. Wow, these images / graphs are very interesting. I assumed the resizer network was learning and applying some sort of task-specific filtering, but did not realize how drastic these effects were. How fascinating! I think there is much to be explored with this notion of 'learned image resizing', especially for medical images, where we often have high resolution images and small 'signals'. ",
          "votes": 3
        }
      ]
    }
  ],
  "comments": [
    {
      "id": 1481547,
      "author_name": "Chris Deotte",
      "author_url": "",
      "post_date": "2021-08-19T15:17:56.403000",
      "content": "<p>Congratulations. Great job achieving bronze. This was a difficult competition. Thanks for sharing your notebook.</p>\n<p>In addition to using it for my solution, I also gained insight by displaying images before and after your model's resize module. After training a model, you can display images before and after they go through your resize module. Here is an example.</p>\n<p>We see that the resize module applies filter in addition to resize. The image going is in 640x640 and the image coming out is 320x320. Additionally it appears that the module applied emboss and histogram equalization to make the needles more visible.</p>\n<p>I believe it is the process of applying this filter which makes the train and test data more similar and closes the CV LB gap. (Because i tried just your models data augmentation on my model's gap and that did not close the gap).</p>\n<p><img src=\"https://raw.githubusercontent.com/cdeotte/Kaggle_Images/main/Aug-2021/ex12.png\" alt=\"\"></p>",
      "votes": 9,
      "replies": [
        {
          "id": 1481594,
          "author_name": "Tucker Arrants",
          "author_url": "",
          "post_date": "2021-08-19T15:38:38.220000",
          "content": "<p>Thank you Chris. Wow, these images / graphs are very interesting. I assumed the resizer network was learning and applying some sort of task-specific filtering, but did not realize how drastic these effects were. How fascinating! I think there is much to be explored with this notion of 'learned image resizing', especially for medical images, where we often have high resolution images and small 'signals'. </p>",
          "votes": 3,
          "replies": []
        }
      ]
    }
  ],
  "raw_markdown_by_id": {
    "1481521": "Firstly, congratulations to the winners and everyone else that medaled. Thank you Kaggle and SETI for organizing this competition, it has been fun indeed. \n\nI was very invested in this competition early on, but after the reset, I could not find the time to continue experimenting. I managed to squeeze out a bronze medal, which I am content with, all things considered. Here is what I did:\n\n### Learned Image Resizing\nI released a [kernel ](https://www.kaggle.com/tuckerarrants/seti-learned-image-resizing) early on in this competition. After rerunning this notebook with the new data, I noticed that my CV-LB gap was much lower than others had reported. I do not really know why, but I used this notebook to generate 2/4 model predictions for my final submission. I am excited to test this 'learned image resizing' in future competitions as I think it can be fairly powerful for certain image datasets. \n\n### Augmentations\nTTA gave me significant CV improvements. I settled for 15 TTA steps and used the same augmentations during inference that I used during training. To be precise: `HFlip`, `VFlip`, `ShiftScaleRotate(rotate_limit=0, shift_limit=0)`, `MotionBlur`, and `IAASharpen`. I also used MixUp during training. I only trained with `ON` cadence snippets to reduce training time and stacked them spatially. I tried randomly swapping the snippets before stacking them as an augmentation technique and saw marginal improvements, but did not run enough experiments to confirm this. \n\n### Simple Ensembling\nI used 5 folds for each model stratified by the target variable. For each model, I averaged the predictions of `best_loss` and `best_score` checkpoints. For diversity, I trained different EfficientNets with different image sizes. My final submission was the harmonic mean of 4 models.\n\n* B0 input_size=512, output_size=256 - CV 0.872, LB 0.761\n* B0 NS input_size=original, output_size=256 - CV 0.869, LB 0.758\n* B0 input_size=512 (no resizing network) - CV 0.882, LB 0.766\n* B2 NS input_size=512 (no resizing network) - CV 0.888, LB 0.771\n\nI used `timm` to train with different EfficientNet pre-trained weights for additional diversity. \n\nMy final CV with this simple averaging was 0.8971 with a public score of 0.7764 and a private score of 0.7744, just barely giving me a bronze medal. \n\nAll models were trained on a Z by HP Z8 Workstation with a Quadro RTX 8000 ",
    "1481547": "Congratulations. Great job achieving bronze. This was a difficult competition. Thanks for sharing your notebook.\n\nIn addition to using it for my solution, I also gained insight by displaying images before and after your model's resize module. After training a model, you can display images before and after they go through your resize module. Here is an example.\n\nWe see that the resize module applies filter in addition to resize. The image going is in 640x640 and the image coming out is 320x320. Additionally it appears that the module applied emboss and histogram equalization to make the needles more visible.\n\nI believe it is the process of applying this filter which makes the train and test data more similar and closes the CV LB gap. (Because i tried just your models data augmentation on my model's gap and that did not close the gap).\n\n![](https://raw.githubusercontent.com/cdeotte/Kaggle_Images/main/Aug-2021/ex12.png)"
  }
}