1999×960 93.3 KB Image_01L999×960 64.2 KB Image_01L_2ndHO999×960 11.9 KB
this is the mask, segmentation result and the input image
Is that overfitting or something else?my dice coefficient  was stable at 0.9685 for about 7 epoches.
my model is consists of two Unet which I think is not complicated.The conv block looks just like this
class BasicResBlock(nn.Module):
    def __init__(self, in_channels, out_channels):
        super(BasicResBlock, self).__init__()
        self.double_conv = nn.Sequential(
            nn.Conv2d(in_channels, out_channels, kernel_size=3, padding=1),
            nn.BatchNorm2d(out_channels),
            nn.ReLU(),
            nn.Conv2d(out_channels, out_channels, kernel_size=3, padding=1),
            nn.BatchNorm2d(out_channels)
        )
        self.cov1x1 = nn.Sequential(  # 调节通道数
            nn.Conv2d(in_channels, out_channels, kernel_size=1, padding=0),
            nn.BatchNorm2d(out_channels),
            nn.ReLU())

    def forward(self, x):
        res = self.cov1x1(x)
        x = self.double_conv(x)
        return F.relu(res + x)

My model output 2 results,coarse and refine, and I set the loss like this
coarse_mask, refine= net(imgs)
                loss1 = criterion1(coarse_mask, true_masks)
                loss2 = criterion1(refine, true_masks)
                loss =0.8*loss1 +loss2

I really need some advice!!!Thank you!!!