Turn a photo into an artwork that looks painted in the style of a famous artist like Van Gogh or Picasso.
Blend multiple style images together with custom weights to create a mixed artistic effect on any photo.
Experiment with command-line settings to control how abstract or detailed the style transfer output looks.
Use as a research baseline for neural style transfer experiments on custom images.
Requires downloading a ~500MB pre-trained VGG network file before first use, GPU significantly speeds up processing.
neural-style is a Python program that applies the visual style of one image to the content of another. You give it two images: a content photo (such as a picture of a building or a person) and a style reference (such as a painting by Van Gogh or Picasso), and it produces a new image that looks like the content photo repainted in the visual style of the reference. The technique comes from a published research paper on using neural networks to separate and recombine image content and style. The program is built with TensorFlow, a machine learning library. Running it requires downloading a pre-trained image recognition network file (about 500MB) that the program uses to analyze the visual features of your images. After that, you run a command specifying your input files and where to save the result. A typical 512x512 image takes about 90 seconds on a modern laptop chip and significantly less time with a dedicated graphics card. You can blend multiple style images together by assigning each one a weight, so the output can draw from several references at once. Several command-line settings let you control how detailed or abstract the style transfer is, whether to preserve the original colors of the content image, and how the model processes features internally. The README includes visual examples showing how adjusting these settings changes the output. The project is released under the GPLv3 license. It is a research implementation intended for experimentation rather than production use, and the author notes that some parameter tuning may be needed to get good results with different images.
← anishathalye on gitmyhub — every repo by this author, as a profile.
Verify against the repo before relying on details.