This repository is for CS577 (Deep Learning) @ IIT The work in this repository is based on the paper:
Perceptual Losses for Real-Time Style Transfer and Super Resolution
@article{
title={Perceptual Losses for Real-Time Style Transfer and Super Resolution},
author={Justin Johnson, Alexandre Alahi, Li Fei-Fei},
publisher={Dept. of Computer Science, Stanford University},
year={2016}
}
This implementation was inspired from the offical pytorch example from facebook research:
- Install conda
- Set env by either:
- Create conda enviornment:
conda create --name <env> --file macOS_local_req.txt
- Install into existing conda environment:
conda install -n <env_name> macOS_local_req.txt
- Create conda enviornment:
python3 src/stylize.py --image data/test/COCO_train2014_000000363111.jpg --model data/trained_models/mosaic_id5320.pth
python3 src/trainer.py --data-dir data/training_data/ --style data/style/mosaic.jpeg
python3 src/trainer.py --data-dir data/training_data/ --style data/style/mosaic.jpeg --save 1 --checkpoints-path data/dir_to_save
python3 src/trainer.py --data-dir data/training_data/ --style data/style/mosaic.jpeg --retrain 1 --retrain-model data/trained_models/tree_to_retrain.pth
python3 src/visualize_losses.py
python3 src/trainer.py