{
  "id": 428644,
  "title": "Private 47th solution",
  "url": "/competitions/hubmap-hacking-the-human-vasculature/discussion/428644",
  "author_name": "TanjiroLL",
  "post_date": "2023-08-02T07:31:45.232000",
  "votes": 7,
  "comment_count": 2,
  "views": 0,
  "content": "<p>Our solution is an ensemble of yolov8m-seg models with different inputs: 512, 640, 1024. We pretrained our models using \"unknown\" and \"glomerulus\" as blood vessels since they have similar structures with the target. Then, we retrained our models with the correct blood vessels without any \"unknown\" or \"glomerulus\" labels.</p>\n<p>For test time augmentations (TTAs), we used rotation (90), horizontal flip, vertical flip, and diagonal flip. Additionally, we lowered the pixel threshold to 0.45, allowing the model to decide where and how to dilate. However, it didn't perform as well alone as dilation on the public leaderboard, so we kept dilation.</p>\n<p>To ensemble masks, we used the code from <a href=\"https://www.kaggle.com/code/mistag/sartorius-tta-with-weighted-segments-fusion\" target=\"_blank\">https://www.kaggle.com/code/mistag/sartorius-tta-with-weighted-segments-fusion</a>.</p>\n<p>We also utilized DBSCAN to crop images where major predictions are located. This technique was used in the <a href=\"https://www.kaggle.com/competitions/image-matching-challenge-2022/discussion/329131\" target=\"_blank\">image_matching comp 2022</a>. The aim here is to fine-tune the predicted masks with their confidence( random cropping should also work).</p>\n<p>Additionally, we performed fine-tuning of the predicted masks using SAM.</p>\n<p>What did not work:</p>\n<ul>\n<li>TTAs of scaling didn't work at all.</li>\n<li>Normalization using staintools didn't work in the public leaderboard (resulted in a drop of about 0.008), while it worked in the private leaderboard (resulted in a gain of +0.01).<br>\nOur best private score was 0.561, an ensemble of yolox(512) + yolom(1024) with a pixel threshold of 0.45, no_dilation.</li>\n</ul>\n<p><img src=\"https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F13672841%2F5ef92801ea5f6dc3f411a37cb1b365b1%2Fresult.png?generation=1690961885406247&amp;alt=media\" alt=\"\"></p>",
  "messages": [
    {
      "id": 2370095,
      "postDate": "2023-08-02T07:31:45.233Z",
      "content": "<p>Our solution is an ensemble of yolov8m-seg models with different inputs: 512, 640, 1024. We pretrained our models using \"unknown\" and \"glomerulus\" as blood vessels since they have similar structures with the target. Then, we retrained our models with the correct blood vessels without any \"unknown\" or \"glomerulus\" labels.</p>\n<p>For test time augmentations (TTAs), we used rotation (90), horizontal flip, vertical flip, and diagonal flip. Additionally, we lowered the pixel threshold to 0.45, allowing the model to decide where and how to dilate. However, it didn't perform as well alone as dilation on the public leaderboard, so we kept dilation.</p>\n<p>To ensemble masks, we used the code from <a href=\"https://www.kaggle.com/code/mistag/sartorius-tta-with-weighted-segments-fusion\" target=\"_blank\">https://www.kaggle.com/code/mistag/sartorius-tta-with-weighted-segments-fusion</a>.</p>\n<p>We also utilized DBSCAN to crop images where major predictions are located. This technique was used in the <a href=\"https://www.kaggle.com/competitions/image-matching-challenge-2022/discussion/329131\" target=\"_blank\">image_matching comp 2022</a>. The aim here is to fine-tune the predicted masks with their confidence( random cropping should also work).</p>\n<p>Additionally, we performed fine-tuning of the predicted masks using SAM.</p>\n<p>What did not work:</p>\n<ul>\n<li>TTAs of scaling didn't work at all.</li>\n<li>Normalization using staintools didn't work in the public leaderboard (resulted in a drop of about 0.008), while it worked in the private leaderboard (resulted in a gain of +0.01).<br>\nOur best private score was 0.561, an ensemble of yolox(512) + yolom(1024) with a pixel threshold of 0.45, no_dilation.</li>\n</ul>\n<p><img src=\"https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F13672841%2F5ef92801ea5f6dc3f411a37cb1b365b1%2Fresult.png?generation=1690961885406247&amp;alt=media\" alt=\"\"></p>",
      "rawMarkdown": "Our solution is an ensemble of yolov8m-seg models with different inputs: 512, 640, 1024. We pretrained our models using \"unknown\" and \"glomerulus\" as blood vessels since they have similar structures with the target. Then, we retrained our models with the correct blood vessels without any \"unknown\" or \"glomerulus\" labels.\n\nFor test time augmentations (TTAs), we used rotation (90), horizontal flip, vertical flip, and diagonal flip. Additionally, we lowered the pixel threshold to 0.45, allowing the model to decide where and how to dilate. However, it didn't perform as well alone as dilation on the public leaderboard, so we kept dilation.\n\nTo ensemble masks, we used the code from https://www.kaggle.com/code/mistag/sartorius-tta-with-weighted-segments-fusion.\n\nWe also utilized DBSCAN to crop images where major predictions are located. This technique was used in the [image_matching comp 2022](https://www.kaggle.com/competitions/image-matching-challenge-2022/discussion/329131). The aim here is to fine-tune the predicted masks with their confidence( random cropping should also work).\n\nAdditionally, we performed fine-tuning of the predicted masks using SAM.\n\nWhat did not work:\n- TTAs of scaling didn't work at all.\n- Normalization using staintools didn't work in the public leaderboard (resulted in a drop of about 0.008), while it worked in the private leaderboard (resulted in a gain of +0.01).\nOur best private score was 0.561, an ensemble of yolox(512) + yolom(1024) with a pixel threshold of 0.45, no_dilation.\n\n![](https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F13672841%2F5ef92801ea5f6dc3f411a37cb1b365b1%2Fresult.png?generation=1690961885406247&alt=media)",
      "votes": 6
    },
    {
      "id": 2372841,
      "postDate": "2023-08-04T02:11:21.623Z",
      "content": "<p>Your best private can win the gold！</p>",
      "rawMarkdown": "Your best private can win the gold！",
      "votes": 1,
      "isDeleted": true,
      "replies": [
        {
          "id": 2373684,
          "postDate": "2023-08-04T11:48:29.603Z",
          "content": "<p>Yes, unfortunately, we didn't select it. To be honest, there was no clue that we should select it.</p>",
          "rawMarkdown": "Yes, unfortunately, we didn't select it. To be honest, there was no clue that we should select it."
        }
      ]
    }
  ],
  "comments": [
    {
      "id": 2372841,
      "author_name": "",
      "author_url": "",
      "post_date": "2023-08-04T02:11:21.623000",
      "content": "<p>Your best private can win the gold！</p>",
      "votes": 1,
      "replies": [
        {
          "id": 2373684,
          "author_name": "TanjiroLL",
          "author_url": "",
          "post_date": "2023-08-04T11:48:29.603000",
          "content": "<p>Yes, unfortunately, we didn't select it. To be honest, there was no clue that we should select it.</p>",
          "votes": 0,
          "replies": []
        }
      ]
    }
  ],
  "raw_markdown_by_id": {
    "2370095": "Our solution is an ensemble of yolov8m-seg models with different inputs: 512, 640, 1024. We pretrained our models using \"unknown\" and \"glomerulus\" as blood vessels since they have similar structures with the target. Then, we retrained our models with the correct blood vessels without any \"unknown\" or \"glomerulus\" labels.\n\nFor test time augmentations (TTAs), we used rotation (90), horizontal flip, vertical flip, and diagonal flip. Additionally, we lowered the pixel threshold to 0.45, allowing the model to decide where and how to dilate. However, it didn't perform as well alone as dilation on the public leaderboard, so we kept dilation.\n\nTo ensemble masks, we used the code from https://www.kaggle.com/code/mistag/sartorius-tta-with-weighted-segments-fusion.\n\nWe also utilized DBSCAN to crop images where major predictions are located. This technique was used in the [image_matching comp 2022](https://www.kaggle.com/competitions/image-matching-challenge-2022/discussion/329131). The aim here is to fine-tune the predicted masks with their confidence( random cropping should also work).\n\nAdditionally, we performed fine-tuning of the predicted masks using SAM.\n\nWhat did not work:\n- TTAs of scaling didn't work at all.\n- Normalization using staintools didn't work in the public leaderboard (resulted in a drop of about 0.008), while it worked in the private leaderboard (resulted in a gain of +0.01).\nOur best private score was 0.561, an ensemble of yolox(512) + yolom(1024) with a pixel threshold of 0.45, no_dilation.\n\n![](https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F13672841%2F5ef92801ea5f6dc3f411a37cb1b365b1%2Fresult.png?generation=1690961885406247&alt=media)",
    "2372841": "Your best private can win the gold！"
  }
}