wuhuikai / DeepGuidedFilter

Official Implementation of Fast End-to-End Trainable Guided Filter, CVPR 2018

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

which guided filtering function is self.gf called?

luojianp opened this issue · comments

Excuse me, in the "DeepGuidedFilter/ImageProcessing/DeepGuidedFilteringNetwork/module.py" script, in the DeepGuidedFilterGuidedMapConvGF function, which guided filtering function is self.gf called?
The three parameters OL, IL, Ih ,in the paper correspond to the variable in the code.
Thank you!

class DeepGuidedFilterGuidedMapConvGF(DeepGuidedFilterConvGF):
    def __init__(self, radius=1, dilation=0, c=16, layer=5):
        super(DeepGuidedFilterGuidedMapConvGF, self).__init__(radius, layer)
        self.guided_map = nn.Sequential(
            nn.Conv2d(3, c, 1, bias=False) if dilation==0 else \
                nn.Conv2d(3, c, 3, padding=dilation, dilation=dilation, bias=False),
            AdaptiveNorm(c),
            nn.LeakyReLU(0.2, inplace=True),
            nn.Conv2d(c, 3, 1)
        )
    def forward(self, x_lr, x_hr):
        return self.gf(self.guided_map(x_lr), self.lr(x_lr), self.guided_map(x_hr)).clamp(0, 1)