1
$\begingroup$

I was working on a CNN for HDR image generation from LDR images. I used an encoder-decoder architecture and merged the input with the decoder output. However I'm getting some banding artifacts in the model prediction as shown.

1)Input LDR image

Input LDR Image

2) Ground Truth HDR

Ground Truth HDR

3) Predicted output

Predicted Output

Notice the fine bands in the prediction. What might be causing these bands? Also I trained only for 20 epochs yet. Is the problem due to inadequate training? Here's my model:

 class TestNet2(nn.Module):
    def __init__(self):
        super(TestNet2, self).__init__()

    def enclayer(nIn, nOut, k, s, p, d=1):
        return nn.Sequential(
            nn.Conv2d(nIn, nOut, k, s, p, d), nn.SELU(inplace=True)
        )
    def declayer(nIn, nOut, k, s, p):
        return nn.Sequential(
            nn.ConvTranspose2d(nIn, nOut, k, s, p), nn.SELU(inplace=True)
        )

    self.encoder = nn.Sequential(
        enclayer(3,64,5,3,1),
        #nn.MaxPool2d(2, stride=2),
        enclayer(64,128,5,3,1),
        #nn.MaxPool2d(2, stride=2),
        enclayer(128,256,5,3,1),
        #nn.MaxPool2d(2, stride=2),
    )
    self.decoder = nn.Sequential(
        declayer(256,128,5,3,1),
        declayer(128,64,5,3,1),
        declayer(64,3,5,3,1),


    )

  def forward(self, x):
      xc=x
      x = self.encoder(x)
      x = self.decoder(x)
      x = F.interpolate(
        x, (512, 512), mode='bilinear', align_corners=False
      )
      x=x+xc
      return x
$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.