{
  "id": 611907,
  "title": "38th Place Solution",
  "url": "/competitions/rsna-intracranial-aneurysm-detection/discussion/611907",
  "author_name": "Carloscp",
  "post_date": "2025-10-15T13:31:44.714000",
  "votes": 14,
  "comment_count": 0,
  "views": 0,
  "content": "<p>Thanks to Kaggle, RSNA, and all partner organizations for hosting this competition.<br>\nThis was my 11th competition and the first time I achieved a silver medal. This milestone has been a huge motivation to continue learning and competing.</p>\n<p><strong>Solution Overview</strong></p>\n<p>My final solution was a two-stage pipeline. The first stage used a 3D U-Net ensemble to generate heatmaps, and the second stage used a heuristic function to extract the final probabilities.</p>\n<p><strong>The Pipeline</strong></p>\n<p>After spending some time on a direct 3D classification model with limited success, I pivoted to a segmentation-style architecture. I trained a 3D U-Net with a ResNet3D backbone using a 5-fold cross-validation setup. The model was trained to predict 13-channel heatmaps, with the ground truth for each channel generated by placing a Gaussian kernel at the provided aneurysm coordinates.</p>\n<p>For the second stage, instead of a simple max operation, I used a heuristic: first applying NMS to the generated heatmaps to find the peak activation in each channel. Then, based on the observation that most cases have 3 or fewer aneurysms, I kept the top 3 candidate probabilities and suppressed all lower-ranked ones using an exponent of 1.5.<br>\nFinally, the overall <em>Aneurysm Present</em> probability was calculated as:</p>\n<p>$$<br>\nP = 1 - \\prod_{i=1}^{k} (1 - p_i)<br>\n$$</p>\n<p>where (p_i) are the top-k suppressed candidate probabilities.</p>\n<p><strong>Results &amp; Final Thoughts</strong></p>\n<p>This approach achieved a 5-fold CV score of ~0.75. This translated into a Public LB of 0.73 and a final Private LB of 0.73. Even though the final score wasn't as high as I'd hoped, the most rewarding part was the consistency between my local CV, public LB, and private LB (0.73), which proves the validation strategy was solid.</p>\n<p>Congratulations to all the winners and participants — it was a fantastic learning experience!</p>",
  "messages": [
    {
      "id": 3302293,
      "postDate": "2025-10-15T13:31:44.713Z",
      "content": "<p>Thanks to Kaggle, RSNA, and all partner organizations for hosting this competition.<br>\nThis was my 11th competition and the first time I achieved a silver medal. This milestone has been a huge motivation to continue learning and competing.</p>\n<p><strong>Solution Overview</strong></p>\n<p>My final solution was a two-stage pipeline. The first stage used a 3D U-Net ensemble to generate heatmaps, and the second stage used a heuristic function to extract the final probabilities.</p>\n<p><strong>The Pipeline</strong></p>\n<p>After spending some time on a direct 3D classification model with limited success, I pivoted to a segmentation-style architecture. I trained a 3D U-Net with a ResNet3D backbone using a 5-fold cross-validation setup. The model was trained to predict 13-channel heatmaps, with the ground truth for each channel generated by placing a Gaussian kernel at the provided aneurysm coordinates.</p>\n<p>For the second stage, instead of a simple max operation, I used a heuristic: first applying NMS to the generated heatmaps to find the peak activation in each channel. Then, based on the observation that most cases have 3 or fewer aneurysms, I kept the top 3 candidate probabilities and suppressed all lower-ranked ones using an exponent of 1.5.<br>\nFinally, the overall <em>Aneurysm Present</em> probability was calculated as:</p>\n<p>$$<br>\nP = 1 - \\prod_{i=1}^{k} (1 - p_i)<br>\n$$</p>\n<p>where (p_i) are the top-k suppressed candidate probabilities.</p>\n<p><strong>Results &amp; Final Thoughts</strong></p>\n<p>This approach achieved a 5-fold CV score of ~0.75. This translated into a Public LB of 0.73 and a final Private LB of 0.73. Even though the final score wasn't as high as I'd hoped, the most rewarding part was the consistency between my local CV, public LB, and private LB (0.73), which proves the validation strategy was solid.</p>\n<p>Congratulations to all the winners and participants — it was a fantastic learning experience!</p>",
      "rawMarkdown": "Thanks to Kaggle, RSNA, and all partner organizations for hosting this competition.\nThis was my 11th competition and the first time I achieved a silver medal. This milestone has been a huge motivation to continue learning and competing.\n\n**Solution Overview**\n\nMy final solution was a two-stage pipeline. The first stage used a 3D U-Net ensemble to generate heatmaps, and the second stage used a heuristic function to extract the final probabilities.\n\n**The Pipeline**\n\nAfter spending some time on a direct 3D classification model with limited success, I pivoted to a segmentation-style architecture. I trained a 3D U-Net with a ResNet3D backbone using a 5-fold cross-validation setup. The model was trained to predict 13-channel heatmaps, with the ground truth for each channel generated by placing a Gaussian kernel at the provided aneurysm coordinates.\n\nFor the second stage, instead of a simple max operation, I used a heuristic: first applying NMS to the generated heatmaps to find the peak activation in each channel. Then, based on the observation that most cases have 3 or fewer aneurysms, I kept the top 3 candidate probabilities and suppressed all lower-ranked ones using an exponent of 1.5.\nFinally, the overall *Aneurysm Present* probability was calculated as:\n\n$$\nP = 1 - \\prod_{i=1}^{k} (1 - p_i)\n$$\n\nwhere \\(p_i\\) are the top-k suppressed candidate probabilities.\n\n**Results & Final Thoughts**\n\nThis approach achieved a 5-fold CV score of ~0.75. This translated into a Public LB of 0.73 and a final Private LB of 0.73. Even though the final score wasn't as high as I'd hoped, the most rewarding part was the consistency between my local CV, public LB, and private LB (0.73), which proves the validation strategy was solid.\n\nCongratulations to all the winners and participants — it was a fantastic learning experience!",
      "votes": 14
    }
  ],
  "comments": [],
  "raw_markdown_by_id": {
    "3302293": "Thanks to Kaggle, RSNA, and all partner organizations for hosting this competition.\nThis was my 11th competition and the first time I achieved a silver medal. This milestone has been a huge motivation to continue learning and competing.\n\n**Solution Overview**\n\nMy final solution was a two-stage pipeline. The first stage used a 3D U-Net ensemble to generate heatmaps, and the second stage used a heuristic function to extract the final probabilities.\n\n**The Pipeline**\n\nAfter spending some time on a direct 3D classification model with limited success, I pivoted to a segmentation-style architecture. I trained a 3D U-Net with a ResNet3D backbone using a 5-fold cross-validation setup. The model was trained to predict 13-channel heatmaps, with the ground truth for each channel generated by placing a Gaussian kernel at the provided aneurysm coordinates.\n\nFor the second stage, instead of a simple max operation, I used a heuristic: first applying NMS to the generated heatmaps to find the peak activation in each channel. Then, based on the observation that most cases have 3 or fewer aneurysms, I kept the top 3 candidate probabilities and suppressed all lower-ranked ones using an exponent of 1.5.\nFinally, the overall *Aneurysm Present* probability was calculated as:\n\n$$\nP = 1 - \\prod_{i=1}^{k} (1 - p_i)\n$$\n\nwhere \\(p_i\\) are the top-k suppressed candidate probabilities.\n\n**Results & Final Thoughts**\n\nThis approach achieved a 5-fold CV score of ~0.75. This translated into a Public LB of 0.73 and a final Private LB of 0.73. Even though the final score wasn't as high as I'd hoped, the most rewarding part was the consistency between my local CV, public LB, and private LB (0.73), which proves the validation strategy was solid.\n\nCongratulations to all the winners and participants — it was a fantastic learning experience!"
  }
}