{
  "id": 561416,
  "title": "[88th place solution] How a beginner just barely won a medal",
  "url": "/competitions/czii-cryo-et-object-identification/writeups/yoshinari-kawashima-88th-place-solution-how-a-begi",
  "author_name": "",
  "post_date": "2025-02-06T02:55:10.787Z",
  "votes": 18,
  "comment_count": 2,
  "views": 0,
  "content": "<h1><strong>88th place solution</strong></h1>\n<p>I would like to thank everyone who made this wonderful competition possible. In addition, thank you to everyone who offered advice in my discussions. And the utmost thanks to my teammate <a href=\"https://www.kaggle.com/kotakatayama\" target=\"_blank\">@kotakatayama</a>.</p>\n<p>I have learned from various published notebooks. In particular, I have greatly benefited from the following notebooks.<br>\nI made a few changes to published notebooks and was able to finish in the medal range in the first time. I hope this will be helpful to kagglers like me who are aiming for a first medal.</p>\n<h2>Baseline</h2>\n<ul>\n<li><a href=\"https://www.kaggle.com/code/fnands/baseline-unet-train-submit\" target=\"_blank\">Baseline UNet train + submit </a></li>\n</ul>\n<h2>Making dataset</h2>\n<ul>\n<li><a href=\"https://www.kaggle.com/code/itsuki9180/czii-making-datasets-for-yolo\" target=\"_blank\">CZII making datasets for YOLO</a></li>\n<li><a href=\"https://www.kaggle.com/code/sersasj/czii-making-datasets-for-yolo-synthetic-data\" target=\"_blank\">CZII making datasets for YOLO + synthetic data</a></li>\n</ul>\n<h2>YOLO training</h2>\n<ul>\n<li><a href=\"https://www.kaggle.com/code/itsuki9180/czii-yolo11-training-baseline\" target=\"_blank\">CZII YOLO11 Training Baseline</a></li>\n</ul>\n<h2>UNET training</h2>\n<ul>\n<li><a href=\"https://www.kaggle.com/code/ahsuna123/3d-u-net-training-only\" target=\"_blank\">3D U-Net : Training Only</a></li>\n</ul>\n<h2>Validation</h2>\n<ul>\n<li><a href=\"https://www.kaggle.com/code/hengck23/3d-unet-using-2d-image-encoder\" target=\"_blank\">3d-unet using 2d image encoder</a></li>\n</ul>\n<h2>Ensemble / Submission</h2>\n<ul>\n<li><a href=\"https://www.kaggle.com/code/hideyukizushi/czii-yolo11-unet3d-monai-lb-707\" target=\"_blank\">CZII|YOLO11+Unet3D-Monai|LB.707</a></li>\n<li><a href=\"https://www.kaggle.com/code/sersasj/czii-yolo11-submission-baseline-with-kdtree-update\" target=\"_blank\">CZII YOLO11 Submission Baseline with KDTree Update</a></li>\n<li><a href=\"https://www.kaggle.com/code/itsuki9180/czii-yolo11-submission-baseline\" target=\"_blank\">CZII YOLO11 Submission Baseline</a></li>\n</ul>\n<h1>MY SOLUTION SUMMARY (PUBLIC= 0.730, PRIVATE = 0.723)</h1>\n<p>My solution is an ensemble of 7 YOLO models and 1 3dUnet. These models have different strengths from each other, and I have seen significant score improvement from the ensemble.</p>\n<p>First I looked for any improvements in the published notebooks.<br>\nI found that multiple YOLO model ensembles can improve scores. Using <a href=\"https://www.kaggle.com/code/hideyukizushi/czii-yolo11-unet3d-monai-lb-707\" target=\"_blank\">this ensemble approach</a>, about three YOLOs use is most effective.<br>\nHowever, it seemed wasteful to use only 3 YOLO models when creating 7 YOLO models during cross-validation. Therefore, we decided to modify the ensemble method slightly and only submit particles detected by two or more of the 7 YOLOs.</p>\n<p><img src=\"https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F20464683%2F2a2ea16d7dea627ed2769a8cafca667c%2FColorful%20Get%20Things%20Done%20Flowchart%20Infographic%20Graph.png?generation=1738808171619944&amp;alt=media\" alt=\"\"></p>\n<h2>1. TRAINING</h2>\n<h3>1.1. Pretraining YOLO with <a href=\"https://www.kaggle.com/code/itsuki9180/czii-making-datasets-for-yolo\" target=\"_blank\">synthetic data</a> (lr = 3e-4)</h3>\n<h3>1.1. Fine tuning using the training data set provided by the competition(lr = 3e-5)</h3>\n<p>At this time, 7 expriments are split 6/1 for cross-validation (7 YOLO models are created)<br>\nReducing the learning rate of fine tuning improved the CV and LB scores.<br>\nHyperparameters other than lr is the same to <a href=\"https://www.kaggle.com/code/itsuki9180/czii-yolo11-training-baseline\" target=\"_blank\">this notebook</a></p>\n<h3>1.3. 3dunet training</h3>\n<p>I used 3dunet in <a href=\"(https://www.kaggle.com/code/hideyukizushi/czii-yolo11-unet3d-monai-lb-707\" target=\"_blank\">this notebook</a>) without change</p>\n<h2>2. ENSEMBLE</h2>\n<h3>2.1. YOLO ensemble</h3>\n<p>Particles detected in two or more of the seven YOLOs were considered YOLO predictions</p>\n<pre><code> exp, group  grouped:\n    group = group.reset_index(drop=)\n    coords = group[[, , ]].values\n    db = DBSCAN(eps=p_rad, min_samples=, metric=).fit(coords)\n    labels = db.labels_ \n    group[] = labels\n    group = group[group[] != -] \n     cluster_id  np.unique(labels):\n</code></pre>\n<h3>2.2. YOLO + 3DUnet ensemble</h3>\n<p>Ensemble YOLO prediction with 3dUnet predictions in <a href=\"https://www.kaggle.com/code/hideyukizushi/czii-yolo11-unet3d-monai-lb-707\" target=\"_blank\">this way</a></p>\n<h1>What we tried but didn't work well</h1>\n<h2>1. Adding false positive particles to training</h2>\n<p>Many pointed out that the labels given in this competition were missed. Therefore, we gave labels to the false positives in the model and trained again, but this did not improve the scores.</p>\n<h2>2. Prediction by combining images from the side</h2>\n<p>YOLO training data was created using lateral cross sections and used in combination with the original YOLO to stabilize detection, but this did not improve scores.</p>\n<h1>Thank you for reading this far. I will participate in more competitions . I also look for members to work on this together!</h1>\n<h1>I would welcome any suggestions or advice on how to improve this solution.</h1>",
  "messages": [
    {
      "id": "3116479",
      "postDate": "02/06/2025 02:29:52",
      "content": "<h1><strong>88th place solution</strong></h1>\n<p>I would like to thank everyone who made this wonderful competition possible. In addition, thank you to everyone who offered advice in my discussions. And the utmost thanks to my teammate <a href=\"https://www.kaggle.com/kotakatayama\" target=\"_blank\">@kotakatayama</a>.</p>\n<p>I have learned from various published notebooks. In particular, I have greatly benefited from the following notebooks.<br>\nI made a few changes to published notebooks and was able to finish in the medal range in the first time. I hope this will be helpful to kagglers like me who are aiming for a first medal.</p>\n<h2>Baseline</h2>\n<ul>\n<li><a href=\"https://www.kaggle.com/code/fnands/baseline-unet-train-submit\" target=\"_blank\">Baseline UNet train + submit </a></li>\n</ul>\n<h2>Making dataset</h2>\n<ul>\n<li><a href=\"https://www.kaggle.com/code/itsuki9180/czii-making-datasets-for-yolo\" target=\"_blank\">CZII making datasets for YOLO</a></li>\n<li><a href=\"https://www.kaggle.com/code/sersasj/czii-making-datasets-for-yolo-synthetic-data\" target=\"_blank\">CZII making datasets for YOLO + synthetic data</a></li>\n</ul>\n<h2>YOLO training</h2>\n<ul>\n<li><a href=\"https://www.kaggle.com/code/itsuki9180/czii-yolo11-training-baseline\" target=\"_blank\">CZII YOLO11 Training Baseline</a></li>\n</ul>\n<h2>UNET training</h2>\n<ul>\n<li><a href=\"https://www.kaggle.com/code/ahsuna123/3d-u-net-training-only\" target=\"_blank\">3D U-Net : Training Only</a></li>\n</ul>\n<h2>Validation</h2>\n<ul>\n<li><a href=\"https://www.kaggle.com/code/hengck23/3d-unet-using-2d-image-encoder\" target=\"_blank\">3d-unet using 2d image encoder</a></li>\n</ul>\n<h2>Ensemble / Submission</h2>\n<ul>\n<li><a href=\"https://www.kaggle.com/code/hideyukizushi/czii-yolo11-unet3d-monai-lb-707\" target=\"_blank\">CZII|YOLO11+Unet3D-Monai|LB.707</a></li>\n<li><a href=\"https://www.kaggle.com/code/sersasj/czii-yolo11-submission-baseline-with-kdtree-update\" target=\"_blank\">CZII YOLO11 Submission Baseline with KDTree Update</a></li>\n<li><a href=\"https://www.kaggle.com/code/itsuki9180/czii-yolo11-submission-baseline\" target=\"_blank\">CZII YOLO11 Submission Baseline</a></li>\n</ul>\n<h1>MY SOLUTION SUMMARY (PUBLIC= 0.730, PRIVATE = 0.723)</h1>\n<p>My solution is an ensemble of 7 YOLO models and 1 3dUnet. These models have different strengths from each other, and I have seen significant score improvement from the ensemble.</p>\n<p>First I looked for any improvements in the published notebooks.<br>\nI found that multiple YOLO model ensembles can improve scores. Using <a href=\"https://www.kaggle.com/code/hideyukizushi/czii-yolo11-unet3d-monai-lb-707\" target=\"_blank\">this ensemble approach</a>, about three YOLOs use is most effective.<br>\nHowever, it seemed wasteful to use only 3 YOLO models when creating 7 YOLO models during cross-validation. Therefore, we decided to modify the ensemble method slightly and only submit particles detected by two or more of the 7 YOLOs.</p>\n<p><img src=\"https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F20464683%2F2a2ea16d7dea627ed2769a8cafca667c%2FColorful%20Get%20Things%20Done%20Flowchart%20Infographic%20Graph.png?generation=1738808171619944&amp;alt=media\" alt=\"\"></p>\n<h2>1. TRAINING</h2>\n<h3>1.1. Pretraining YOLO with <a href=\"https://www.kaggle.com/code/itsuki9180/czii-making-datasets-for-yolo\" target=\"_blank\">synthetic data</a> (lr = 3e-4)</h3>\n<h3>1.1. Fine tuning using the training data set provided by the competition(lr = 3e-5)</h3>\n<p>At this time, 7 expriments are split 6/1 for cross-validation (7 YOLO models are created)<br>\nReducing the learning rate of fine tuning improved the CV and LB scores.<br>\nHyperparameters other than lr is the same to <a href=\"https://www.kaggle.com/code/itsuki9180/czii-yolo11-training-baseline\" target=\"_blank\">this notebook</a></p>\n<h3>1.3. 3dunet training</h3>\n<p>I used 3dunet in <a href=\"(https://www.kaggle.com/code/hideyukizushi/czii-yolo11-unet3d-monai-lb-707\" target=\"_blank\">this notebook</a>) without change</p>\n<h2>2. ENSEMBLE</h2>\n<h3>2.1. YOLO ensemble</h3>\n<p>Particles detected in two or more of the seven YOLOs were considered YOLO predictions</p>\n<pre><code> exp, group  grouped:\n    group = group.reset_index(drop=)\n    coords = group[[, , ]].values\n    db = DBSCAN(eps=p_rad, min_samples=, metric=).fit(coords)\n    labels = db.labels_ \n    group[] = labels\n    group = group[group[] != -] \n     cluster_id  np.unique(labels):\n</code></pre>\n<h3>2.2. YOLO + 3DUnet ensemble</h3>\n<p>Ensemble YOLO prediction with 3dUnet predictions in <a href=\"https://www.kaggle.com/code/hideyukizushi/czii-yolo11-unet3d-monai-lb-707\" target=\"_blank\">this way</a></p>\n<h1>What we tried but didn't work well</h1>\n<h2>1. Adding false positive particles to training</h2>\n<p>Many pointed out that the labels given in this competition were missed. Therefore, we gave labels to the false positives in the model and trained again, but this did not improve the scores.</p>\n<h2>2. Prediction by combining images from the side</h2>\n<p>YOLO training data was created using lateral cross sections and used in combination with the original YOLO to stabilize detection, but this did not improve scores.</p>\n<h1>Thank you for reading this far. I will participate in more competitions . I also look for members to work on this together!</h1>\n<h1>I would welcome any suggestions or advice on how to improve this solution.</h1>",
      "rawMarkdown": "# **88th place solution**\n\nI would like to thank everyone who made this wonderful competition possible. In addition, thank you to everyone who offered advice in my discussions. And the utmost thanks to my teammate @kotakatayama.\n\nI have learned from various published notebooks. In particular, I have greatly benefited from the following notebooks.\nI made a few changes to published notebooks and was able to finish in the medal range in the first time. I hope this will be helpful to kagglers like me who are aiming for a first medal.\n\n## Baseline\n- [Baseline UNet train + submit ](https://www.kaggle.com/code/fnands/baseline-unet-train-submit)\n\n## Making dataset\n- [CZII making datasets for YOLO](https://www.kaggle.com/code/itsuki9180/czii-making-datasets-for-yolo)\n- [CZII making datasets for YOLO + synthetic data](https://www.kaggle.com/code/sersasj/czii-making-datasets-for-yolo-synthetic-data)\n\n## YOLO training\n- [CZII YOLO11 Training Baseline](https://www.kaggle.com/code/itsuki9180/czii-yolo11-training-baseline)\n\n## UNET training\n- [3D U-Net : Training Only](https://www.kaggle.com/code/ahsuna123/3d-u-net-training-only)\n\n## Validation\n- [3d-unet using 2d image encoder](https://www.kaggle.com/code/hengck23/3d-unet-using-2d-image-encoder)\n\n## Ensemble / Submission\n- [CZII|YOLO11+Unet3D-Monai|LB.707](https://www.kaggle.com/code/hideyukizushi/czii-yolo11-unet3d-monai-lb-707)\n- [CZII YOLO11 Submission Baseline with KDTree Update](https://www.kaggle.com/code/sersasj/czii-yolo11-submission-baseline-with-kdtree-update)\n- [CZII YOLO11 Submission Baseline](https://www.kaggle.com/code/itsuki9180/czii-yolo11-submission-baseline)\n\n\n# MY SOLUTION SUMMARY (PUBLIC= 0.730, PRIVATE = 0.723) \nMy solution is an ensemble of 7 YOLO models and 1 3dUnet. These models have different strengths from each other, and I have seen significant score improvement from the ensemble.\n\nFirst I looked for any improvements in the published notebooks.\nI found that multiple YOLO model ensembles can improve scores. Using [this ensemble approach](https://www.kaggle.com/code/hideyukizushi/czii-yolo11-unet3d-monai-lb-707), about three YOLOs use is most effective.\nHowever, it seemed wasteful to use only 3 YOLO models when creating 7 YOLO models during cross-validation. Therefore, we decided to modify the ensemble method slightly and only submit particles detected by two or more of the 7 YOLOs.\n\n![](https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F20464683%2F2a2ea16d7dea627ed2769a8cafca667c%2FColorful%20Get%20Things%20Done%20Flowchart%20Infographic%20Graph.png?generation=1738808171619944&alt=media)\n\n## 1. TRAINING \n### 1.1. Pretraining YOLO with [synthetic data](https://www.kaggle.com/code/itsuki9180/czii-making-datasets-for-yolo) (lr = 3e-4)\n### 1.1. Fine tuning using the training data set provided by the competition(lr = 3e-5)\nAt this time, 7 expriments are split 6/1 for cross-validation (7 YOLO models are created)\nReducing the learning rate of fine tuning improved the CV and LB scores.\nHyperparameters other than lr is the same to [this notebook](https://www.kaggle.com/code/itsuki9180/czii-yolo11-training-baseline)\n\n### 1.3. 3dunet training\nI used 3dunet in [this notebook]((https://www.kaggle.com/code/hideyukizushi/czii-yolo11-unet3d-monai-lb-707)) without change\n## 2. ENSEMBLE\n### 2.1. YOLO ensemble\nParticles detected in two or more of the seven YOLOs were considered YOLO predictions\n```python\nfor exp, group in grouped:\n    group = group.reset_index(drop=True)\n    coords = group[['x', 'y', 'z']].values\n    db = DBSCAN(eps=p_rad, min_samples=2, metric='euclidean').fit(coords)\n    labels = db.labels_ \n    group['cluster'] = labels\n    group = group[group['cluster'] != -1] # MY CHANGE!!\n    for cluster_id in np.unique(labels):\n```\n### 2.2. YOLO + 3DUnet ensemble\nEnsemble YOLO prediction with 3dUnet predictions in [this way](https://www.kaggle.com/code/hideyukizushi/czii-yolo11-unet3d-monai-lb-707)\n\n\n# What we tried but didn't work well\n## 1. Adding false positive particles to training\nMany pointed out that the labels given in this competition were missed. Therefore, we gave labels to the false positives in the model and trained again, but this did not improve the scores.\n## 2. Prediction by combining images from the side\nYOLO training data was created using lateral cross sections and used in combination with the original YOLO to stabilize detection, but this did not improve scores.\n\n# Thank you for reading this far. I will participate in more competitions . I also look for members to work on this together!\n# I would welcome any suggestions or advice on how to improve this solution.",
      "votes": null
    },
    {
      "id": "3116748",
      "postDate": "02/06/2025 09:11:23",
      "content": "<p>Congratulations on your first medal! Hopefully the first of many. Some of the top performers shared their solutions too, you can read their code to see where to improve your pipeline. </p>",
      "rawMarkdown": "Congratulations on your first medal! Hopefully the first of many. Some of the top performers shared their solutions too, you can read their code to see where to improve your pipeline.",
      "votes": null
    },
    {
      "id": "3116757",
      "postDate": "02/06/2025 09:30:23",
      "content": "<p>Thanks a lot  I want to be a professional programmer like you !</p>",
      "rawMarkdown": "Thanks a lot  I want to be a professional programmer like you !",
      "votes": null
    }
  ],
  "comments": [
    {
      "id": 3116748,
      "author_name": "snnclsr",
      "author_url": "",
      "post_date": "02/06/2025 09:11:23",
      "content": "<p>Congratulations on your first medal! Hopefully the first of many. Some of the top performers shared their solutions too, you can read their code to see where to improve your pipeline. </p>",
      "votes": null,
      "replies": [
        {
          "id": 3116757,
          "author_name": "yoshinarikawashima",
          "author_url": "",
          "post_date": "02/06/2025 09:30:23",
          "content": "<p>Thanks a lot  I want to be a professional programmer like you !</p>",
          "votes": null,
          "replies": []
        }
      ]
    }
  ],
  "raw_markdown_by_id": {
    "3116479": "# **88th place solution**\n\nI would like to thank everyone who made this wonderful competition possible. In addition, thank you to everyone who offered advice in my discussions. And the utmost thanks to my teammate @kotakatayama.\n\nI have learned from various published notebooks. In particular, I have greatly benefited from the following notebooks.\nI made a few changes to published notebooks and was able to finish in the medal range in the first time. I hope this will be helpful to kagglers like me who are aiming for a first medal.\n\n## Baseline\n- [Baseline UNet train + submit ](https://www.kaggle.com/code/fnands/baseline-unet-train-submit)\n\n## Making dataset\n- [CZII making datasets for YOLO](https://www.kaggle.com/code/itsuki9180/czii-making-datasets-for-yolo)\n- [CZII making datasets for YOLO + synthetic data](https://www.kaggle.com/code/sersasj/czii-making-datasets-for-yolo-synthetic-data)\n\n## YOLO training\n- [CZII YOLO11 Training Baseline](https://www.kaggle.com/code/itsuki9180/czii-yolo11-training-baseline)\n\n## UNET training\n- [3D U-Net : Training Only](https://www.kaggle.com/code/ahsuna123/3d-u-net-training-only)\n\n## Validation\n- [3d-unet using 2d image encoder](https://www.kaggle.com/code/hengck23/3d-unet-using-2d-image-encoder)\n\n## Ensemble / Submission\n- [CZII|YOLO11+Unet3D-Monai|LB.707](https://www.kaggle.com/code/hideyukizushi/czii-yolo11-unet3d-monai-lb-707)\n- [CZII YOLO11 Submission Baseline with KDTree Update](https://www.kaggle.com/code/sersasj/czii-yolo11-submission-baseline-with-kdtree-update)\n- [CZII YOLO11 Submission Baseline](https://www.kaggle.com/code/itsuki9180/czii-yolo11-submission-baseline)\n\n\n# MY SOLUTION SUMMARY (PUBLIC= 0.730, PRIVATE = 0.723) \nMy solution is an ensemble of 7 YOLO models and 1 3dUnet. These models have different strengths from each other, and I have seen significant score improvement from the ensemble.\n\nFirst I looked for any improvements in the published notebooks.\nI found that multiple YOLO model ensembles can improve scores. Using [this ensemble approach](https://www.kaggle.com/code/hideyukizushi/czii-yolo11-unet3d-monai-lb-707), about three YOLOs use is most effective.\nHowever, it seemed wasteful to use only 3 YOLO models when creating 7 YOLO models during cross-validation. Therefore, we decided to modify the ensemble method slightly and only submit particles detected by two or more of the 7 YOLOs.\n\n![](https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F20464683%2F2a2ea16d7dea627ed2769a8cafca667c%2FColorful%20Get%20Things%20Done%20Flowchart%20Infographic%20Graph.png?generation=1738808171619944&alt=media)\n\n## 1. TRAINING \n### 1.1. Pretraining YOLO with [synthetic data](https://www.kaggle.com/code/itsuki9180/czii-making-datasets-for-yolo) (lr = 3e-4)\n### 1.1. Fine tuning using the training data set provided by the competition(lr = 3e-5)\nAt this time, 7 expriments are split 6/1 for cross-validation (7 YOLO models are created)\nReducing the learning rate of fine tuning improved the CV and LB scores.\nHyperparameters other than lr is the same to [this notebook](https://www.kaggle.com/code/itsuki9180/czii-yolo11-training-baseline)\n\n### 1.3. 3dunet training\nI used 3dunet in [this notebook]((https://www.kaggle.com/code/hideyukizushi/czii-yolo11-unet3d-monai-lb-707)) without change\n## 2. ENSEMBLE\n### 2.1. YOLO ensemble\nParticles detected in two or more of the seven YOLOs were considered YOLO predictions\n```python\nfor exp, group in grouped:\n    group = group.reset_index(drop=True)\n    coords = group[['x', 'y', 'z']].values\n    db = DBSCAN(eps=p_rad, min_samples=2, metric='euclidean').fit(coords)\n    labels = db.labels_ \n    group['cluster'] = labels\n    group = group[group['cluster'] != -1] # MY CHANGE!!\n    for cluster_id in np.unique(labels):\n```\n### 2.2. YOLO + 3DUnet ensemble\nEnsemble YOLO prediction with 3dUnet predictions in [this way](https://www.kaggle.com/code/hideyukizushi/czii-yolo11-unet3d-monai-lb-707)\n\n\n# What we tried but didn't work well\n## 1. Adding false positive particles to training\nMany pointed out that the labels given in this competition were missed. Therefore, we gave labels to the false positives in the model and trained again, but this did not improve the scores.\n## 2. Prediction by combining images from the side\nYOLO training data was created using lateral cross sections and used in combination with the original YOLO to stabilize detection, but this did not improve scores.\n\n# Thank you for reading this far. I will participate in more competitions . I also look for members to work on this together!\n# I would welcome any suggestions or advice on how to improve this solution.",
    "3116748": "Congratulations on your first medal! Hopefully the first of many. Some of the top performers shared their solutions too, you can read their code to see where to improve your pipeline.",
    "3116757": "Thanks a lot  I want to be a professional programmer like you !"
  },
  "source": "meta"
}