Repository files navigation
3. Implementation Details
Facades dataset의 Training set에 대해 Input image와 Output image 각각에 대해 Mean과 STD를 계산하면 다음과 같습니다.
FACADES_INPUT_IMG_MEAN = (0.222 , 0.299 , 0.745 )
FACADES_INPUT_IMG_STD = (0.346 , 0.286 , 0.336 )
FACADES_OUTPUT_IMG_MEAN = (0.478 , 0.453 , 0.417 )
FACADES_OUTPUT_IMG_STD = (0.243 , 0.235 , 0.236 )
반면 다음과 같이 설정하면 모델에 입력되는 모든 tensors의 값이 $[-1, 1]$ 의 값을 갖게 됩니다.
FACADES_INPUT_IMG_MEAN = (0.5 , 0.5 , 0.5 )
FACADES_INPUT_IMG_STD = (0.5 , 0.5 , 0.5 )
FACADES_OUTPUT_IMG_MEAN = (0.5 , 0.5 , 0.5 )
FACADES_OUTPUT_IMG_STD = (0.5 , 0.5 , 0.5 )
두 가지 Settings를 가지고 실험을 해 본 결과, 후자의 학습 속도가 전자보다 빨랐습니다.
self.norm = nn.InstanceNorm2d(out_channels, affine=True, track_running_stats=False)로 설정 시 다음과 같이 모델이 생성한 이미지가 다음과 같이 Blurry했습니다.
self.norm = nn.InstanceNorm2d(out_channels, affine=False, track_running_stats=False)로 수정하자 이런 현상이 없어졌습니다.
Instance norm은 원래 기본적으로 track_running_stats=False을 사용합니다.
About
PyTorch implementation of 'Pix2Pix' (Isola et al., 2017) and training it on 'Facades' and Google Maps
Topics
Resources
Stars
Watchers
Forks
You can’t perform that action at this time.