현재 master에서는 VGGFeatureExtractor 내에 condition이 위와 같이 잡혀 있습니다. is_ref=True (reference image)일 때, L map을 떼서 channel-wise tiling을 하여 vgg에 넣고, is_ref=False(target image)일 때, 그대로 vgg에 넣습니다. 각 condition에 사용되는 vgg는 알맞으나, 직전 condition이 수정되어야 할 것 같습니다.
if is_ref:
#if self.opt.ref_type == 'l' and x.size()[1] == 1:
# x = x.expand(-1, 3, -1, -1)
vgg_feature = self.vgg_ref(x, corr_feature=True)
else:
x = x[:, 0, :, :].unsqueeze(1).repeat(-1, 3, -1, -1)
_x의 1, 2 channel을 0으로 채우기_
vgg_feature = self.vgg_tar(x, corr_feature=True)
2가지 부분에 대해 이야기해보려고 합니다.
reference & target input
에 대한 condition 혼용 https://github.com/DongHwanJang/SPADE_Colorization/blob/fa0972714e932b488534802981dc76991f680a0a/models/networks/architecture.py#L335-L341현재 master에서는 VGGFeatureExtractor 내에 condition이 위와 같이 잡혀 있습니다.
is_ref=True
(reference image)일 때, L map을 떼서 channel-wise tiling을 하여 vgg에 넣고,is_ref=False
(target image)일 때, 그대로 vgg에 넣습니다. 각 condition에 사용되는 vgg는 알맞으나, 직전 condition이 수정되어야 할 것 같습니다.