Recommended PyTorch Style Transfer Package

Hello Community,

Any recommendation on PyTorch Style Transfer package? I would need it to overcome problems of domain shift in a OCT dataset. Essentially, it is a dataset of retina photos taken with different lenses that result in drastically different visual appearance. My intention is to use style transfer as a means to generate more training samples for each lens type from pictures taken with other lenses.

1 Like

There’s a fastai2 implementation here.

You could also look into cycleGANs if you have enough data.

Hope this helps!


Also @lgvaz has been working on a package faststyle:


Thanks for sharing… I was looking for this but forgot about it! :slight_smile:

1 Like

Great topic, I was interested also in StyleGAN (adaptive instance normalization), BigGAN and SANGAN.

Thanks a lot! How much data you usually need for cycleGANs?

That looks really sweet. Thank you!

Feel free to DM me if you need help with the library =)

I’m planning to add a new functionality, where you can use a vector of weights to mix between styles


I am actually not too sure. I have used ~100 images per domain, but I bet you can decrease that and still get pretty good results.

That is wonderful. You mean cycleGAN? Did you use any pre-training?

Yes I mean cycleGAN. No, I am not using pretraining. The reason it may work well with little data could be because during a single iteration it’s looking at random pairs of the images. That’s my speculation.