This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#This script performs the linear color transfer step that | |
#leongatys/NeuralImageSynthesis' Scale Control code performs. | |
#https://github.com/leongatys/NeuralImageSynthesis/blob/master/ExampleNotebooks/ScaleControl.ipynb | |
import scipy | |
import h5py | |
import skimage | |
import os | |
from skimage import io,transform,img_as_float | |
from skimage.io import imread,imsave | |
from collections import OrderedDict |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'torch' | |
require 'nn' | |
require 'image' | |
require 'optim' | |
require 'loadcaffe' | |
local cmd = torch.CmdLine() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Standalone version of the Matting Laplacian code from here: https://github.com/martinbenson/deep-photo-styletransfer | |
# Usage: python3 laplacian.py -in_dir <directory> -lap_dir <directory> -width <value> | |
# Install the depdendencies with: pip3 install numpy scipy Pillow | |
# This script is intended for use with artistic style transfer neural networks, and Deep Photo Style Transfer. | |
import argparse | |
import glob | |
import os | |
import shutil | |
import multiprocessing |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- modified version of @jcjohnson's neural-style | |
-- by @htoyryla 14 May 2017 | |
-- allows exploring th effect of giving emphasis to specific channel(s) in a style layer | |
-- use -style_layers to select layer as usual, using a single layer is recommended | |
-- -style_channels to specify one or more channels to be given emphasis, other channels will be attenuated | |
-- if a channel does not exist in a layer, it is ignored and given a warning | |
-- note: if multiple style layers are used, style_channels setting affects both | |
require 'torch' | |
require 'nn' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'torch' | |
require 'nn' | |
require 'image' | |
require 'optim' | |
require 'loadcaffe' | |
local cmd = torch.CmdLine() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- Original DeepDream code by github.com/jcjohnson | |
-- Simaltaneous DeepDream and style transfer modifications by github.com/ProGamerGov | |
-- The FC layers as content layers feature, and the label file features come from: | |
-- github.com/htoyryla's gist.github.com/htoyryla/806ca4d978f0528114282cd00022ad71 | |
-- Indepdent layer weights from: https://github.com/htoyryla/neural-style/blob/master/neural_style.lua | |
-- Torch model and architecture support from https://github.com/szagoruyko/neural-style/tree/torch | |
-- Matting laplacian code from: github.com/martinbenson/deep-photo-styletransfer/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- Original DeepDream code by github.com/jcjohnson | |
-- Simaltaneous DeepDream and style transfer modifications by github.com/ProGamerGov | |
-- The FC layers as content layers feature, and the label file features come from: | |
-- github.com/htoyryla's gist.github.com/htoyryla/806ca4d978f0528114282cd00022ad71 | |
-- Indepdent layer weights from: https://github.com/htoyryla/neural-style/blob/master/neural_style.lua | |
-- Torch model and architecture support from https://github.com/szagoruyko/neural-style/tree/torch | |
-- A script like this one is requires for making Torch models compatible: https://gist.github.com/szagoruyko/8828e09cc4687afd324d |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- Original DeepDream code by github.com/jcjohnson | |
-- Simaltaneous DeepDream and style transfer modifications by github.com/ProGamerGov | |
-- The FC layers as content layers feature, and the label file features come from: | |
-- github.com/htoyryla's gist.github.com/htoyryla/806ca4d978f0528114282cd00022ad71 | |
-- Torch model and architecture support from https://github.com/szagoruyko/neural-style/tree/torch | |
require 'torch' | |
require 'nn' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
extern "C" { | |
#include "lua.h" | |
#include "lualib.h" | |
#include "lauxlib.h" | |
} | |
#include "luaT.h" | |
#include "THC.h" | |
#include <stdio.h> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- Matting laplacian code from: github.com/martinbenson/deep-photo-styletransfer/ | |
-- Generate the laplacian with: https://gist.github.com/ProGamerGov/290f26afccc5e013d1a8425ef6a594f2 | |
-- More details can be found in this gist: https://gist.github.com/ProGamerGov/d3988b914c92220ae45aa5bb1e31d6a7 | |
-- The original Neural Style code can be found here: https://github.com/jcjohnson/neural-style | |
require 'torch' | |
require 'nn' | |
require 'image' | |
require 'optim' |