Model for "Quick segmentation of NeuroAnaTomy (QuickNAT) based on a deep fully convolutional neural network. Refer to: "QuickNAT: A Fully Convolutional Network for Quick and Accurate Segmentation of Neuroanatomy by Abhijit Guha Roya, Sailesh Conjetib, Nassir Navabb, Christian Wachingera
| 278 | |
| 279 | |
| 280 | class Quicknat(nn.Module): |
| 281 | """ |
| 282 | Model for "Quick segmentation of NeuroAnaTomy (QuickNAT) based on a deep fully convolutional neural network. |
| 283 | Refer to: "QuickNAT: A Fully Convolutional Network for Quick and Accurate Segmentation of Neuroanatomy by |
| 284 | Abhijit Guha Roya, Sailesh Conjetib, Nassir Navabb, Christian Wachingera" |
| 285 | |
| 286 | QuickNAT has an encoder/decoder like 2D F-CNN architecture with 4 encoders and 4 decoders separated by a bottleneck layer. |
| 287 | The final layer is a classifier block with softmax. |
| 288 | The architecture includes skip connections between all encoder and decoder blocks of the same spatial resolution, |
| 289 | similar to the U-Net architecture. |
| 290 | All Encoder and Decoder consist of three convolutional layers all with a Batch Normalization and ReLU. |
| 291 | The first two convolutional layers are followed by a concatenation layer that concatenates |
| 292 | the input feature map with outputs of the current and previous convolutional blocks. |
| 293 | The kernel size of the first two convolutional layers is 5*5, the third convolutional layer has a kernel size of 1*1. |
| 294 | |
| 295 | Data in the encode path is downsampled using max pooling layers instead of upsamling like UNet and in the decode path |
| 296 | upsampled using max un-pooling layers instead of transpose convolutions. |
| 297 | The pooling is done at the beginning of the block and the unpool afterwards. |
| 298 | The indices of the max pooling in the Encoder are forwarded through the layer to be available to the corresponding Decoder. |
| 299 | |
| 300 | The bottleneck block consists of a 5 * 5 convolutional layer and a batch normalization layer |
| 301 | to separate the encoder and decoder part of the network, |
| 302 | restricting information flow between the encoder and decoder. |
| 303 | |
| 304 | The output feature map from the last decoder block is passed to the classifier block, |
| 305 | which is a convolutional layer with 1 * 1 kernel size that maps the input to an N channel feature map, |
| 306 | where N is the number of segmentation classes. |
| 307 | |
| 308 | To further explain this consider the first example network given below. This network has 3 layers with strides |
| 309 | of 2 for each of the middle layers (the last layer is the bottom connection which does not down/up sample). Input |
| 310 | data to this network is immediately reduced in the spatial dimensions by a factor of 2 by the first convolution of |
| 311 | the residual unit defining the first layer of the encode part. The last layer of the decode part will upsample its |
| 312 | input (data from the previous layer concatenated with data from the skip connection) in the first convolution. this |
| 313 | ensures the final output of the network has the same shape as the input. |
| 314 | |
| 315 | The original QuickNAT implementation included a `enable_test_dropout()` mechanism for uncertainty estimation during |
| 316 | testing. As the dropout layers are the only stochastic components of this network calling the train() method instead |
| 317 | of eval() in testing or inference has the same effect. |
| 318 | |
| 319 | Args: |
| 320 | num_classes: number of classes to segmentate (output channels). |
| 321 | num_channels: number of input channels. |
| 322 | num_filters: number of output channels for each convolutional layer in a Dense Block. |
| 323 | kernel_size: size of the kernel of each convolutional layer in a Dense Block. |
| 324 | kernel_c: convolution kernel size of classifier block kernel. |
| 325 | stride_convolution: convolution stride. Defaults to 1. |
| 326 | pool: kernel size of the pooling layer, |
| 327 | stride_pool: stride for the pooling layer. |
| 328 | se_block: Squeeze and Excite block type to be included, defaults to None. Valid options : NONE, CSE, SSE, CSSE, |
| 329 | droup_out: dropout ratio. Defaults to no dropout. |
| 330 | act: activation type and arguments. Defaults to PReLU. |
| 331 | norm: feature normalization type and arguments. Defaults to instance norm. |
| 332 | adn_ordering: a string representing the ordering of activation (A), normalization (N), and dropout (D). |
| 333 | Defaults to "NA". See also: :py:class:`monai.networks.blocks.ADN`. |
| 334 | |
| 335 | Examples:: |
| 336 | |
| 337 | from monai.networks.nets import QuickNAT |
no outgoing calls
searching dependent graphs…