Adaptive Instance Normalization

Turn any photo
into art.

Upload a content image and a style painting. The neural network transfers the artistic style in real-time using AdaIN.

Built by Tejas M · PyTorch · Flask

Content Source
Select content image
Style Reference
Select style painting
Style Strength 1.0
Preserve Content Full Style

How It Works

Three-step pipeline powered by Adaptive Instance Normalization

01

Encode

Both images pass through a pre-trained VGG-19 encoder that extracts deep feature representations — capturing structure from the content and texture patterns from the style.

02

AdaIN Transfer

The content features are normalized to match the mean and variance of the style features. This single operation aligns the statistical distribution — transferring style in feature space.

03

Decode

A trained decoder network inverts the AdaIN output back to pixel space, producing the final stylized image. The alpha slider controls how much style is blended in.

Python PyTorch Flask VGG-19 MS-COCO WikiArt

Examples

Content + Style → Stylized Output

Content
Content
Style
Style
Output
Output
Content
Content
Style
Style
Output
Output

FAQ

Common questions about this project

No. I trained the decoder from scratch using PyTorch on ~40,000 content images (MS-COCO) and ~8,000 style images (WikiArt). The encoder uses pre-trained VGG-19 weights, but the style transfer decoder is entirely custom-trained in two phases — 160 epochs at 256px, then 100 epochs at 512px.

Yes — this is a personal portfolio project and completely free to use. Upload any content and style image pair.

Almost any painting style works — impressionist, cubist, abstract, watercolor, sketch, ukiyo-e, and more. Bold, high-contrast styles tend to produce the most striking results.

Python, PyTorch (VGG-19 encoder + custom decoder), Flask for the web backend, and the AdaIN algorithm from Huang & Belongie (ICCV 2017).

It controls the alpha parameter (0–1). At 0 you get the original content; at 1 the style is fully applied. In-between values blend both, letting you fine-tune the artistic effect.

Transferring style...