All projects
Deep Learning2023Computer Vision

Neural Style Transfer

Combined content and style features from CNN layers using Gram matrix texture representation and a composite loss function — foundational generative vision work.

Pipeline

Content image
CNN features
Gram matrix style
Composite loss
Optimization

Architecture

End-to-end flow, stage by stage.

  1. 01

    Content image

  2. 02

    CNN features

  3. 03

    Gram matrix style

  4. 04

    Composite loss

  5. 05

    Optimization

How it works

01

Implemented the image transformation pipeline in PyTorch and OpenCV, extracting content structure and artistic texture from different CNN layers.

02

Represented style through Gram matrices and optimized a composite objective that balances content preservation against style adoption.

03

Used the project to explore feature extraction, generative modeling, and loss-function design from first principles.

Composite
Content + style loss
CNN
Layer-wise feature extraction

Stack

CNNPyTorchGram Matrix