IMPORTANT CODE DOUBT pls help

doubts from below code-----

  1. IN THE BELOW UNET ARCHITECTURE DOWNSAMPLING PART I HAVE UNDERSTOOD BUT IN THE UPSAMPLING PART WHY MAXPOOLING IS NOT USED?

  2. I sTHE BELOW ARCHITECTURE U-NET OR U-NET++ OR double unet???

  3. WHY USING 24 FILTERS IN THIS LINE AS IN UNET NO. OF FILTERS SHOULD INCREASE AND DECRESE WITH MULTIPLE OF 2
    l = Conv2D(filters=24, kernel_size=(3,3), activation=‘relu’, kernel_initializer=‘he_normal’,padding=‘same’)(l)

#UPSAMPLING
c1 = Conv2D(filters=16, kernel_size=(3,3), activation=‘relu’, kernel_initializer=‘he_normal’,padding=‘same’)(input_layer)
l = MaxPool2D(strides=(2,2))(c1)
c2 = Conv2D(filters=32, kernel_size=(3,3), activation=‘relu’, kernel_initializer=‘he_normal’,padding=‘same’)(l)
l = MaxPool2D(strides=(2,2))(c2)
c3 = Conv2D(filters=64, kernel_size=(3,3), activation=‘relu’, kernel_initializer=‘he_normal’,padding=‘same’)(l)
l = MaxPool2D(strides=(2,2))(c3)
c4 = Conv2D(filters=64, kernel_size=(3,3), activation=‘relu’, kernel_initializer=‘he_normal’,padding=‘same’)(l)

#DOWNSAMPLING
l = concatenate([UpSampling2D(size=(2,2))(c4), c3], axis=-1)
l = Conv2D(filters=64, kernel_size=(3,3), activation=‘relu’, kernel_initializer=‘he_normal’,padding=‘same’)(l)
l = concatenate([UpSampling2D(size=(2,2))(l), c2], axis=-1)
l = Conv2D(filters=24, kernel_size=(3,3), activation=‘relu’, kernel_initializer=‘he_normal’,padding=‘same’)(l)
l = concatenate([UpSampling2D(size=(2,2))(l), c1], axis=-1)
l = Conv2D(filters=32, kernel_size=(3,3), activation=‘relu’, kernel_initializer=‘he_normal’,padding=‘same’)(l)
l = Conv2D(filters=128, kernel_size=(1,1), activation=‘relu’, kernel_initializer=‘he_normal’)(l)
l = Dropout(0.5)(l)
output_layer = Conv2D(filters=1, kernel_size=(1,1), activation=‘sigmoid’)(l)

MaxPooling is basically a way to downsample. It is basically a kind of filter which takes a max of multiple values to turn multiple values to single value.

There are many kinds of special-purpose architectures of CNN. I would say that refer to the documentation of U-Net.

There is no such rule that the total number of filters need to be a multiple of only 2. It is basically a result of hyperparameter tuning.

I would strongly recommend you to go thru our CNN chapter in order to get the idea of various terms.

1 Like