{
  "id": 265098,
  "title": "Normalized Voxels: Align Planes, Adjust Contrast, and Crop",
  "url": "/competitions/rsna-miccai-brain-tumor-radiogenomic-classification/discussion/265098",
  "author_name": "yu4u",
  "post_date": "2021-08-14T15:57:23.868000",
  "votes": 25,
  "comment_count": 6,
  "views": 0,
  "content": "<h3>Normalized Voxels: Align Planes, Adjust Contrast, and Crop</h3>\n<p>As shown in several notebooks, MRI plane type (Axial, Coronal, and Sagittal) is not consistent among patients or MRI scan types (FLAIR, T1w, T1wCE, T2w). While augmentations might alleviate this inconsistency, it is better to train models using MRI voxels that are consistent in terms of plane type. <a href=\"https://www.kaggle.com/ren4yu/normalized-voxels-align-planes-and-crop/data\" target=\"_blank\">This notebook</a> shows we can obtain normalized voxels by appropriately rotating MRI voxels.</p>\n<h3>Normalized Voxel Datasets</h3>\n<p>The normalized voxels created the above procedure were stored as a dataset:</p>\n<ul>\n<li><a href=\"https://www.kaggle.com/ren4yu/rsna-miccai-voxel-64-dataset\" target=\"_blank\">64x64x64 voxel</a></li>\n<li><a href=\"https://www.kaggle.com/ren4yu/rsna-miccai-voxel-128-dataset\" target=\"_blank\">128x128x128 voxel</a></li>\n<li><a href=\"https://www.kaggle.com/ren4yu/rsna-miccai-voxel-256-dataset\" target=\"_blank\">256x256x256 voxel</a></li>\n</ul>\n<p>The directory structure is as follows:</p>\n<pre><code>voxel\n├── train\n│　　　├── 00000\n│　　　│　　　├── FLAIR.npy\n│　　　│　　　├── T1w.npy\n│　　　│　　　├── T1wCE.npy\n│　　　│　　　└── T2w.npy\n│　　　├── 00002\n│　　　│　　　├── FLAIR.npy\n...\n├── test\n│　　　├── 00001\n│　　　│　　　├── FLAIR.npy\n│　　　│　　　├── T1w.npy\n│　　　│　　　├── T1wCE.npy\n│　　　│　　　└── T2w.npy\n│　　　├── 00013\n│　　　│　　　├── FLAIR.npy\n</code></pre>\n<p>Some voxels do not exist because all images belonging to these scans are completely black:</p>\n<ul>\n<li>('train', '00109', 'FLAIR.npy')</li>\n<li>('train', '00123', 'T1w.npy')</li>\n<li>('train', '00123', 'T2w.npy')</li>\n<li>('train', '00709', 'FLAIR.npy')</li>\n</ul>\n<p>Hopefully this work will help improve models.</p>",
  "messages": [
    {
      "id": 1472021,
      "postDate": "2021-08-14T15:57:23.870Z",
      "content": "<h3>Normalized Voxels: Align Planes, Adjust Contrast, and Crop</h3>\n<p>As shown in several notebooks, MRI plane type (Axial, Coronal, and Sagittal) is not consistent among patients or MRI scan types (FLAIR, T1w, T1wCE, T2w). While augmentations might alleviate this inconsistency, it is better to train models using MRI voxels that are consistent in terms of plane type. <a href=\"https://www.kaggle.com/ren4yu/normalized-voxels-align-planes-and-crop/data\" target=\"_blank\">This notebook</a> shows we can obtain normalized voxels by appropriately rotating MRI voxels.</p>\n<h3>Normalized Voxel Datasets</h3>\n<p>The normalized voxels created the above procedure were stored as a dataset:</p>\n<ul>\n<li><a href=\"https://www.kaggle.com/ren4yu/rsna-miccai-voxel-64-dataset\" target=\"_blank\">64x64x64 voxel</a></li>\n<li><a href=\"https://www.kaggle.com/ren4yu/rsna-miccai-voxel-128-dataset\" target=\"_blank\">128x128x128 voxel</a></li>\n<li><a href=\"https://www.kaggle.com/ren4yu/rsna-miccai-voxel-256-dataset\" target=\"_blank\">256x256x256 voxel</a></li>\n</ul>\n<p>The directory structure is as follows:</p>\n<pre><code>voxel\n├── train\n│　　　├── 00000\n│　　　│　　　├── FLAIR.npy\n│　　　│　　　├── T1w.npy\n│　　　│　　　├── T1wCE.npy\n│　　　│　　　└── T2w.npy\n│　　　├── 00002\n│　　　│　　　├── FLAIR.npy\n...\n├── test\n│　　　├── 00001\n│　　　│　　　├── FLAIR.npy\n│　　　│　　　├── T1w.npy\n│　　　│　　　├── T1wCE.npy\n│　　　│　　　└── T2w.npy\n│　　　├── 00013\n│　　　│　　　├── FLAIR.npy\n</code></pre>\n<p>Some voxels do not exist because all images belonging to these scans are completely black:</p>\n<ul>\n<li>('train', '00109', 'FLAIR.npy')</li>\n<li>('train', '00123', 'T1w.npy')</li>\n<li>('train', '00123', 'T2w.npy')</li>\n<li>('train', '00709', 'FLAIR.npy')</li>\n</ul>\n<p>Hopefully this work will help improve models.</p>",
      "rawMarkdown": "### Normalized Voxels: Align Planes, Adjust Contrast, and Crop\nAs shown in several notebooks, MRI plane type (Axial, Coronal, and Sagittal) is not consistent among patients or MRI scan types (FLAIR, T1w, T1wCE, T2w). While augmentations might alleviate this inconsistency, it is better to train models using MRI voxels that are consistent in terms of plane type. [This notebook](https://www.kaggle.com/ren4yu/normalized-voxels-align-planes-and-crop/data) shows we can obtain normalized voxels by appropriately rotating MRI voxels.\n\n### Normalized Voxel Datasets\nThe normalized voxels created the above procedure were stored as a dataset:\n\n- [64x64x64 voxel](https://www.kaggle.com/ren4yu/rsna-miccai-voxel-64-dataset)\n- [128x128x128 voxel](https://www.kaggle.com/ren4yu/rsna-miccai-voxel-128-dataset)\n- [256x256x256 voxel](https://www.kaggle.com/ren4yu/rsna-miccai-voxel-256-dataset)\n\nThe directory structure is as follows:\n\n```\nvoxel\n├── train\n│　　　├── 00000\n│　　　│　　　├── FLAIR.npy\n│　　　│　　　├── T1w.npy\n│　　　│　　　├── T1wCE.npy\n│　　　│　　　└── T2w.npy\n│　　　├── 00002\n│　　　│　　　├── FLAIR.npy\n...\n├── test\n│　　　├── 00001\n│　　　│　　　├── FLAIR.npy\n│　　　│　　　├── T1w.npy\n│　　　│　　　├── T1wCE.npy\n│　　　│　　　└── T2w.npy\n│　　　├── 00013\n│　　　│　　　├── FLAIR.npy\n```\n\nSome voxels do not exist because all images belonging to these scans are completely black:\n\n- ('train', '00109', 'FLAIR.npy')\n- ('train', '00123', 'T1w.npy')\n- ('train', '00123', 'T2w.npy')\n- ('train', '00709', 'FLAIR.npy')\n\nHopefully this work will help improve models.",
      "votes": 24
    },
    {
      "id": 1472829,
      "postDate": "2021-08-15T06:32:07.020Z",
      "content": "<p>You may want to try using compression - <code>np.savez_compressed</code></p>",
      "rawMarkdown": "You may want to try using compression - `np.savez_compressed`",
      "votes": 1
    },
    {
      "id": 1543619,
      "postDate": "2021-10-13T17:26:56.453Z",
      "content": "<p>how will your model improve if you decide to utilize mri planes (coronal, sagittal , axial) from dicom metadata , how would you even use in your model?</p>",
      "rawMarkdown": "how will your model improve if you decide to utilize mri planes (coronal, sagittal , axial) from dicom metadata , how would you even use in your model?\n"
    },
    {
      "id": 1532304,
      "postDate": "2021-10-02T19:49:11.930Z",
      "content": "<p><a href=\"https://www.kaggle.com/ren4yu\" target=\"_blank\">@ren4yu</a> <br>\nthanks for the sharing. however, have you checked the test data set properly. I've faced Notebook threw exception error in inference time? How to fix it? </p>",
      "rawMarkdown": "@ren4yu \nthanks for the sharing. however, have you checked the test data set properly. I've faced Notebook threw exception error in inference time? How to fix it? "
    },
    {
      "id": 1507249,
      "postDate": "2021-09-09T02:33:20.753Z",
      "content": "<p>Hi, thanks for your work. I have used your functions to normalize voxel data when submitting the hidden test. But unfortunately, I kept getting the error : \"Notebook threw exception\". Have you encountered this problem ? </p>",
      "rawMarkdown": "Hi, thanks for your work. I have used your functions to normalize voxel data when submitting the hidden test. But unfortunately, I kept getting the error : \"Notebook threw exception\". Have you encountered this problem ? ",
      "replies": [
        {
          "id": 1511305,
          "postDate": "2021-09-13T10:05:30.427Z",
          "content": "<p>Same.<br>\ndid you solve this?</p>",
          "rawMarkdown": "Same.\ndid you solve this?"
        }
      ]
    },
    {
      "id": 1472508,
      "postDate": "2021-08-14T23:03:43.213Z",
      "rawMarkdown": "",
      "isDeleted": true
    }
  ],
  "comments": [
    {
      "id": 1472829,
      "author_name": "Tim Yee",
      "author_url": "",
      "post_date": "2021-08-15T06:32:07.020000",
      "content": "<p>You may want to try using compression - <code>np.savez_compressed</code></p>",
      "votes": 1,
      "replies": []
    },
    {
      "id": 1543619,
      "author_name": "Kethupio",
      "author_url": "",
      "post_date": "2021-10-13T17:26:56.453000",
      "content": "<p>how will your model improve if you decide to utilize mri planes (coronal, sagittal , axial) from dicom metadata , how would you even use in your model?</p>",
      "votes": 0,
      "replies": []
    },
    {
      "id": 1532304,
      "author_name": "Simon Alerdic",
      "author_url": "",
      "post_date": "2021-10-02T19:49:11.930000",
      "content": "<p><a href=\"https://www.kaggle.com/ren4yu\" target=\"_blank\">@ren4yu</a> <br>\nthanks for the sharing. however, have you checked the test data set properly. I've faced Notebook threw exception error in inference time? How to fix it? </p>",
      "votes": 0,
      "replies": []
    },
    {
      "id": 1507249,
      "author_name": "Liam Nguyen",
      "author_url": "",
      "post_date": "2021-09-09T02:33:20.753000",
      "content": "<p>Hi, thanks for your work. I have used your functions to normalize voxel data when submitting the hidden test. But unfortunately, I kept getting the error : \"Notebook threw exception\". Have you encountered this problem ? </p>",
      "votes": 0,
      "replies": [
        {
          "id": 1511305,
          "author_name": "justhungryman",
          "author_url": "",
          "post_date": "2021-09-13T10:05:30.427000",
          "content": "<p>Same.<br>\ndid you solve this?</p>",
          "votes": 0,
          "replies": []
        }
      ]
    },
    {
      "id": 1472508,
      "author_name": "",
      "author_url": "",
      "post_date": "2021-08-14T23:03:43.213000",
      "content": "",
      "votes": 0,
      "replies": []
    }
  ],
  "raw_markdown_by_id": {
    "1472021": "### Normalized Voxels: Align Planes, Adjust Contrast, and Crop\nAs shown in several notebooks, MRI plane type (Axial, Coronal, and Sagittal) is not consistent among patients or MRI scan types (FLAIR, T1w, T1wCE, T2w). While augmentations might alleviate this inconsistency, it is better to train models using MRI voxels that are consistent in terms of plane type. [This notebook](https://www.kaggle.com/ren4yu/normalized-voxels-align-planes-and-crop/data) shows we can obtain normalized voxels by appropriately rotating MRI voxels.\n\n### Normalized Voxel Datasets\nThe normalized voxels created the above procedure were stored as a dataset:\n\n- [64x64x64 voxel](https://www.kaggle.com/ren4yu/rsna-miccai-voxel-64-dataset)\n- [128x128x128 voxel](https://www.kaggle.com/ren4yu/rsna-miccai-voxel-128-dataset)\n- [256x256x256 voxel](https://www.kaggle.com/ren4yu/rsna-miccai-voxel-256-dataset)\n\nThe directory structure is as follows:\n\n```\nvoxel\n├── train\n│　　　├── 00000\n│　　　│　　　├── FLAIR.npy\n│　　　│　　　├── T1w.npy\n│　　　│　　　├── T1wCE.npy\n│　　　│　　　└── T2w.npy\n│　　　├── 00002\n│　　　│　　　├── FLAIR.npy\n...\n├── test\n│　　　├── 00001\n│　　　│　　　├── FLAIR.npy\n│　　　│　　　├── T1w.npy\n│　　　│　　　├── T1wCE.npy\n│　　　│　　　└── T2w.npy\n│　　　├── 00013\n│　　　│　　　├── FLAIR.npy\n```\n\nSome voxels do not exist because all images belonging to these scans are completely black:\n\n- ('train', '00109', 'FLAIR.npy')\n- ('train', '00123', 'T1w.npy')\n- ('train', '00123', 'T2w.npy')\n- ('train', '00709', 'FLAIR.npy')\n\nHopefully this work will help improve models.",
    "1472829": "You may want to try using compression - `np.savez_compressed`",
    "1543619": "how will your model improve if you decide to utilize mri planes (coronal, sagittal , axial) from dicom metadata , how would you even use in your model?\n",
    "1532304": "@ren4yu \nthanks for the sharing. however, have you checked the test data set properly. I've faced Notebook threw exception error in inference time? How to fix it? ",
    "1507249": "Hi, thanks for your work. I have used your functions to normalize voxel data when submitting the hidden test. But unfortunately, I kept getting the error : \"Notebook threw exception\". Have you encountered this problem ? ",
    "1472508": ""
  }
}