sunshineatnoon / LinearStyleTransfer

This is the Pytorch implementation of "Learning Linear Transformations for Fast Image and Video Style Transfer" (CVPR 2019).
https://sites.google.com/view/linear-style-transfer-cvpr19/
BSD 2-Clause "Simplified" License
379 stars 88 forks source link

请教consult #5

Closed gengyanlei closed 4 years ago

gengyanlei commented 5 years ago

Hello, how about style migration (without GAN), in the training process, can you use multiple pictures to train multiple pictures? The following is an example:

Suppose there are 3 pictures in category A and 3 pictures in category B. In the network training process, the first batch: A1 A2 corresponds to B1 training; the second batch A1 A2 corresponds to B2 training; the third batch A2 A3 corresponds to B3 Training, is this ok?

I checked your code and can only train multiple pictures for one picture. Maybe I understand the wrong code. Please feel free to answer my questions. Thank you very much.

您好,请问风格迁移(不使用GAN),在训练过程中,可以使用多张图片对应多张图片训练么?如下是一个例子:

假设A类有3张图片,B类也有3张图片,在网络训练过程中,第一批次:A1 A2 对应B1训练;第二批次A1 A2对应B2训练;第三批次A2 A3对应B3训练,这样可以么?

我查阅了您的代码,只能多张图片对应一张图片进行训练,也许是我理解错了您的代码,请您在闲暇之余,能解答一下我的疑问,十分感谢。

sunshineatnoon commented 4 years ago

Hi, we target at the task of arbitrary style transfer, where we transfer style from a single style image to a single content image. In the training code, I have a two dataloaders for the content images and style images respectively, each time a random pair of (content, style) is used for training.

After training, you can transfer styles from multiple images onto a single content image by feature interpolation. But during training, we only use a random pair of style image and content image each time.

sunshineatnoon commented 4 years ago

Close due to inactivity, please feel free to re-open.