Home

Awesome

CAMS: Color-Aware Multi-Style Transfer

Mahmoud Afifi<sup>1</sup>, Abdullah Abuolaim*<sup>1</sup>, Mostafa Hussien*<sup>2</sup>, Marcus A. Brubaker<sup>1</sup>, Michael S. Brown<sup>1</sup>

<sup>1</sup>York University
<sup>2</sup>École de technologie supérieure

* denotes equal contribution

Reference code for the paper CAMS: Color-Aware Multi-Style Transfer. Mahmoud Afifi, Abdullah Abuolaim, Mostafa Hussien, Marcus A. Brubaker, and Michael S. Brown. arXiv preprint, 2021. If you use this code, please cite our paper:

@article{afifi2021coloraware,
  title={CAMS: Color-Aware Multi-Style Transfer},
  author={Afifi, Mahmoud and Abuolaim, Abdullah and Hussien, Mostafa and Brubaker, Marcus A. and Brown, Michael S.},
  journal={arXiv preprint arXiv:2106.13920},
  year={2021}
}

github

Get Started

Run color_aware_st.py or check the Colab link from here.

To compute the color-aware loss between two images, see test_cams_loss.py. To report the average color-aware loss for a set of pair images, use report_losses_of_image_dir.py.

Manual Selection

Our method allows the user to manually select the color correspondences between palettes or ignore some colors when optimizing. user_selection

To enable this mode, use SELECT_MATCHES = True.

Other useful parameters:

MIT License

Related Research Projects