sunshineatnoon / PytorchWCT

This is the Pytorch implementation of Universal Style Transfer via Feature Transforms.
MIT License
359 stars 100 forks source link

Why Im5 is not used in styleTransfer ? #6

Closed edwin0cheng closed 6 years ago

edwin0cheng commented 6 years ago

`def styleTransfer(contentImg,styleImg,imname,csF):

sF5 = wct.e5(styleImg)
cF5 = wct.e5(contentImg)
sF5 = sF5.data.cpu().squeeze(0)
cF5 = cF5.data.cpu().squeeze(0)
csF5 = wct.transform(cF5,sF5,csF,args.alpha)
Im5 = wct.d5(csF5)

sF4 = wct.e4(styleImg)
cF4 = wct.e4(contentImg)  <---- This should be Im5 ?
sF4 = sF4.data.cpu().squeeze(0)
cF4 = cF4.data.cpu().squeeze(0)
csF4 = wct.transform(cF4,sF4,csF,args.alpha)
Im4 = wct.d4(csF4)`
sunshineatnoon commented 6 years ago

Because Im4 gives visually better results. Of course you can use Im5 too.