{
  "id": 561444,
  "title": "22nd Place Solution",
  "url": "/competitions/czii-cryo-et-object-identification/writeups/moyashii-22nd-place-solution",
  "author_name": "",
  "post_date": "2025-02-06T06:38:57.777Z",
  "votes": 18,
  "comment_count": 1,
  "views": 0,
  "content": "<p><strong>22nd Place Solution</strong></p>\n<h2>Pipeline</h2>\n<ol>\n<li>2D-3D Semantic Segmentation</li>\n<li>Estimation of particle centroid coordinates using cc3d  </li>\n<li>Consolidation of particle coordinates from multiple models with WBF-based post-processing  </li>\n<li>2D false-positive suppression using Minislab (apo-ferritin, ribosome)  </li>\n</ol>\n<h2>Model</h2>\n<p>I used a slightly customized version of <a href=\"https://www.kaggle.com/hengck23\" target=\"_blank\">@hengck23</a> ’s excellent <a href=\"https://www.kaggle.com/code/hengck23/3d-unet-using-2d-image-encoder\" target=\"_blank\">2D-3D semantic segmentation model</a>.</p>\n<ul>\n<li><strong>Input</strong>: 48×352×352 or 48×320×320  </li>\n<li><strong>Output</strong>: 6×d×h×w  </li>\n<li><strong>Loss</strong>: BCE + 2×TverskyLoss  </li>\n</ul>\n<p>The best single-model score was <strong>0.737 / 0.730</strong>.</p>\n<h2>Data</h2>\n<p>I performed pre-training on DS-10441 and then fine-tuned on DS-10440. Although the pre-training did not improve the leaderboard score, it helped reduce the training time for fine-tuning.</p>\n<p>The radius setting for the segmentation labels had a significant impact on accuracy. I used either 0.5× or 0.6× the particle radius for each particle.</p>\n<table>\n<thead>\n<tr>\n<th>Radius</th>\n<th>CV</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>Particle radius × 0.9</td>\n<td>0.6484</td>\n</tr>\n<tr>\n<td>Particle radius × 0.8</td>\n<td>0.7340</td>\n</tr>\n<tr>\n<td>Particle radius × 0.7</td>\n<td>0.7645</td>\n</tr>\n<tr>\n<td>Particle radius × 0.6</td>\n<td>0.7807</td>\n</tr>\n<tr>\n<td>Particle radius × 0.5</td>\n<td>0.7727</td>\n</tr>\n<tr>\n<td>Particle radius × 0.4</td>\n<td>0.7675</td>\n</tr>\n</tbody>\n</table>\n<h2>Post-Processing</h2>\n<ul>\n<li>Used WBF-based NMS to merge the particle centroid coordinates from each model (<strong>+0.003 to +0.005</strong>).  </li>\n<li>Created a “minislab” around each predicted particle coordinate, applied a 2D classification to determine particle vs. noise, and removed false positives (<strong>+0.003 to +0.005</strong>).</li>\n</ul>\n<p><strong>Minislab</strong> example:</p>\n<pre><code>image = volume[z_start:z_end, y_start:y_end, x_start:x_end]\nimage = image.mean(axis=)\n</code></pre>\n<h2>Computing Resources</h2>\n<ul>\n<li>RTX 3090 × 1.2 (occasionally borrowed from Vast AI).</li>\n</ul>\n<h2>Inference Code</h2>\n<p><a href=\"https://www.kaggle.com/code/akinosora/czii2024-22nd-place-inference-code/notebook\" target=\"_blank\">https://www.kaggle.com/code/akinosora/czii2024-22nd-place-inference-code/notebook</a></p>",
  "messages": [
    {
      "id": "3116623",
      "postDate": "02/06/2025 06:22:16",
      "content": "<p><strong>22nd Place Solution</strong></p>\n<h2>Pipeline</h2>\n<ol>\n<li>2D-3D Semantic Segmentation</li>\n<li>Estimation of particle centroid coordinates using cc3d  </li>\n<li>Consolidation of particle coordinates from multiple models with WBF-based post-processing  </li>\n<li>2D false-positive suppression using Minislab (apo-ferritin, ribosome)  </li>\n</ol>\n<h2>Model</h2>\n<p>I used a slightly customized version of <a href=\"https://www.kaggle.com/hengck23\" target=\"_blank\">@hengck23</a> ’s excellent <a href=\"https://www.kaggle.com/code/hengck23/3d-unet-using-2d-image-encoder\" target=\"_blank\">2D-3D semantic segmentation model</a>.</p>\n<ul>\n<li><strong>Input</strong>: 48×352×352 or 48×320×320  </li>\n<li><strong>Output</strong>: 6×d×h×w  </li>\n<li><strong>Loss</strong>: BCE + 2×TverskyLoss  </li>\n</ul>\n<p>The best single-model score was <strong>0.737 / 0.730</strong>.</p>\n<h2>Data</h2>\n<p>I performed pre-training on DS-10441 and then fine-tuned on DS-10440. Although the pre-training did not improve the leaderboard score, it helped reduce the training time for fine-tuning.</p>\n<p>The radius setting for the segmentation labels had a significant impact on accuracy. I used either 0.5× or 0.6× the particle radius for each particle.</p>\n<table>\n<thead>\n<tr>\n<th>Radius</th>\n<th>CV</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>Particle radius × 0.9</td>\n<td>0.6484</td>\n</tr>\n<tr>\n<td>Particle radius × 0.8</td>\n<td>0.7340</td>\n</tr>\n<tr>\n<td>Particle radius × 0.7</td>\n<td>0.7645</td>\n</tr>\n<tr>\n<td>Particle radius × 0.6</td>\n<td>0.7807</td>\n</tr>\n<tr>\n<td>Particle radius × 0.5</td>\n<td>0.7727</td>\n</tr>\n<tr>\n<td>Particle radius × 0.4</td>\n<td>0.7675</td>\n</tr>\n</tbody>\n</table>\n<h2>Post-Processing</h2>\n<ul>\n<li>Used WBF-based NMS to merge the particle centroid coordinates from each model (<strong>+0.003 to +0.005</strong>).  </li>\n<li>Created a “minislab” around each predicted particle coordinate, applied a 2D classification to determine particle vs. noise, and removed false positives (<strong>+0.003 to +0.005</strong>).</li>\n</ul>\n<p><strong>Minislab</strong> example:</p>\n<pre><code>image = volume[z_start:z_end, y_start:y_end, x_start:x_end]\nimage = image.mean(axis=)\n</code></pre>\n<h2>Computing Resources</h2>\n<ul>\n<li>RTX 3090 × 1.2 (occasionally borrowed from Vast AI).</li>\n</ul>\n<h2>Inference Code</h2>\n<p><a href=\"https://www.kaggle.com/code/akinosora/czii2024-22nd-place-inference-code/notebook\" target=\"_blank\">https://www.kaggle.com/code/akinosora/czii2024-22nd-place-inference-code/notebook</a></p>",
      "rawMarkdown": "**22nd Place Solution**\n\n## Pipeline\n\n1. 2D-3D Semantic Segmentation\n2. Estimation of particle centroid coordinates using cc3d  \n3. Consolidation of particle coordinates from multiple models with WBF-based post-processing  \n4. 2D false-positive suppression using Minislab (apo-ferritin, ribosome)  \n\n## Model\n\nI used a slightly customized version of @hengck23 ’s excellent [2D-3D semantic segmentation model](https://www.kaggle.com/code/hengck23/3d-unet-using-2d-image-encoder).\n\n- **Input**: 48×352×352 or 48×320×320  \n- **Output**: 6×d×h×w  \n- **Loss**: BCE + 2×TverskyLoss  \n\nThe best single-model score was **0.737 / 0.730**.\n\n## Data\n\nI performed pre-training on DS-10441 and then fine-tuned on DS-10440. Although the pre-training did not improve the leaderboard score, it helped reduce the training time for fine-tuning.\n\nThe radius setting for the segmentation labels had a significant impact on accuracy. I used either 0.5× or 0.6× the particle radius for each particle.\n\n| Radius                       | CV      |\n|-----------------------------|---------|\n| Particle radius × 0.9       | 0.6484  |\n| Particle radius × 0.8       | 0.7340  |\n| Particle radius × 0.7       | 0.7645  |\n| Particle radius × 0.6       | 0.7807  |\n| Particle radius × 0.5       | 0.7727  |\n| Particle radius × 0.4       | 0.7675  |\n\n## Post-Processing\n\n- Used WBF-based NMS to merge the particle centroid coordinates from each model (**+0.003 to +0.005**).  \n- Created a “minislab” around each predicted particle coordinate, applied a 2D classification to determine particle vs. noise, and removed false positives (**+0.003 to +0.005**).\n\n**Minislab** example:\n\n```python\nimage = volume[z_start:z_end, y_start:y_end, x_start:x_end]\nimage = image.mean(axis=0)\n```\n\n## Computing Resources\n\n* RTX 3090 × 1.2 (occasionally borrowed from Vast AI).\n\n## Inference Code\n\nhttps://www.kaggle.com/code/akinosora/czii2024-22nd-place-inference-code/notebook",
      "votes": null
    },
    {
      "id": "3116835",
      "postDate": "02/06/2025 11:07:09",
      "content": "<p>Congratulations! I liked the post-processing ideas. Are you planning to release your train code as well?</p>",
      "rawMarkdown": "Congratulations! I liked the post-processing ideas. Are you planning to release your train code as well?",
      "votes": null
    }
  ],
  "comments": [
    {
      "id": 3116835,
      "author_name": "snnclsr",
      "author_url": "",
      "post_date": "02/06/2025 11:07:09",
      "content": "<p>Congratulations! I liked the post-processing ideas. Are you planning to release your train code as well?</p>",
      "votes": null,
      "replies": []
    }
  ],
  "raw_markdown_by_id": {
    "3116623": "**22nd Place Solution**\n\n## Pipeline\n\n1. 2D-3D Semantic Segmentation\n2. Estimation of particle centroid coordinates using cc3d  \n3. Consolidation of particle coordinates from multiple models with WBF-based post-processing  \n4. 2D false-positive suppression using Minislab (apo-ferritin, ribosome)  \n\n## Model\n\nI used a slightly customized version of @hengck23 ’s excellent [2D-3D semantic segmentation model](https://www.kaggle.com/code/hengck23/3d-unet-using-2d-image-encoder).\n\n- **Input**: 48×352×352 or 48×320×320  \n- **Output**: 6×d×h×w  \n- **Loss**: BCE + 2×TverskyLoss  \n\nThe best single-model score was **0.737 / 0.730**.\n\n## Data\n\nI performed pre-training on DS-10441 and then fine-tuned on DS-10440. Although the pre-training did not improve the leaderboard score, it helped reduce the training time for fine-tuning.\n\nThe radius setting for the segmentation labels had a significant impact on accuracy. I used either 0.5× or 0.6× the particle radius for each particle.\n\n| Radius                       | CV      |\n|-----------------------------|---------|\n| Particle radius × 0.9       | 0.6484  |\n| Particle radius × 0.8       | 0.7340  |\n| Particle radius × 0.7       | 0.7645  |\n| Particle radius × 0.6       | 0.7807  |\n| Particle radius × 0.5       | 0.7727  |\n| Particle radius × 0.4       | 0.7675  |\n\n## Post-Processing\n\n- Used WBF-based NMS to merge the particle centroid coordinates from each model (**+0.003 to +0.005**).  \n- Created a “minislab” around each predicted particle coordinate, applied a 2D classification to determine particle vs. noise, and removed false positives (**+0.003 to +0.005**).\n\n**Minislab** example:\n\n```python\nimage = volume[z_start:z_end, y_start:y_end, x_start:x_end]\nimage = image.mean(axis=0)\n```\n\n## Computing Resources\n\n* RTX 3090 × 1.2 (occasionally borrowed from Vast AI).\n\n## Inference Code\n\nhttps://www.kaggle.com/code/akinosora/czii2024-22nd-place-inference-code/notebook",
    "3116835": "Congratulations! I liked the post-processing ideas. Are you planning to release your train code as well?"
  },
  "source": "meta"
}