Skip to content

Unofficial Pytorch Implementation of 'Uncorrelated feature encoding for faster style transfer'

Notifications You must be signed in to change notification settings

tyui592/uncorrelated_feature_encoding_for_faster_style_transfer

Repository files navigation

Uncorrelated feature encoding for faster style transfer

Unofficial Pytorch Implementation of 'Uncorrelated feature encoding for faster style transfer'

This repository implements the above paper based on vgg19. Please refer to scripts.sh for differences in details.

Usage

  • Requirements

    • torch (version: 1.13.0)
    • torchvision (version: 0.14.0)
    • wandb
  • Dataset

Result

Training Loss

training_loss (From the top left to the bottom right.) style loss, content loss, uncorrelation loss and number of nonzero channels from the feature map. More details: wandb link.

Correlation Matrix

Correlation matrix of the feature map extracted from the vgg encoder calculated by the test data. The feature map has 512 channels, and the matrix is normalized to the total number of images.

correlation_matrix

Stylization with channel pruning

The value of accumulating and sorting the absolute values of the channel vectors. channel_magnitude

The stylization result of the network pruning the channels in the above order of magnitude. pruning_stylization

The above results were calculated through the jupyter notebook.

Stylization Result

Content Style w/o Uncorrealtion Loss w/ Uncorrealtion Loss
image1 image2 image3 imag4
imag5 image6 image7 image8
image9 image10 image11 image12