{
  "id": 417642,
  "title": "5th place solution",
  "url": "/competitions/vesuvius-challenge-ink-detection/writeups/aksell-5th-place-solution",
  "author_name": "",
  "post_date": "2023-06-30T08:30:10.630Z",
  "votes": 17,
  "comment_count": 4,
  "views": 0,
  "content": "<h1><strong>5th place solution</strong></h1>\n<p>I would like to say thank you to organizers for interesting competition. And for users <a href=\"https://www.kaggle.com/tanakar\" target=\"_blank\">@tanakar</a> and <a href=\"https://www.kaggle.com/samfc10\" target=\"_blank\">@samfc10</a> for their great public notebooks which gave me good start in this competition. My solution is not very sophisticated and based on 3D Resnet models, however it gives good result on both public and private LB.</p>\n<p><strong>Models:</strong></p>\n<p>3dResnet with architectures  resnet18 and resnet34</p>\n<p><strong>Data preprocessing:</strong></p>\n<p>empty tiles which are not belong to papirus tissue ignored</p>\n<p>split: 4 folds (1,2a,2b,3)</p>\n<p>tile size:256</p>\n<p>stride:128</p>\n<p>32 slices between 16 and 48 indices</p>\n<p><strong>Training:</strong></p>\n<p>epoches: 50</p>\n<p>fp16</p>\n<p>loss: BCE</p>\n<p>optimizer: AdamW</p>\n<p>scheduler: GradualWarmupScheduler</p>\n<p>hard augmentation: mosaic augmentation + albumentation augmentation</p>\n<p>mosaic augmentation:</p>\n<p><img src=\"https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F1906164%2Ffcc229a2841ba660e0ef8e93518a1c92%2Fmosaic.png?generation=1686922603788993&amp;alt=media\" alt=\"\"></p>\n<p>albumentation augmentation:</p>\n<p><img src=\"https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F1906164%2F2f1ca34594848cb7464023bf1f379d38%2Falbu.png?generation=1686921911927180&amp;alt=media\" alt=\"\"></p>\n<p><strong>Inference:</strong></p>\n<p>final ensemble models: 2 folds(1,2a) 3dResnet18 models + 4 folds 3dResnet34 models</p>\n<p>tile size: 1024</p>\n<p>stride:512</p>\n<p>output predictions close to the tile's edges  are ignored</p>\n<p>threshold: 0.5url</p>\n<p>TTA: 4 rotates, h/v flips</p>\n<p>denoizing</p>\n<p>Result: 0.804 on Public LB and 0.668 on Private LB</p>\n<p><strong><a href=\"https://github.com/aksell1981/inkdet_solution\" target=\"_blank\">Training code</a></strong><br>\n<strong>Inference notebook:</strong> <a href=\"https://www.kaggle.com/code/aksell7/3dresnet18-3dresnet34-infer/notebook\" target=\"_blank\">https://www.kaggle.com/code/aksell7/3dresnet18-3dresnet34-infer/notebook</a></p>",
  "messages": [
    {
      "id": "2305229",
      "postDate": "06/16/2023 14:19:50",
      "content": "<h1><strong>5th place solution</strong></h1>\n<p>I would like to say thank you to organizers for interesting competition. And for users <a href=\"https://www.kaggle.com/tanakar\" target=\"_blank\">@tanakar</a> and <a href=\"https://www.kaggle.com/samfc10\" target=\"_blank\">@samfc10</a> for their great public notebooks which gave me good start in this competition. My solution is not very sophisticated and based on 3D Resnet models, however it gives good result on both public and private LB.</p>\n<p><strong>Models:</strong></p>\n<p>3dResnet with architectures  resnet18 and resnet34</p>\n<p><strong>Data preprocessing:</strong></p>\n<p>empty tiles which are not belong to papirus tissue ignored</p>\n<p>split: 4 folds (1,2a,2b,3)</p>\n<p>tile size:256</p>\n<p>stride:128</p>\n<p>32 slices between 16 and 48 indices</p>\n<p><strong>Training:</strong></p>\n<p>epoches: 50</p>\n<p>fp16</p>\n<p>loss: BCE</p>\n<p>optimizer: AdamW</p>\n<p>scheduler: GradualWarmupScheduler</p>\n<p>hard augmentation: mosaic augmentation + albumentation augmentation</p>\n<p>mosaic augmentation:</p>\n<p><img src=\"https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F1906164%2Ffcc229a2841ba660e0ef8e93518a1c92%2Fmosaic.png?generation=1686922603788993&amp;alt=media\" alt=\"\"></p>\n<p>albumentation augmentation:</p>\n<p><img src=\"https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F1906164%2F2f1ca34594848cb7464023bf1f379d38%2Falbu.png?generation=1686921911927180&amp;alt=media\" alt=\"\"></p>\n<p><strong>Inference:</strong></p>\n<p>final ensemble models: 2 folds(1,2a) 3dResnet18 models + 4 folds 3dResnet34 models</p>\n<p>tile size: 1024</p>\n<p>stride:512</p>\n<p>output predictions close to the tile's edges  are ignored</p>\n<p>threshold: 0.5url</p>\n<p>TTA: 4 rotates, h/v flips</p>\n<p>denoizing</p>\n<p>Result: 0.804 on Public LB and 0.668 on Private LB</p>\n<p><strong><a href=\"https://github.com/aksell1981/inkdet_solution\" target=\"_blank\">Training code</a></strong><br>\n<strong>Inference notebook:</strong> <a href=\"https://www.kaggle.com/code/aksell7/3dresnet18-3dresnet34-infer/notebook\" target=\"_blank\">https://www.kaggle.com/code/aksell7/3dresnet18-3dresnet34-infer/notebook</a></p>",
      "rawMarkdown": "# **5th place solution**\n\nI would like to say thank you to organizers for interesting competition. And for users @tanakar and @samfc10 for their great public notebooks which gave me good start in this competition. My solution is not very sophisticated and based on 3D Resnet models, however it gives good result on both public and private LB.\n\n**Models:**\n\n3dResnet with architectures  resnet18 and resnet34\n\n**Data preprocessing:**\n\nempty tiles which are not belong to papirus tissue ignored\n\nsplit: 4 folds (1,2a,2b,3)\n\ntile size:256\n\nstride:128\n\n32 slices between 16 and 48 indices\n\n**Training:**\n\nepoches: 50\n\nfp16\n\nloss: BCE\n\noptimizer: AdamW\n\nscheduler: GradualWarmupScheduler\n\nhard augmentation: mosaic augmentation + albumentation augmentation\n\n mosaic augmentation:\n\n![](https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F1906164%2Ffcc229a2841ba660e0ef8e93518a1c92%2Fmosaic.png?generation=1686922603788993&alt=media)\n\nalbumentation augmentation:\n\n![](https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F1906164%2F2f1ca34594848cb7464023bf1f379d38%2Falbu.png?generation=1686921911927180&alt=media)\n\n\n\n**Inference:**\n\nfinal ensemble models: 2 folds(1,2a) 3dResnet18 models + 4 folds 3dResnet34 models\n\ntile size: 1024\n\nstride:512\n\noutput predictions close to the tile's edges  are ignored\n\nthreshold: 0.5url\n\nTTA: 4 rotates, h/v flips\n\ndenoizing\n\nResult: 0.804 on Public LB and 0.668 on Private LB\n\n**[Training code](https://github.com/aksell1981/inkdet_solution)**\n**Inference notebook:** https://www.kaggle.com/code/aksell7/3dresnet18-3dresnet34-infer/notebook",
      "votes": null
    },
    {
      "id": "2305896",
      "postDate": "06/17/2023 01:35:54",
      "content": "<p>Congrats on solo gold! I have one question: do you just use the models trained on size 256 to predict on size 1024? I had done the same locally early this month, and it does boost the score quite well, but I didn't try submitting it.</p>",
      "rawMarkdown": "Congrats on solo gold! I have one question: do you just use the models trained on size 256 to predict on size 1024? I had done the same locally early this month, and it does boost the score quite well, but I didn't try submitting it.",
      "votes": null
    },
    {
      "id": "2306023",
      "postDate": "06/17/2023 04:10:48",
      "content": "<p>Thank you!<br>\nCongrats with 3rd place!<br>\nYes, I use models trained on 256 size with inference on size 1024.<br>\nInference on higher resolution always give me boost with these models.</p>",
      "rawMarkdown": "Thank you!\nCongrats with 3rd place!\nYes, I use models trained on 256 size with inference on size 1024.\nInference on higher resolution always give me boost with these models.",
      "votes": null
    },
    {
      "id": "2314170",
      "postDate": "06/23/2023 08:31:08",
      "content": "<p>Congrats! It seems that a larger size has higher performance!I only used 224.</p>",
      "rawMarkdown": "Congrats! It seems that a larger size has higher performance!I only used 224.",
      "votes": null
    },
    {
      "id": "2314261",
      "postDate": "06/23/2023 09:58:44",
      "content": "<p>Thank you!</p>",
      "rawMarkdown": "Thank you!",
      "votes": null
    }
  ],
  "comments": [
    {
      "id": 2305896,
      "author_name": "traptinblur",
      "author_url": "",
      "post_date": "06/17/2023 01:35:54",
      "content": "<p>Congrats on solo gold! I have one question: do you just use the models trained on size 256 to predict on size 1024? I had done the same locally early this month, and it does boost the score quite well, but I didn't try submitting it.</p>",
      "votes": null,
      "replies": [
        {
          "id": 2306023,
          "author_name": "aksell7",
          "author_url": "",
          "post_date": "06/17/2023 04:10:48",
          "content": "<p>Thank you!<br>\nCongrats with 3rd place!<br>\nYes, I use models trained on 256 size with inference on size 1024.<br>\nInference on higher resolution always give me boost with these models.</p>",
          "votes": null,
          "replies": []
        }
      ]
    },
    {
      "id": 2314170,
      "author_name": "kongzhangtang",
      "author_url": "",
      "post_date": "06/23/2023 08:31:08",
      "content": "<p>Congrats! It seems that a larger size has higher performance!I only used 224.</p>",
      "votes": null,
      "replies": [
        {
          "id": 2314261,
          "author_name": "aksell7",
          "author_url": "",
          "post_date": "06/23/2023 09:58:44",
          "content": "<p>Thank you!</p>",
          "votes": null,
          "replies": []
        }
      ]
    }
  ],
  "raw_markdown_by_id": {
    "2305229": "# **5th place solution**\n\nI would like to say thank you to organizers for interesting competition. And for users @tanakar and @samfc10 for their great public notebooks which gave me good start in this competition. My solution is not very sophisticated and based on 3D Resnet models, however it gives good result on both public and private LB.\n\n**Models:**\n\n3dResnet with architectures  resnet18 and resnet34\n\n**Data preprocessing:**\n\nempty tiles which are not belong to papirus tissue ignored\n\nsplit: 4 folds (1,2a,2b,3)\n\ntile size:256\n\nstride:128\n\n32 slices between 16 and 48 indices\n\n**Training:**\n\nepoches: 50\n\nfp16\n\nloss: BCE\n\noptimizer: AdamW\n\nscheduler: GradualWarmupScheduler\n\nhard augmentation: mosaic augmentation + albumentation augmentation\n\n mosaic augmentation:\n\n![](https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F1906164%2Ffcc229a2841ba660e0ef8e93518a1c92%2Fmosaic.png?generation=1686922603788993&alt=media)\n\nalbumentation augmentation:\n\n![](https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F1906164%2F2f1ca34594848cb7464023bf1f379d38%2Falbu.png?generation=1686921911927180&alt=media)\n\n\n\n**Inference:**\n\nfinal ensemble models: 2 folds(1,2a) 3dResnet18 models + 4 folds 3dResnet34 models\n\ntile size: 1024\n\nstride:512\n\noutput predictions close to the tile's edges  are ignored\n\nthreshold: 0.5url\n\nTTA: 4 rotates, h/v flips\n\ndenoizing\n\nResult: 0.804 on Public LB and 0.668 on Private LB\n\n**[Training code](https://github.com/aksell1981/inkdet_solution)**\n**Inference notebook:** https://www.kaggle.com/code/aksell7/3dresnet18-3dresnet34-infer/notebook",
    "2305896": "Congrats on solo gold! I have one question: do you just use the models trained on size 256 to predict on size 1024? I had done the same locally early this month, and it does boost the score quite well, but I didn't try submitting it.",
    "2306023": "Thank you!\nCongrats with 3rd place!\nYes, I use models trained on 256 size with inference on size 1024.\nInference on higher resolution always give me boost with these models.",
    "2314170": "Congrats! It seems that a larger size has higher performance!I only used 224.",
    "2314261": "Thank you!"
  },
  "source": "meta"
}