{
  "id": 596985,
  "title": "OOM: Trying to use nnUnet for semantic segmentation",
  "url": "/competitions/rsna-intracranial-aneurysm-detection/discussion/596985",
  "author_name": "Ryo Nakamura",
  "post_date": "2025-08-06T00:57:00.201000",
  "votes": 1,
  "comment_count": 1,
  "views": 0,
  "content": "<p>I'm trying to make Two-Stage model, put inputs through the model after semantic segmentation,<br>\nRererring to this paper</p>\n<blockquote>\n  <p>RSNA Intracranial Aneurysm Detection: A Two-Stage Deep Learning Framework Leveraging Semantic Segmentation and Volumetric Classification</p>\n</blockquote>\n<p>Here's my code<br>\n<a href=\"https://www.kaggle.com/code/ryonakamurajph/oom-train-segmentation-nnunet\" target=\"_blank\">https://www.kaggle.com/code/ryonakamurajph/oom-train-segmentation-nnunet</a></p>\n<p>But as you see in the notebook, I got OOM, even after I set num_process to 1.<br>\nIt seems like segmentations data are quite big for the computation resources,</p>\n<p>If anyone had advices or anything to get around this, that'd be greatly appreciated</p>\n<pre><code>Traceback (most recent call last):\n  File , line ,  &lt;module&gt;\n    sys.exit(plan_and_preprocess_entry())\n             ^^^^^^^^^^^^^^^^^^^^^^^^^^^\n  File , line ,  plan_and_preprocess_entry\n    preprocess(args.d, plans_identifier, args.c, np, args.verbose)\n  File , line ,  preprocess\n    preprocess_dataset(d, plans_identifier, configurations, num_processes, verbose)\n  File , line ,  preprocess_dataset\n    preprocessor.run(dataset_id, c, plans_identifier, num_processes=n)\n  File , line ,  run\n     RuntimeError(\nRuntimeError: Some background worker   feet under. Yuck. \nOK jokes aside.\nOne of your background processes  missing. This could be because of an error (look  an error message)  because it was killed by your OS due to running out of RAM. If you don</code></pre>",
  "messages": [
    {
      "id": 3265666,
      "postDate": "2025-08-07T20:11:23.580Z",
      "content": "<p>For some CTA cases the image matrix size is quite large. To run nnUNet on such data you may need lots of RAM (e.g. 64gb+). I am not aware of a workaround for this but others may have suggestions.</p>",
      "rawMarkdown": "For some CTA cases the image matrix size is quite large. To run nnUNet on such data you may need lots of RAM (e.g. 64gb+). I am not aware of a workaround for this but others may have suggestions.",
      "votes": 1
    },
    {
      "id": 3263971,
      "postDate": "2025-08-06T00:57:00.200Z",
      "content": "<p>I'm trying to make Two-Stage model, put inputs through the model after semantic segmentation,<br>\nRererring to this paper</p>\n<blockquote>\n  <p>RSNA Intracranial Aneurysm Detection: A Two-Stage Deep Learning Framework Leveraging Semantic Segmentation and Volumetric Classification</p>\n</blockquote>\n<p>Here's my code<br>\n<a href=\"https://www.kaggle.com/code/ryonakamurajph/oom-train-segmentation-nnunet\" target=\"_blank\">https://www.kaggle.com/code/ryonakamurajph/oom-train-segmentation-nnunet</a></p>\n<p>But as you see in the notebook, I got OOM, even after I set num_process to 1.<br>\nIt seems like segmentations data are quite big for the computation resources,</p>\n<p>If anyone had advices or anything to get around this, that'd be greatly appreciated</p>\n<pre><code>Traceback (most recent call last):\n  File , line ,  &lt;module&gt;\n    sys.exit(plan_and_preprocess_entry())\n             ^^^^^^^^^^^^^^^^^^^^^^^^^^^\n  File , line ,  plan_and_preprocess_entry\n    preprocess(args.d, plans_identifier, args.c, np, args.verbose)\n  File , line ,  preprocess\n    preprocess_dataset(d, plans_identifier, configurations, num_processes, verbose)\n  File , line ,  preprocess_dataset\n    preprocessor.run(dataset_id, c, plans_identifier, num_processes=n)\n  File , line ,  run\n     RuntimeError(\nRuntimeError: Some background worker   feet under. Yuck. \nOK jokes aside.\nOne of your background processes  missing. This could be because of an error (look  an error message)  because it was killed by your OS due to running out of RAM. If you don</code></pre>",
      "rawMarkdown": "I'm trying to make Two-Stage model, put inputs through the model after semantic segmentation,\nRererring to this paper\n>RSNA Intracranial Aneurysm Detection: A Two-Stage Deep Learning Framework Leveraging Semantic Segmentation and Volumetric Classification\n\nHere's my code\nhttps://www.kaggle.com/code/ryonakamurajph/oom-train-segmentation-nnunet\n\nBut as you see in the notebook, I got OOM, even after I set num_process to 1.\nIt seems like segmentations data are quite big for the computation resources,\n\nIf anyone had advices or anything to get around this, that'd be greatly appreciated\n\n```python\nTraceback (most recent call last):\n  File \"/usr/local/bin/nnUNetv2_plan_and_preprocess\", line 7, in <module>\n    sys.exit(plan_and_preprocess_entry())\n             ^^^^^^^^^^^^^^^^^^^^^^^^^^^\n  File \"/usr/local/lib/python3.11/dist-packages/nnunetv2/experiment_planning/plan_and_preprocess_entrypoints.py\", line 196, in plan_and_preprocess_entry\n    preprocess(args.d, plans_identifier, args.c, np, args.verbose)\n  File \"/usr/local/lib/python3.11/dist-packages/nnunetv2/experiment_planning/plan_and_preprocess_api.py\", line 150, in preprocess\n    preprocess_dataset(d, plans_identifier, configurations, num_processes, verbose)\n  File \"/usr/local/lib/python3.11/dist-packages/nnunetv2/experiment_planning/plan_and_preprocess_api.py\", line 129, in preprocess_dataset\n    preprocessor.run(dataset_id, c, plans_identifier, num_processes=n)\n  File \"/usr/local/lib/python3.11/dist-packages/nnunetv2/preprocessing/preprocessors/default_preprocessor.py\", line 295, in run\n    raise RuntimeError('Some background worker is 6 feet under. Yuck. \\n'\nRuntimeError: Some background worker is 6 feet under. Yuck. \nOK jokes aside.\nOne of your background processes is missing. This could be because of an error (look for an error message) or because it was killed by your OS due to running out of RAM. If you don't see an error message, out of RAM is likely the problem. In that case reducing the number of workers might help\n\n\n```",
      "votes": 1
    }
  ],
  "comments": [
    {
      "id": 3265666,
      "author_name": "Evan Calabrese",
      "author_url": "",
      "post_date": "2025-08-07T20:11:23.580000",
      "content": "<p>For some CTA cases the image matrix size is quite large. To run nnUNet on such data you may need lots of RAM (e.g. 64gb+). I am not aware of a workaround for this but others may have suggestions.</p>",
      "votes": 1,
      "replies": []
    }
  ],
  "raw_markdown_by_id": {
    "3265666": "For some CTA cases the image matrix size is quite large. To run nnUNet on such data you may need lots of RAM (e.g. 64gb+). I am not aware of a workaround for this but others may have suggestions.",
    "3263971": "I'm trying to make Two-Stage model, put inputs through the model after semantic segmentation,\nRererring to this paper\n>RSNA Intracranial Aneurysm Detection: A Two-Stage Deep Learning Framework Leveraging Semantic Segmentation and Volumetric Classification\n\nHere's my code\nhttps://www.kaggle.com/code/ryonakamurajph/oom-train-segmentation-nnunet\n\nBut as you see in the notebook, I got OOM, even after I set num_process to 1.\nIt seems like segmentations data are quite big for the computation resources,\n\nIf anyone had advices or anything to get around this, that'd be greatly appreciated\n\n```python\nTraceback (most recent call last):\n  File \"/usr/local/bin/nnUNetv2_plan_and_preprocess\", line 7, in <module>\n    sys.exit(plan_and_preprocess_entry())\n             ^^^^^^^^^^^^^^^^^^^^^^^^^^^\n  File \"/usr/local/lib/python3.11/dist-packages/nnunetv2/experiment_planning/plan_and_preprocess_entrypoints.py\", line 196, in plan_and_preprocess_entry\n    preprocess(args.d, plans_identifier, args.c, np, args.verbose)\n  File \"/usr/local/lib/python3.11/dist-packages/nnunetv2/experiment_planning/plan_and_preprocess_api.py\", line 150, in preprocess\n    preprocess_dataset(d, plans_identifier, configurations, num_processes, verbose)\n  File \"/usr/local/lib/python3.11/dist-packages/nnunetv2/experiment_planning/plan_and_preprocess_api.py\", line 129, in preprocess_dataset\n    preprocessor.run(dataset_id, c, plans_identifier, num_processes=n)\n  File \"/usr/local/lib/python3.11/dist-packages/nnunetv2/preprocessing/preprocessors/default_preprocessor.py\", line 295, in run\n    raise RuntimeError('Some background worker is 6 feet under. Yuck. \\n'\nRuntimeError: Some background worker is 6 feet under. Yuck. \nOK jokes aside.\nOne of your background processes is missing. This could be because of an error (look for an error message) or because it was killed by your OS due to running out of RAM. If you don't see an error message, out of RAM is likely the problem. In that case reducing the number of workers might help\n\n\n```"
  }
}