Repository: Project-MONAI/MONAI

Issue:
Error in citation
Hi,
this architecture seems to be a reimplementation of the dynamic U-net used by nnU-Net:

https://github.com/Project-MONAI/MONAI/blob/74a89f8eb2e1aa376e32b481f1bf5ffe11caca92/monai/networks/nets/nnunet.py#L20

However, the paper you are providing as reference is my BraTS 2018 contribution which has nothing to do with that (it has a rather unfortunate Title, though :-) ):
No New-Net <https://arxiv.org/pdf/1809.10483.pdf>

It would be great if you could cite the correct paper(s): https://arxiv.org/abs/1904.08128, https://arxiv.org/abs/1809.10486

As a side-note: nnU-Net is so much more than the architecture. Automated configuration of the entire pipeline is the key contribution. In fact (and as we attempted to highlight by choosing the name) the architecture is quite irrelevant (as long as it is kind of okay-ish). So naming the dynamic U-Net architecture nnUNet seems misleading. 

Best,
Fabian



Discussion:

Resolving patch:
diff --git a/monai/networks/blocks/nnunet_block.py b/monai/networks/blocks/nnunet_block.py
--- a/monai/networks/blocks/nnunet_block.py
+++ b/monai/networks/blocks/nnunet_block.py
@@ -21,8 +21,9 @@
 
 class UnetResBlock(nn.Module):
     """
-    A skip-connection based module that can be used for:
-        `No New-Net <https://arxiv.org/pdf/1809.10483.pdf>`_.
+    A skip-connection based module that can be used for NNUNet, based on:
+    `Automated Design of Deep Learning Methods for Biomedical Image Segmentation <https://arxiv.org/abs/1904.08128>`_.
+    `nnU-Net: Self-adapting Framework for U-Net-Based Medical Image Segmentation <https://arxiv.org/abs/1809.10486>`_.
 
     Args:
         spatial_dims: number of spatial dimensions.
@@ -95,8 +96,9 @@ def forward(self, inp):
 
 class UnetBasicBlock(nn.Module):
     """
-    A CNN module module that can be used for:
-        `No New-Net <https://arxiv.org/pdf/1809.10483.pdf>`_.
+    A CNN module module that can be used for NNUNet, based on:
+    `Automated Design of Deep Learning Methods for Biomedical Image Segmentation <https://arxiv.org/abs/1904.08128>`_.
+    `nnU-Net: Self-adapting Framework for U-Net-Based Medical Image Segmentation <https://arxiv.org/abs/1809.10486>`_.
 
     Args:
         spatial_dims: number of spatial dimensions.
@@ -151,8 +153,9 @@ def forward(self, inp):
 
 class UnetUpBlock(nn.Module):
     """
-    An upsampling module that can be used for:
-        `No New-Net <https://arxiv.org/pdf/1809.10483.pdf>`_.
+    An upsampling module that can be used for NNUNet, based on:
+    `Automated Design of Deep Learning Methods for Biomedical Image Segmentation <https://arxiv.org/abs/1904.08128>`_.
+    `nnU-Net: Self-adapting Framework for U-Net-Based Medical Image Segmentation <https://arxiv.org/abs/1809.10486>`_.
 
     Args:
         spatial_dims: number of spatial dimensions.
diff --git a/monai/networks/nets/ahnet.py b/monai/networks/nets/ahnet.py
--- a/monai/networks/nets/ahnet.py
+++ b/monai/networks/nets/ahnet.py
@@ -333,7 +333,7 @@ class AHNet(nn.Module):
     AHNet based on `Anisotropic Hybrid Network <https://arxiv.org/pdf/1711.08580.pdf>`_.
     Adapted from `lsqshr's official code <https://github.com/lsqshr/AH-Net/blob/master/net3d.py>`_.
     The model supports 2D or 3D inputs, as for the original 3D version.
-    To meet to requirements of the structure, the input size of the first ``dim-1`` dimensions should be divided
+    To meet to requirements of the structure, the input size of the first ``dim-1`` dimensions should be divisible
     by 32 and no less than 128. If you need to use lower sizes, please reduce the largest blocks in PSP
     module and change the ``num_input_features`` in Final module.
     In addition, to utilize the "transpose" upsample mode, please ensure that the input size of the first ``dim-1`` dimensions
diff --git a/monai/networks/nets/nnunet.py b/monai/networks/nets/nnunet.py
--- a/monai/networks/nets/nnunet.py
+++ b/monai/networks/nets/nnunet.py
@@ -19,7 +19,10 @@
 
 class NNUnet(nn.Module):
     """
-    NNUnet based on: `No New-Net <https://arxiv.org/pdf/1809.10483.pdf>`_.
+    This reimplementation of NNUnet is based on:
+    `Automated Design of Deep Learning Methods for Biomedical Image Segmentation <https://arxiv.org/abs/1904.08128>`_.
+    `nnU-Net: Self-adapting Framework for U-Net-Based Medical Image Segmentation <https://arxiv.org/abs/1809.10486>`_.
+
     This model is more flexible compared with ``monai.networks.nets.UNet`` in three
     places:
 
@@ -83,6 +86,7 @@ def __init__(
         self.deep_supr_num = deep_supr_num
         self.apply(self.initialize_weights)
         self.check_kernel_stride()
+        self.check_deep_supr_num()
 
     def check_kernel_stride(self):
         kernels, strides = self.kernel_size, self.strides


Test patch:
diff --git a/tests/test_ahnet.py b/tests/test_ahnet.py
--- a/tests/test_ahnet.py
+++ b/tests/test_ahnet.py
@@ -47,6 +47,11 @@
     torch.randn(2, 1, 128, 128),
     (2, 2, 128, 128),
 ]
+TEST_CASE_AHNET_2D_3 = [
+    {"spatial_dims": 2, "upsample_mode": "bilinear", "out_channels": 2},
+    torch.randn(2, 1, 160, 128),
+    (2, 2, 160, 128),
+]
 TEST_CASE_AHNET_3D_1 = [
     {"spatial_dims": 3, "upsample_mode": "trilinear"},
     torch.randn(3, 1, 128, 128, 64),
@@ -57,6 +62,11 @@
     torch.randn(2, 1, 128, 128, 64),
     (2, 2, 128, 128, 64),
 ]
+TEST_CASE_AHNET_3D_3 = [
+    {"spatial_dims": 3, "upsample_mode": "trilinear", "out_channels": 2},
+    torch.randn(2, 1, 160, 128, 64),
+    (2, 2, 160, 128, 64),
+]
 TEST_CASE_AHNET_3D_WITH_PRETRAIN_1 = [
     {"spatial_dims": 3, "upsample_mode": "trilinear"},
     torch.randn(3, 1, 128, 128, 64),
@@ -92,7 +102,16 @@ def test_mcfcn_shape(self, input_param, input_data, expected_shape):
 
 
 class TestAHNET(unittest.TestCase):
-    @parameterized.expand([TEST_CASE_AHNET_2D_1, TEST_CASE_AHNET_2D_2, TEST_CASE_AHNET_3D_1, TEST_CASE_AHNET_3D_2])
+    @parameterized.expand(
+        [
+            TEST_CASE_AHNET_2D_1,
+            TEST_CASE_AHNET_2D_2,
+            TEST_CASE_AHNET_2D_3,
+            TEST_CASE_AHNET_3D_1,
+            TEST_CASE_AHNET_3D_2,
+            TEST_CASE_AHNET_3D_3,
+        ]
+    )
     def test_ahnet_shape(self, input_param, input_data, expected_shape):
         net = AHNet(**input_param)
         net.eval()