Project of NYU CSCI-GA 2271-001 Computer Vision Course
Task of style transfer in photographs. Details can be found in the report.
This code requires the following packages and files to run:
- PyTorch 0.4.1, torchvision 0.2.1
- Matlab Engine API (installation)
- Pretrained semantic segmentation models (download here)
-
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.