Skip to content

Latest commit

 

History

History
24 lines (19 loc) · 1.61 KB

README.md

File metadata and controls

24 lines (19 loc) · 1.61 KB

NeuralStyleTransfer

Implementation of 2D Neural Style Transfer in a manner proposed in an original paper, along with optimization for preserving content image colors.

Programs & libraries needed in order to run this project

  • Pillow : Python Imaging Library
  • matplotlib : Plotting library for the Python programming language and its numerical mathematics extension NumPy
  • NumPy : Fundamental package for scientific computing with Python
  • OpenCV : Library of programming functions mainly aimed at real-time computer vision
  • PyTorch : Open source machine learning library based on the Torch library, used for applications such as computer vision and natural language processing

How to run?

Just run main.py in initialModel package.
If COLOR_HISTOGRAM_MATCHING variable is set to True, then it will do the color preservation optimization with technique: Color Histogram Matching.
If LUMINANCE_ONLY_TRANSFER variable is set to True, then it will do the color preservation optimization with technique: Luminance Only Transfer.

Example with color preservation

For given inputs: alt text Outputs with different ratios: alt text

Poster

alt text