Domain Aware Universal Style Transfer

Official Pytorch Implementation of 'Domain Aware Universal Style Transfer' (ICCV 2021)

Domain Aware Universal Style Transfer

Kibeom Hong (Yonsei Univ.), Seogkyu Jeon (Yonsei Univ.), Jianlong Fu (Microsoft Research), Huan Yang (Microsoft Research), Hyeran Byun (Yonsei Univ.)

Paper :

Abstract: Style transfer aims to reproduce content images with the styles from reference images. Existing universal style transfer methods successfully deliver arbitrary styles to original images either in an artistic or a photo-realistic way. However, the range of “arbitrary style” defined by existing works is bounded in the particular domain due to their structural limitation. Specifically, the degrees of content preservation and stylization are established according to a predefined target domain. As a result, both photo-realistic and artistic models have difficulty in performing the desired style transfer for the other domain. To overcome this limitation, we propose a unified architecture, Domain-aware Style Transfer Networks (DSTN) that transfer not only the style but also the property of domain (i.e., domainness) from a given reference image. To this end, we design a novel domainness indicator that captures the domainness value from the texture and structural features of reference images. Moreover, we introduce a unified framework with domain-aware skip connection to adaptively transfer the stroke and palette to the input contents guided by the domainness indicator. Our extensive experiments validate that our model produces better qualitative results and outperforms previous methods in terms of proxy metrics on both artistic and photo-realistic stylizations.



  • Python 3.6

  • CUDA 11.0

  • Pytorch 1.7

  • Check the requirements.txt

    pip install -r requirements.txt


Set pretrained weights

  • Pretrained models for encoder(VGG-19) can be found in the ./baseline_checkpoints

  • Prepare pretrained models for Domainnes Indicator

  • Prepare pretrained models for Decoder

  • Move these pretrained weights to each folders:

    • style_indicator.pth -> ./train_results/StyleIndicator/log/
    • decoder.pth -> ./train_results/Decoder/log/
    • decoder_adversarial.pth -> ./train_results/Decoder_adversarial/log/

    (Please rename decoder_adversarial.pth -> decoder.pth)

Inference (Automatic)

  • Vanilla decoder

    bash scripts/

  • Decoder with adversarial loss

    bash scripts/


Available soon


Available soon


If you find this work useful for your research, please cite:

  title={Domain-Aware Universal Style Transfer},
  author={Kibeom Hong and Seogkyu Jeon and Huan Yang and Jianlong Fu and H. Byun},


If you have any question or comment, please contact the first author of this paper - Kibeom Hong

[email protected]