def __init__(self, params):
     super(Conditioner, self).__init__()
     params['num_channels'] = 1
     self.genblock1 = sm.GenericBlock(params)
     params['num_channels'] = 64
     self.genblock2 = sm.GenericBlock(params)
     self.genblock3 = sm.GenericBlock(params)
     self.maxpool = nn.MaxPool2d(kernel_size=params['pool'],
                                 stride=params['stride_pool'])
     self.tanh = nn.Tanh()
Beispiel #2
0
    def __init__(self, params):
        super(SDnetConditioner, self).__init__()
        se_block_type = se.SELayer.SSE
        params['num_channels'] = 2
        params['num_filters'] = 16
        self.encode1 = sm.SDnetEncoderBlock(params)

        params['num_channels'] = 16
        self.encode2 = sm.SDnetEncoderBlock(params)

        self.encode3 = sm.SDnetEncoderBlock(params)

        self.encode4 = sm.SDnetEncoderBlock(params)

        self.bottleneck = sm.GenericBlock(params)
        self.squeeze_conv_bn = nn.Conv2d(in_channels=params['num_filters'],
                                         out_channels=1,
                                         kernel_size=(1, 1),
                                         padding=(0, 0),
                                         stride=1)
        params['num_channels'] = 16
        self.decode1 = sm.SDnetDecoderBlock(params)
        self.decode2 = sm.SDnetDecoderBlock(params)
        self.decode3 = sm.SDnetDecoderBlock(params)
        self.decode4 = sm.SDnetDecoderBlock(params)
        params['num_channels'] = 16
        self.classifier = sm.ClassifierBlock(params)
        self.sigmoid = nn.Sigmoid()
Beispiel #3
0
    def __init__(self, params):
        super(SDnetConditioner, self).__init__()
        se_block_type = se.SELayer.SSE
        params['num_channels'] = 2
        params['num_filters'] = 16
        self.encode1 = sm.SDnetEncoderBlock(params)

        params['num_channels'] = 16

        self.encode2 = sm.SDnetEncoderBlock(params)

        self.encode3 = sm.SDnetEncoderBlock(params)

        self.encode4 = sm.SDnetEncoderBlock(params)

        self.bottleneck = sm.GenericBlock(params)

        params['num_channels'] = 16

        self.decode1 = sm.SDnetDecoderBlock(params)
        self.channel_conv_d1 = nn.Linear(params['num_filters'], 64, bias=True)

        self.decode2 = sm.SDnetDecoderBlock(params)
        self.channel_conv_d2 = nn.Linear(params['num_filters'], 64, bias=True)

        self.decode3 = sm.SDnetDecoderBlock(params)
        self.channel_conv_d3 = nn.Linear(params['num_filters'], 64, bias=True)

        self.decode4 = sm.SDnetDecoderBlock(params)
        self.channel_conv_d4 = nn.Linear(params['num_filters'], 64, bias=True)

        params['num_channels'] = 16

        self.classifier = sm.ClassifierBlock(params)
        self.sigmoid = nn.Sigmoid()
 def __init__(self, params):
     super(SDnetConditioner, self).__init__()
     params['num_channels'] = 1
     params['num_filters'] = 64
     self.encode1 = sm.SDnetEncoderBlock(params)
     params['num_channels'] = 64
     self.encode2 = sm.SDnetEncoderBlock(params)
     self.encode3 = sm.SDnetEncoderBlock(params)
     self.bottleneck = sm.GenericBlock(params)
     params['num_channels'] = 128
     self.decode1 = sm.SDnetDecoderBlock(params)
     self.squeeze_conv_d1 = nn.Conv2d(in_channels=params['num_filters'], out_channels=1,
                                    kernel_size=(1, 1),
                                    padding=(0, 0),
                                    stride=1)
     self.decode2 = sm.SDnetDecoderBlock(params)
     self.squeeze_conv_d2 = nn.Conv2d(in_channels=params['num_filters'], out_channels=1,
                                    kernel_size=(1, 1),
                                    padding=(0, 0),
                                    stride=1)
     self.decode3 = sm.SDnetDecoderBlock(params)
     self.squeeze_conv_d3 = nn.Conv2d(in_channels=params['num_filters'], out_channels=1,
                                    kernel_size=(1, 1),
                                    padding=(0, 0),
                                    stride=1)
     params['num_channels'] = 64
     self.classifier = sm.ClassifierBlock(params)
     self.sigmoid = nn.Sigmoid()
    def __init__(self, params):
        super(SDnetConditioner, self).__init__()
        params['num_channels'] = 2
        params['num_filters'] = 16
        self.encode1 = sm.SDnetEncoderBlock(params)

        params['num_channels'] = 16
        self.encode2 = sm.SDnetEncoderBlock(params)

        self.encode3 = sm.SDnetEncoderBlock(params)

        self.encode4 = sm.SDnetEncoderBlock(params)

        self.bottleneck = sm.GenericBlock(params)

        params['num_channels'] = 16
        self.decode1 = sm.SDnetDecoderBlock(params)

        self.decode2 = sm.SDnetDecoderBlock(params)

        self.decode3 = sm.SDnetDecoderBlock(params)

        self.decode4 = sm.SDnetDecoderBlock(params)

        params['num_channels'] = 16
        self.classifier = sm.ClassifierBlock(params)
        self.sigmoid = nn.Sigmoid()

        self.fc_layer = nn.Linear(params['num_filters'], 64, bias=True)
 def __init__(self, params):
     super(Conditioner, self).__init__()
     params['num_channels'] = 1
     params['num_filters'] = 32
     self.genblock1 = sm.GenericBlock(params)
     self.squeeze_conv1 = nn.Conv2d(in_channels=params['num_filters'],
                                    out_channels=1,
                                    kernel_size=(1, 1),
                                    padding=(0, 0),
                                    stride=1)
     params['num_channels'] = params['num_filters']
     params['num_filters'] = 64
     self.genblock2 = sm.GenericBlock(params)
     self.squeeze_conv2 = nn.Conv2d(in_channels=params['num_filters'],
                                    out_channels=1,
                                    kernel_size=(1, 1),
                                    padding=(0, 0),
                                    stride=1)
     params['num_channels'] = params['num_filters']
     params['num_filters'] = 128
     self.genblock3 = sm.GenericBlock(params)
     self.squeeze_conv3 = nn.Conv2d(in_channels=params['num_filters'],
                                    out_channels=1,
                                    kernel_size=(1, 1),
                                    padding=(0, 0),
                                    stride=1)
     params['num_channels'] = params['num_filters']
     params['num_filters'] = 256
     self.genblock4 = sm.GenericBlock(params)
     self.squeeze_conv4 = nn.Conv2d(in_channels=params['num_filters'],
                                    out_channels=1,
                                    kernel_size=(1, 1),
                                    padding=(0, 0),
                                    stride=1)
     params['num_channels'] = params['num_filters']
     params['num_filters'] = 512
     self.genblock5 = sm.GenericBlock(params)
     self.squeeze_conv5 = nn.Conv2d(in_channels=params['num_filters'],
                                    out_channels=1,
                                    kernel_size=(1, 1),
                                    padding=(0, 0),
                                    stride=1)
     self.maxpool = nn.MaxPool2d(kernel_size=params['pool'],
                                 stride=params['stride_pool'])
     self.sigmoid = nn.Sigmoid()
Beispiel #7
0
 def __init__(self, params):
     super(SDnetSegmentor, self).__init__()
     params['num_channels'] = 1
     params['num_filters'] = 64
     self.encode1 = sm.SDnetEncoderBlock(params)
     params['num_channels'] = 64
     self.encode2 = sm.SDnetEncoderBlock(params)
     self.encode3 = sm.SDnetEncoderBlock(params)
     self.bottleneck = sm.GenericBlock(params)
     params['num_channels'] = 128
     self.decode1 = sm.SDnetDecoderBlock(params)
     self.decode2 = sm.SDnetDecoderBlock(params)
     self.decode3 = sm.SDnetDecoderBlock(params)
     params['num_channels'] = 64
     self.classifier = sm.ClassifierBlock(params)
    def __init__(self, params):
        super(SDnetSegmentor, self).__init__()
        params['num_channels'] = 1
        params['num_filters'] = 64
        self.encode1 = sm.SDnetEncoderBlock(params)
        params['num_channels'] = 64 + 16
        self.encode2 = sm.SDnetEncoderBlock(params)
        self.encode3 = sm.SDnetEncoderBlock(params)
        self.encode4 = sm.SDnetEncoderBlock(params)
        self.bottleneck = sm.GenericBlock(params)

        self.decode1 = sm.SDnetDecoderBlock(params)
        self.decode2 = sm.SDnetDecoderBlock(params)
        self.decode3 = sm.SDnetDecoderBlock(params)
        self.decode4 = sm.SDnetDecoderBlock(params)
        params['num_channels'] = 64
        self.classifier = sm.ClassifierBlock(params)
        self.soft_max = nn.Softmax2d()
        self.sigmoid = nn.Sigmoid()
Beispiel #9
0
 def __init__(self, params):
     super(SDnetSegmentor, self).__init__()
     se_block_type = se.SELayer.SSE
     params['num_channels'] = 1
     params['num_filters'] = 64
     self.encode1 = sm.SDnetEncoderBlock(params)
     params['num_channels'] = 64
     self.encode2 = sm.SDnetEncoderBlock(params)
     self.encode3 = sm.SDnetEncoderBlock(params)
     self.encode4 = sm.SDnetEncoderBlock(params)
     self.bottleneck = sm.GenericBlock(params)
     params['num_channels'] = 128
     self.decode1 = sm.SDnetDecoderBlock(params)
     self.decode2 = sm.SDnetDecoderBlock(params)
     self.decode3 = sm.SDnetDecoderBlock(params)
     self.decode4 = sm.SDnetDecoderBlock(params)
     params['num_channels'] = 64
     self.classifier = sm.ClassifierBlock(params)
     self.soft_max = nn.Softmax2d()
    def __init__(self, params):
        super(SDnetConditioner, self).__init__()
        se_block_type = se.SELayer.SSE
        params['num_channels'] = 2
        params['num_filters'] = 16
        self.encode1 = sm.SDnetEncoderBlock(params)
        params['num_channels'] = 16
        self.encode2 = sm.SDnetEncoderBlock(params)

        self.encode3 = sm.SDnetEncoderBlock(params)

        self.encode4 = sm.SDnetEncoderBlock(params)

        self.bottleneck = sm.GenericBlock(params)

        self.decode1 = sm.SDnetDecoderBlock(params)

        self.decode2 = sm.SDnetDecoderBlock(params)

        self.decode3 = sm.SDnetDecoderBlock(params)

        self.decode4 = sm.SDnetDecoderBlock(params)