explaingit

jcjohnson/neural-style

Analysis updated 2026-05-18

18,284LuaAudience · vibe coderComplexity · 3/5LicenseSetup · hard

TLDR

Apply the artistic style of one image to the content of another using neural networks. Create paintings that blend a photo's subject with a famous artwork's brushstrokes.

Mindmap

mindmap
  root((repo))
    What it does
      Blend content and style
      Artistic photo transformation
      Multi-style mixing
    How it works
      Neural networks
      Feature extraction
      Style transfer algorithm
    Use cases
      Artistic photo effects
      Creative image generation
      Style experimentation
    Tech stack
      Torch framework
      Lua language
      GPU acceleration
    Inputs and outputs
      Content image
      Style image
      Stylized output
Click or tap to explore — scroll the page freely

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

What do people build with it?

USE CASE 1

Transform photographs into paintings styled after famous artworks or personal artistic references.

USE CASE 2

Create variations of images by blending multiple artistic styles with adjustable weights.

USE CASE 3

Generate stylized versions of photos while preserving original colors or textures.

What is it built with?

LuaTorchCUDANeural networks

How does it compare?

jcjohnson/neural-styleyetone/avante.nvimlunarvim/lunarvim
Stars18,28417,88819,268
LanguageLuaLuaLua
Setup difficultyhardmoderatemoderate
Complexity3/53/52/5
Audiencevibe coderdeveloperdeveloper

Figures from each repo's GitHub metadata at analysis time.

How do you get it running?

Difficulty · hard Time to first run · 1day+

Requires CUDA GPU, Torch/Lua environment setup, and pre-trained neural network models which may need downloading.

Use freely for any purpose including commercial, as long as you keep the copyright notice.

In plain English

Neural-style is an implementation of a technique that combines the visual content of one photograph with the artistic style of another image using neural networks (a type of AI modeled loosely on the brain). The underlying idea, from a research paper by Leon Gatys, Alexander Ecker, and Matthias Bethge, is that a neural network can separately identify what is in an image (its content) and how it looks (its style), then blend content from one source with style from another. The result is a new image that looks like the content photo repainted in the manner of the style image. For example, you could take a photograph of a city street and render it as if painted in the brushstroke style of a famous painting. The user can control how much weight to give the content versus the style, producing results that range from a barely-stylized photo to something almost entirely abstract. You can also blend multiple style images together, controlling each one's contribution, or keep the original colors of the content image while adopting only the texture and pattern of the style. Built using the Torch numerical computing framework and written in the Lua programming language, this was an early and influential implementation that demonstrated the technique's potential. Running it requires a graphics card for practical speed, and various pretrained neural network models for feature extraction.

Copy-paste prompts

Prompt 1
How do I use neural-style to turn my vacation photo into a Van Gogh painting?
Prompt 2
Show me how to blend two different artistic styles on the same photo using neural-style.
Prompt 3
What GPU setup do I need to run neural-style efficiently on my own images?
Prompt 4
How can I adjust the content-to-style ratio to get more or less artistic abstraction in neural-style?

Frequently asked questions

What is neural-style?

Apply the artistic style of one image to the content of another using neural networks. Create paintings that blend a photo's subject with a famous artwork's brushstrokes.

What language is neural-style written in?

Mainly Lua. The stack also includes Lua, Torch, CUDA.

What license does neural-style use?

Use freely for any purpose including commercial, as long as you keep the copyright notice.

How hard is neural-style to set up?

Setup difficulty is rated hard, with roughly 1day+ to a first successful run.

Who is neural-style for?

Mainly vibe coder.

Open on GitHub → Explain another repo

This repo across BitVibe Labs

Scan in gitsafehub Deploy in gitdeployhub jcjohnson on gitmyhub

Verify against the repo before relying on details.