{
  "id": 679345,
  "title": "TransUNet-epochs[1400] PB[0.586]",
  "url": "/competitions/vesuvius-challenge-surface-detection/writeups/transunet-epochs1400-pb0-586",
  "author_name": "",
  "post_date": "2026-02-28T19:12:10.410Z",
  "votes": 2,
  "comment_count": 7,
  "views": 0,
  "content": "<p>First of all,</p>\n<p>Thanks to the organizers for this fun and important competition, and congratulations to all the winners.<br>\nThis competition taught me a lot about 3D segmentation, long-term training stability, checkpoint management, and how Public and Private leaderboards can diverge during extended training.</p>\n<hr>\n<h2>Acknowledgment</h2>\n<p>Special thanks to <strong>@Innat</strong> for sharing the TFRecord dataset and the baseline training code.<br>\nThat baseline helped me start quickly and focus on improving training stability and long-run optimization.</p>\n<hr>\n<h2>Overview of My Approach</h2>\n<p>I trained a 3D TransUNet model for volumetric segmentation and continuously resumed training from saved checkpoints. Instead of restarting training multiple times, I extended the same model progressively up to 1325 epochs.</p>\n<p>The main idea was:</p>\n<ul>\n<li>Train for a long duration  </li>\n<li>Save checkpoints regularly  </li>\n<li>Resume training from the last best state  </li>\n<li>Monitor LB and PB trends  </li>\n</ul>\n<hr>\n<h2>Model Architecture</h2>\n<p>I used TransUNet with a SEResNeXt50 encoder.</p>\n<pre><code>    TransUNet(\n        input_shape=(256,256,256,1),\n        encoder_name=\"seresnext50\",\n        classifier_activation=None,\n        num_classes=3,\n        dropout=0.1,\n    )\n</code></pre>\n<h3>Configuration Highlights</h3>\n<ul>\n<li>Input size: (256, 256, 256)  </li>\n<li>Batch size: 2  </li>\n<li>Number of classes: 3  </li>\n<li>Dropout: 0.1  </li>\n<li>Weight decay: 1e-5  </li>\n<li>Optimizer: AdamW  </li>\n<li>Learning rate schedule: Warmup + Cosine decay  </li>\n<li>Loss:<ul>\n<li>Cross Entropy  </li>\n<li>clDice (for topology preservation)  </li></ul></li>\n<li>Ignored class: 2  </li>\n<li>Target class for clDice: 1  </li>\n</ul>\n<hr>\n<h2>Training Strategy – Long Continuous Resume</h2>\n<p>I trained in multiple phases and resumed from saved checkpoints:</p>\n<table>\n<thead>\n<tr>\n<th>Epoch Range</th>\n<th>LB Score</th>\n<th>PB Score</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>0 → 237</td>\n<td>0.546</td>\n<td>0.560</td>\n</tr>\n<tr>\n<td>237 → 431</td>\n<td>0.553</td>\n<td>0.578</td>\n</tr>\n<tr>\n<td>431 → 703</td>\n<td>0.549</td>\n<td>0.582</td>\n</tr>\n<tr>\n<td>703 → 940</td>\n<td>0.569</td>\n<td>0.571</td>\n</tr>\n<tr>\n<td>940 → 1325</td>\n<td>0.536</td>\n<td>0.586</td>\n</tr>\n</tbody>\n</table>\n<h2><img src=\"https://www.googleapis.com/download/storage/v1/b/kaggle-user-content/o/inbox%2F9366732%2Fb67d38a569aa0527859d6b9e15abf511%2Fddd.png?generation=1772305736041024&amp;alt=media\" alt=\"imge\"></h2>\n<h2>Code</h2>\n<p><a href=\"https://www.kaggle.com/code/engadamalmohammedi/vcsd3d25-train\" target=\"_blank\">Training code</a>:<br>\n<a href=\"https://www.kaggle.com/code/engadamalmohammedi/vcsd3d25-train\" target=\"_blank\">https://www.kaggle.com/code/engadamalmohammedi/vcsd3d25-train</a>  </p>\n<h2><a href=\"https://www.kaggle.com/code/engadamalmohammedi/vs3dd-mixf16mgpu\" target=\"_blank\">Inference code</a>:  </h2>\n<p>Thank you again to the organizers and the community for this great experience.</p>",
  "messages": [
    {
      "id": "3415366",
      "postDate": "02/28/2026 19:10:23",
      "content": "<p>First of all,</p>\n<p>Thanks to the organizers for this fun and important competition, and congratulations to all the winners.<br>\nThis competition taught me a lot about 3D segmentation, long-term training stability, checkpoint management, and how Public and Private leaderboards can diverge during extended training.</p>\n<hr>\n<h2>Acknowledgment</h2>\n<p>Special thanks to <strong>@Innat</strong> for sharing the TFRecord dataset and the baseline training code.<br>\nThat baseline helped me start quickly and focus on improving training stability and long-run optimization.</p>\n<hr>\n<h2>Overview of My Approach</h2>\n<p>I trained a 3D TransUNet model for volumetric segmentation and continuously resumed training from saved checkpoints. Instead of restarting training multiple times, I extended the same model progressively up to 1325 epochs.</p>\n<p>The main idea was:</p>\n<ul>\n<li>Train for a long duration  </li>\n<li>Save checkpoints regularly  </li>\n<li>Resume training from the last best state  </li>\n<li>Monitor LB and PB trends  </li>\n</ul>\n<hr>\n<h2>Model Architecture</h2>\n<p>I used TransUNet with a SEResNeXt50 encoder.</p>\n<pre><code>    TransUNet(\n        input_shape=(256,256,256,1),\n        encoder_name=\"seresnext50\",\n        classifier_activation=None,\n        num_classes=3,\n        dropout=0.1,\n    )\n</code></pre>\n<h3>Configuration Highlights</h3>\n<ul>\n<li>Input size: (256, 256, 256)  </li>\n<li>Batch size: 2  </li>\n<li>Number of classes: 3  </li>\n<li>Dropout: 0.1  </li>\n<li>Weight decay: 1e-5  </li>\n<li>Optimizer: AdamW  </li>\n<li>Learning rate schedule: Warmup + Cosine decay  </li>\n<li>Loss:<ul>\n<li>Cross Entropy  </li>\n<li>clDice (for topology preservation)  </li></ul></li>\n<li>Ignored class: 2  </li>\n<li>Target class for clDice: 1  </li>\n</ul>\n<hr>\n<h2>Training Strategy – Long Continuous Resume</h2>\n<p>I trained in multiple phases and resumed from saved checkpoints:</p>\n<table>\n<thead>\n<tr>\n<th>Epoch Range</th>\n<th>LB Score</th>\n<th>PB Score</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>0 → 237</td>\n<td>0.546</td>\n<td>0.560</td>\n</tr>\n<tr>\n<td>237 → 431</td>\n<td>0.553</td>\n<td>0.578</td>\n</tr>\n<tr>\n<td>431 → 703</td>\n<td>0.549</td>\n<td>0.582</td>\n</tr>\n<tr>\n<td>703 → 940</td>\n<td>0.569</td>\n<td>0.571</td>\n</tr>\n<tr>\n<td>940 → 1325</td>\n<td>0.536</td>\n<td>0.586</td>\n</tr>\n</tbody>\n</table>\n<h2><img src=\"https://www.googleapis.com/download/storage/v1/b/kaggle-user-content/o/inbox%2F9366732%2Fb67d38a569aa0527859d6b9e15abf511%2Fddd.png?generation=1772305736041024&amp;alt=media\" alt=\"imge\"></h2>\n<h2>Code</h2>\n<p><a href=\"https://www.kaggle.com/code/engadamalmohammedi/vcsd3d25-train\" target=\"_blank\">Training code</a>:<br>\n<a href=\"https://www.kaggle.com/code/engadamalmohammedi/vcsd3d25-train\" target=\"_blank\">https://www.kaggle.com/code/engadamalmohammedi/vcsd3d25-train</a>  </p>\n<h2><a href=\"https://www.kaggle.com/code/engadamalmohammedi/vs3dd-mixf16mgpu\" target=\"_blank\">Inference code</a>:  </h2>\n<p>Thank you again to the organizers and the community for this great experience.</p>",
      "rawMarkdown": "First of all,\n\nThanks to the organizers for this fun and important competition, and congratulations to all the winners.  \nThis competition taught me a lot about 3D segmentation, long-term training stability, checkpoint management, and how Public and Private leaderboards can diverge during extended training.\n\n---\n\n## Acknowledgment\n\nSpecial thanks to **@Innat** for sharing the TFRecord dataset and the baseline training code.  \nThat baseline helped me start quickly and focus on improving training stability and long-run optimization.\n\n---\n\n## Overview of My Approach\n\nI trained a 3D TransUNet model for volumetric segmentation and continuously resumed training from saved checkpoints. Instead of restarting training multiple times, I extended the same model progressively up to 1325 epochs.\n\nThe main idea was:\n\n- Train for a long duration  \n- Save checkpoints regularly  \n- Resume training from the last best state  \n- Monitor LB and PB trends  \n\n---\n\n## Model Architecture\n\nI used TransUNet with a SEResNeXt50 encoder.\n```python\n    TransUNet(\n        input_shape=(256,256,256,1),\n        encoder_name=\"seresnext50\",\n        classifier_activation=None,\n        num_classes=3,\n        dropout=0.1,\n    )\n```\n\n### Configuration Highlights\n\n- Input size: (256, 256, 256)  \n- Batch size: 2  \n- Number of classes: 3  \n- Dropout: 0.1  \n- Weight decay: 1e-5  \n- Optimizer: AdamW  \n- Learning rate schedule: Warmup + Cosine decay  \n- Loss:\n  - Cross Entropy  \n  - clDice (for topology preservation)  \n- Ignored class: 2  \n- Target class for clDice: 1  \n\n---\n\n## Training Strategy – Long Continuous Resume\n\nI trained in multiple phases and resumed from saved checkpoints:\n\n| Epoch Range | LB Score | PB Score |\n|-------------|----------|----------|\n| 0 → 237     | 0.546    | 0.560    |\n| 237 → 431   | 0.553    | 0.578    |\n| 431 → 703   | 0.549    | 0.582    |\n| 703 → 940   | 0.569    | 0.571    |\n| 940 → 1325  | 0.536    | 0.586    |\n\n![imge](https://www.googleapis.com/download/storage/v1/b/kaggle-user-content/o/inbox%2F9366732%2Fb67d38a569aa0527859d6b9e15abf511%2Fddd.png?generation=1772305736041024&alt=media)\n---\n\n## Code\n\n[Training code](https://www.kaggle.com/code/engadamalmohammedi/vcsd3d25-train):  \nhttps://www.kaggle.com/code/engadamalmohammedi/vcsd3d25-train  \n\n[Inference code](https://www.kaggle.com/code/engadamalmohammedi/vs3dd-mixf16mgpu):  \n---\nThank you again to the organizers and the community for this great experience.",
      "votes": null
    },
    {
      "id": "3415411",
      "postDate": "02/28/2026 21:48:25",
      "content": "<p>thanks for the writeup/code and good work!</p>\n<pre><code>the drop in lb seems suspicious ....\n940 → 1325    0.536 (lb)\n</code></pre>",
      "rawMarkdown": "thanks for the writeup/code and good work!\n\n```\nthe drop in lb seems suspicious ....\n940 → 1325\t0.536 (lb)\n\n```",
      "votes": null
    },
    {
      "id": "3415422",
      "postDate": "02/28/2026 22:01:52",
      "content": "<p>Congrats. I am confused, you say \"PB 0.586\", what does this refer to? Your private LB is 0.572 and your public LB is 0.569. </p>",
      "rawMarkdown": "Congrats. I am confused, you say \"PB 0.586\", what does this refer to? Your private LB is 0.572 and your public LB is 0.569.",
      "votes": null
    },
    {
      "id": "3415434",
      "postDate": "02/28/2026 23:04:01",
      "content": "<p>yes i was not select that private LB 0.586 as shown in the image.\ni was select other with public LB is 0.569 and  private LB is 0.572 😟 </p>",
      "rawMarkdown": "yes i was not select that private LB 0.586 as shown in the image.\ni was select other with public LB is 0.569 and  private LB is 0.572 😟",
      "votes": null
    },
    {
      "id": "3415435",
      "postDate": "02/28/2026 23:10:05",
      "content": "<p>Ah, sorry for your drop on private LB. Did you compute local CV on all your models? Did your \"PB 0.586\" achieve a good local CV score?</p>",
      "rawMarkdown": "Ah, sorry for your drop on private LB. Did you compute local CV on all your models? Did your \"PB 0.586\" achieve a good local CV score?",
      "votes": null
    },
    {
      "id": "3415436",
      "postDate": "02/28/2026 23:11:10",
      "content": "<p>That's drop prevent me from choice that submission.</p>\n<p>i think if i would continue training the private LB will increased.</p>",
      "rawMarkdown": "That's drop prevent me from choice that submission.\n\ni think if i would continue training the private LB will increased.",
      "votes": null
    },
    {
      "id": "3415438",
      "postDate": "02/28/2026 23:20:33",
      "content": "<p>Because only 6 samples used for validate, i can't decide which the best.\nall that models between 0.51-0.526 score.</p>",
      "rawMarkdown": "Because only 6 samples used for validate, i can't decide which the best.\nall that models between 0.51-0.526 score.",
      "votes": null
    },
    {
      "id": "3415443",
      "postDate": "02/28/2026 23:26:43",
      "content": "<p>Yes I agree. I trained many model using only 6 volumes to validate Dice metric. Then I retrained my best models with 75% train data and validated with 25% data on the official metric to determine which models are best. I observed that there was a big difference. So it was hard to select final models if only using validation on 6 volumes.</p>",
      "rawMarkdown": "Yes I agree. I trained many model using only 6 volumes to validate Dice metric. Then I retrained my best models with 75% train data and validated with 25% data on the official metric to determine which models are best. I observed that there was a big difference. So it was hard to select final models if only using validation on 6 volumes.",
      "votes": null
    }
  ],
  "comments": [
    {
      "id": 3415411,
      "author_name": "hengck23",
      "author_url": "",
      "post_date": "02/28/2026 21:48:25",
      "content": "<p>thanks for the writeup/code and good work!</p>\n<pre><code>the drop in lb seems suspicious ....\n940 → 1325    0.536 (lb)\n</code></pre>",
      "votes": null,
      "replies": [
        {
          "id": 3415436,
          "author_name": "engadamalmohammedi",
          "author_url": "",
          "post_date": "02/28/2026 23:11:10",
          "content": "<p>That's drop prevent me from choice that submission.</p>\n<p>i think if i would continue training the private LB will increased.</p>",
          "votes": null,
          "replies": []
        }
      ]
    },
    {
      "id": 3415422,
      "author_name": "cdeotte",
      "author_url": "",
      "post_date": "02/28/2026 22:01:52",
      "content": "<p>Congrats. I am confused, you say \"PB 0.586\", what does this refer to? Your private LB is 0.572 and your public LB is 0.569. </p>",
      "votes": null,
      "replies": [
        {
          "id": 3415434,
          "author_name": "engadamalmohammedi",
          "author_url": "",
          "post_date": "02/28/2026 23:04:01",
          "content": "<p>yes i was not select that private LB 0.586 as shown in the image.\ni was select other with public LB is 0.569 and  private LB is 0.572 😟 </p>",
          "votes": null,
          "replies": [
            {
              "id": 3415435,
              "author_name": "cdeotte",
              "author_url": "",
              "post_date": "02/28/2026 23:10:05",
              "content": "<p>Ah, sorry for your drop on private LB. Did you compute local CV on all your models? Did your \"PB 0.586\" achieve a good local CV score?</p>",
              "votes": null,
              "replies": [
                {
                  "id": 3415438,
                  "author_name": "engadamalmohammedi",
                  "author_url": "",
                  "post_date": "02/28/2026 23:20:33",
                  "content": "<p>Because only 6 samples used for validate, i can't decide which the best.\nall that models between 0.51-0.526 score.</p>",
                  "votes": null,
                  "replies": [
                    {
                      "id": 3415443,
                      "author_name": "cdeotte",
                      "author_url": "",
                      "post_date": "02/28/2026 23:26:43",
                      "content": "<p>Yes I agree. I trained many model using only 6 volumes to validate Dice metric. Then I retrained my best models with 75% train data and validated with 25% data on the official metric to determine which models are best. I observed that there was a big difference. So it was hard to select final models if only using validation on 6 volumes.</p>",
                      "votes": null,
                      "replies": []
                    }
                  ]
                }
              ]
            }
          ]
        }
      ]
    }
  ],
  "raw_markdown_by_id": {
    "3415366": "First of all,\n\nThanks to the organizers for this fun and important competition, and congratulations to all the winners.  \nThis competition taught me a lot about 3D segmentation, long-term training stability, checkpoint management, and how Public and Private leaderboards can diverge during extended training.\n\n---\n\n## Acknowledgment\n\nSpecial thanks to **@Innat** for sharing the TFRecord dataset and the baseline training code.  \nThat baseline helped me start quickly and focus on improving training stability and long-run optimization.\n\n---\n\n## Overview of My Approach\n\nI trained a 3D TransUNet model for volumetric segmentation and continuously resumed training from saved checkpoints. Instead of restarting training multiple times, I extended the same model progressively up to 1325 epochs.\n\nThe main idea was:\n\n- Train for a long duration  \n- Save checkpoints regularly  \n- Resume training from the last best state  \n- Monitor LB and PB trends  \n\n---\n\n## Model Architecture\n\nI used TransUNet with a SEResNeXt50 encoder.\n```python\n    TransUNet(\n        input_shape=(256,256,256,1),\n        encoder_name=\"seresnext50\",\n        classifier_activation=None,\n        num_classes=3,\n        dropout=0.1,\n    )\n```\n\n### Configuration Highlights\n\n- Input size: (256, 256, 256)  \n- Batch size: 2  \n- Number of classes: 3  \n- Dropout: 0.1  \n- Weight decay: 1e-5  \n- Optimizer: AdamW  \n- Learning rate schedule: Warmup + Cosine decay  \n- Loss:\n  - Cross Entropy  \n  - clDice (for topology preservation)  \n- Ignored class: 2  \n- Target class for clDice: 1  \n\n---\n\n## Training Strategy – Long Continuous Resume\n\nI trained in multiple phases and resumed from saved checkpoints:\n\n| Epoch Range | LB Score | PB Score |\n|-------------|----------|----------|\n| 0 → 237     | 0.546    | 0.560    |\n| 237 → 431   | 0.553    | 0.578    |\n| 431 → 703   | 0.549    | 0.582    |\n| 703 → 940   | 0.569    | 0.571    |\n| 940 → 1325  | 0.536    | 0.586    |\n\n![imge](https://www.googleapis.com/download/storage/v1/b/kaggle-user-content/o/inbox%2F9366732%2Fb67d38a569aa0527859d6b9e15abf511%2Fddd.png?generation=1772305736041024&alt=media)\n---\n\n## Code\n\n[Training code](https://www.kaggle.com/code/engadamalmohammedi/vcsd3d25-train):  \nhttps://www.kaggle.com/code/engadamalmohammedi/vcsd3d25-train  \n\n[Inference code](https://www.kaggle.com/code/engadamalmohammedi/vs3dd-mixf16mgpu):  \n---\nThank you again to the organizers and the community for this great experience.",
    "3415411": "thanks for the writeup/code and good work!\n\n```\nthe drop in lb seems suspicious ....\n940 → 1325\t0.536 (lb)\n\n```",
    "3415422": "Congrats. I am confused, you say \"PB 0.586\", what does this refer to? Your private LB is 0.572 and your public LB is 0.569.",
    "3415434": "yes i was not select that private LB 0.586 as shown in the image.\ni was select other with public LB is 0.569 and  private LB is 0.572 😟",
    "3415435": "Ah, sorry for your drop on private LB. Did you compute local CV on all your models? Did your \"PB 0.586\" achieve a good local CV score?",
    "3415436": "That's drop prevent me from choice that submission.\n\ni think if i would continue training the private LB will increased.",
    "3415438": "Because only 6 samples used for validate, i can't decide which the best.\nall that models between 0.51-0.526 score.",
    "3415443": "Yes I agree. I trained many model using only 6 volumes to validate Dice metric. Then I retrained my best models with 75% train data and validated with 25% data on the official metric to determine which models are best. I observed that there was a big difference. So it was hard to select final models if only using validation on 6 volumes."
  },
  "source": "meta"
}