pytorch / pytorch/tutorials

art transfer tutorial uses incomplete model for training

Open
#1,595 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
9.3k
Forks
4.4k
Avg merge
1d 21h
Merged PRs (30d)
4

Description

I read the A neural Algorithm of artistic style recently and while trying to implement I referred pytorch's tutorial but it used only top layers rather than full model as suggested by paper

From same input images :

Style image

style image

Context image:

context image

This is result from tutorial :

Tutorial result

This is the result after full model :

my result

As you can see my results captured context as well as style better than current version
the algorithm is expected to work with transfer learning from VGG19 model which will have 19 conv layers but the current tutorial only have 5 layers which is why results aren't up to the mark.

Changes:

  • Changed in implantation of model
  • max pool to avg pool as suggested by author in paper
  • VGG takes 224*224 input image which is not the case with current tutorial.
  • multiplying individual loss by a factor
  • due to normalisation on gram matrix style loss tends to zero

I would like to contribute to this issue

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the existing neural style transfer tutorial and compare its model and loss setup with the linked paper's VGG19 approach. Review the proposed pooling, input-size, loss-weighting, and Gram-matrix normalization changes. Done means the tutorial uses the intended model configuration and produces style-transfer results that better preserve both context and style.

Written by the indexing model from the issue text.

Assessment

Tech stack
python, pytorch
Domain
machine-learning
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.