richzhang / colorization-pytorch

PyTorch reimplementation of Interactive Deep Colorization
https://richzhang.github.io/ideepcolor/
MIT License
597 stars 113 forks source link

Global hints network #16

Closed dwangxxx closed 3 years ago

dwangxxx commented 3 years ago

Hello, Mr Zhang. I've read this source code, but I can't find the global hint module. In the pix2pix_model.py file, the forward module is as following:

def forward(self):
        (self.fake_B_class, self.fake_B_reg) = self.netG(self.real_A, self.hint_B, self.mask_B)
        self.fake_B_dec_max = self.netG.module.upsample4(util.decode_max_ab(self.fake_B_class, self.opt))
        self.fake_B_distr = self.netG.module.softmax(self.fake_B_class)

        self.fake_B_dec_mean = self.netG.module.upsample4(util.decode_mean(self.fake_B_distr, self.opt))

        self.fake_B_entr = self.netG.module.upsample4(-torch.sum(self.fake_B_distr * torch.log(self.fake_B_distr + 1.e-10), dim=1, keepdim=True))
        # embed()

The local hint module is applied, but I can't find the global hints module, and the ground truth of color distribution is also not calculated. Maybe I miss some important things, can you provide me some information? Thank you!

richzhang commented 3 years ago

The global hints network is not here. Thanks!

dwangxxx commented 3 years ago

The global hints network is not here. Thanks!

I see, thank you!