Skip to content

Billijk/Deep-Photo-Style-Transfer-PyTorch

Repository files navigation

Deep-Photo-Style-Transfer-PyTorch

Project of NYU CSCI-GA 2271-001 Computer Vision Course

Task of style transfer in photographs. Details can be found in the report.

Before running the code...

This code requires the following packages and files to run:

  1. PyTorch 0.4.1, torchvision 0.2.1
  2. Matlab Engine API (installation)
  3. Pretrained semantic segmentation models (download here)

Running in different settings

  • Branch master is our combined method.

    Set --masks dummy_mask to run model without segmentation.

    Set --sim 0 to run model without similarity loss.

    To run model with user provided segmentations, use make_masks.py to generate mask files from mask images, and set --masks <your_mask_file>. The following colors can be used in the image: blue (rgb: 0000ff), green (rgb: 00ff00), black (rgb: 000000), white (rgb: ffffff), red (rgb: ff0000), yellow (rgb: ffff00), grey (rgb: 808080), lightblue (rgb: 00ffff), purple (rbg: ff00ff).

  • Branch gatys_baseline is the baseline neural style transfer model.

  • Branch regularization is the model with photorealism regularization term instead of post processing.

  • Branch hard_seg is the model using hard semantic segmentation.

Results generated by our model

View in Google Drive

About

Project of NYU CSCI-GA 2271-001 Computer Vision Course

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published