monai
medical
katielink commited on
Commit
362a1dc
1 Parent(s): 7712592

Fix dimension according to MONAI 1.0 and fix readme file

Browse files
README.md CHANGED
@@ -12,7 +12,7 @@ We provide the pre-trained model for inferencing whole brain segmentation with 1
12
  A tutorial and release of model for whole brain segmentation using the 3D transformer-based segmentation model UNEST.
13
 
14
  Authors:
15
- Xin Yu (xin.yu@vanderbilt.edu) (Primary)
16
 
17
  Yinchi Zhou (yinchi.zhou@vanderbilt.edu) | Yucheng Tang (yuchengt@nvidia.com)
18
 
@@ -53,19 +53,18 @@ Among 50 T1w MRI scans from Open Access Series on Imaging Studies (OASIS) (Marcu
53
 
54
  ### Important
55
 
56
- ```diff
57
- + All the brain MRI images for training are registered to Affine registration from the target image to the MNI305 template using NiftyReg.
58
- + The data should be in the MNI305 space before inference.
59
 
 
60
 
 
61
  Registration to MNI Space: Sample suggestion. E.g., use ANTS or other tools for registering T1 MRI image to MNI305 Space.
62
 
63
-
64
  ```
65
  pip install antspyx
66
- ```
67
- Sample ANTS registration
68
- ```
69
 
70
  import ants
71
  import sys
@@ -77,8 +76,8 @@ transform = ants.registration(fixed_image,moving_image,'Affine')
77
 
78
  reg3t = ants.apply_transforms(fixed_image,moving_image,transform['fwdtransforms'][0])
79
  ants.image_write(reg3t,output_image_path)
80
-
81
  ```
 
82
  ## Training configuration
83
  The training and inference was performed with at least one 24GB-memory GPU.
84
 
@@ -96,7 +95,6 @@ Add scripts component: To run the workflow with customized components, PYTHONPA
96
 
97
  ```
98
  export PYTHONPATH=$PYTHONPATH: '<path to the bundle root dir>/scripts'
99
-
100
  ```
101
 
102
 
 
12
  A tutorial and release of model for whole brain segmentation using the 3D transformer-based segmentation model UNEST.
13
 
14
  Authors:
15
+ Xin Yu (xin.yu@vanderbilt.edu)
16
 
17
  Yinchi Zhou (yinchi.zhou@vanderbilt.edu) | Yucheng Tang (yuchengt@nvidia.com)
18
 
 
53
 
54
  ### Important
55
 
56
+ The brain MRI images for training are registered to Affine registration from the target image to the MNI305 template using NiftyReg.
57
+ The data should be in the MNI305 space before inference.
 
58
 
59
+ If your images are already in MNI space, skip the registration step.
60
 
61
+ You could use any resitration tool to register image to MNI space. Here is an example using ants.
62
  Registration to MNI Space: Sample suggestion. E.g., use ANTS or other tools for registering T1 MRI image to MNI305 Space.
63
 
 
64
  ```
65
  pip install antspyx
66
+
67
+ #Sample ANTS registration
 
68
 
69
  import ants
70
  import sys
 
76
 
77
  reg3t = ants.apply_transforms(fixed_image,moving_image,transform['fwdtransforms'][0])
78
  ants.image_write(reg3t,output_image_path)
 
79
  ```
80
+
81
  ## Training configuration
82
  The training and inference was performed with at least one 24GB-memory GPU.
83
 
 
95
 
96
  ```
97
  export PYTHONPATH=$PYTHONPATH: '<path to the bundle root dir>/scripts'
 
98
  ```
99
 
100
 
configs/metadata.json CHANGED
@@ -1,7 +1,8 @@
1
  {
2
  "schema": "https://github.com/Project-MONAI/MONAI-extra-test-data/releases/download/0.8.1/meta_schema_20220324.json",
3
- "version": "0.1.0",
4
  "changelog": {
 
5
  "0.1.0": "complete the model package"
6
  },
7
  "monai_version": "0.9.1",
 
1
  {
2
  "schema": "https://github.com/Project-MONAI/MONAI-extra-test-data/releases/download/0.8.1/meta_schema_20220324.json",
3
+ "version": "0.1.1",
4
  "changelog": {
5
+ "0.1.1": "Fix dimension according to MONAI 1.0 and fix readme file",
6
  "0.1.0": "complete the model package"
7
  },
8
  "monai_version": "0.9.1",
docs/README.md CHANGED
@@ -5,7 +5,7 @@ We provide the pre-trained model for inferencing whole brain segmentation with 1
5
  A tutorial and release of model for whole brain segmentation using the 3D transformer-based segmentation model UNEST.
6
 
7
  Authors:
8
- Xin Yu (xin.yu@vanderbilt.edu) (Primary)
9
 
10
  Yinchi Zhou (yinchi.zhou@vanderbilt.edu) | Yucheng Tang (yuchengt@nvidia.com)
11
 
@@ -46,19 +46,18 @@ Among 50 T1w MRI scans from Open Access Series on Imaging Studies (OASIS) (Marcu
46
 
47
  ### Important
48
 
49
- ```diff
50
- + All the brain MRI images for training are registered to Affine registration from the target image to the MNI305 template using NiftyReg.
51
- + The data should be in the MNI305 space before inference.
52
 
 
53
 
 
54
  Registration to MNI Space: Sample suggestion. E.g., use ANTS or other tools for registering T1 MRI image to MNI305 Space.
55
 
56
-
57
  ```
58
  pip install antspyx
59
- ```
60
- Sample ANTS registration
61
- ```
62
 
63
  import ants
64
  import sys
@@ -70,8 +69,8 @@ transform = ants.registration(fixed_image,moving_image,'Affine')
70
 
71
  reg3t = ants.apply_transforms(fixed_image,moving_image,transform['fwdtransforms'][0])
72
  ants.image_write(reg3t,output_image_path)
73
-
74
  ```
 
75
  ## Training configuration
76
  The training and inference was performed with at least one 24GB-memory GPU.
77
 
@@ -89,7 +88,6 @@ Add scripts component: To run the workflow with customized components, PYTHONPA
89
 
90
  ```
91
  export PYTHONPATH=$PYTHONPATH: '<path to the bundle root dir>/scripts'
92
-
93
  ```
94
 
95
 
 
5
  A tutorial and release of model for whole brain segmentation using the 3D transformer-based segmentation model UNEST.
6
 
7
  Authors:
8
+ Xin Yu (xin.yu@vanderbilt.edu)
9
 
10
  Yinchi Zhou (yinchi.zhou@vanderbilt.edu) | Yucheng Tang (yuchengt@nvidia.com)
11
 
 
46
 
47
  ### Important
48
 
49
+ The brain MRI images for training are registered to Affine registration from the target image to the MNI305 template using NiftyReg.
50
+ The data should be in the MNI305 space before inference.
 
51
 
52
+ If your images are already in MNI space, skip the registration step.
53
 
54
+ You could use any resitration tool to register image to MNI space. Here is an example using ants.
55
  Registration to MNI Space: Sample suggestion. E.g., use ANTS or other tools for registering T1 MRI image to MNI305 Space.
56
 
 
57
  ```
58
  pip install antspyx
59
+
60
+ #Sample ANTS registration
 
61
 
62
  import ants
63
  import sys
 
69
 
70
  reg3t = ants.apply_transforms(fixed_image,moving_image,transform['fwdtransforms'][0])
71
  ants.image_write(reg3t,output_image_path)
 
72
  ```
73
+
74
  ## Training configuration
75
  The training and inference was performed with at least one 24GB-memory GPU.
76
 
 
88
 
89
  ```
90
  export PYTHONPATH=$PYTHONPATH: '<path to the bundle root dir>/scripts'
 
91
  ```
92
 
93
 
scripts/networks/unest_base_patch_4.py CHANGED
@@ -187,7 +187,7 @@ class UNesT(nn.Module):
187
  res_block=res_block,
188
  )
189
  self.encoder10 = Convolution(
190
- dimensions=3,
191
  in_channels=32 * feature_size,
192
  out_channels=64 * feature_size,
193
  strides=2,
 
187
  res_block=res_block,
188
  )
189
  self.encoder10 = Convolution(
190
+ spatial_dims=3,
191
  in_channels=32 * feature_size,
192
  out_channels=64 * feature_size,
193
  strides=2,