DongHwanJang / SPADE_Colorization

Other
2 stars 0 forks source link

VGG Input 및 Condition 수정 필요 #39

Closed deepkyu closed 4 years ago

deepkyu commented 4 years ago

2가지 부분에 대해 이야기해보려고 합니다.

  1. 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이 수정되어야 할 것 같습니다.

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) 
  1. https://github.com/DongHwanJang/SPADE_Colorization/blob/fa0972714e932b488534802981dc76991f680a0a/models/pix2pix_model.py#L266-L268 netG에서 input되는 target_L과 reference_LAB가 이후에 vgg에 들어가기에 앞서, RGB format으로 변환되는 부분이 없습니다. https://github.com/DongHwanJang/SPADE_Colorization/blob/fa0972714e932b488534802981dc76991f680a0a/models/pix2pix_model.py#L80-L89 현재 target_L과 reference_LAB는 LAB format으로 들어가는 것 같은데 확인 부탁드립니다.
ThisIsIsaac commented 4 years ago

https://app.wandb.ai/eccv2020_best_paper/SPADE%20Colorization/runs/9i854cvh 여기서 돌아가고 있음

deepkyu commented 4 years ago

conf_map의 형태를 봤을 때는 이전보다 훨씬 더 잘 나오는 것으로 보임. 75000 steps 75000 steps 일 때 이미지 6500 steps 6500 steps 일 때 이미지

6500 step에서도 이전보다 뚜렷한 차이를 보이고 있음.