Skip to content

Instantly share code, notes, and snippets.

View deepak112's full-sized avatar

Deepak Birla deepak112

  • Mindtree
  • Banglore Karnataka
View GitHub Profile
@deepak112
deepak112 / generator.py
Last active November 8, 2018 06:49
Generator Network for SRGAN
from keras.layers.core import Activation
from keras.layers.normalization import BatchNormalization
from keras.layers.convolutional import UpSampling2D
from keras.layers import Input
from keras.layers.convolutional import Conv2D, Conv2DTranspose
from keras.models import Model
from keras.layers.advanced_activations import LeakyReLU, PReLU
from keras.layers import add
# Residual block
@deepak112
deepak112 / images.py
Last active November 8, 2018 06:48
Below functions returns High Resolution and Low Resolution images in form of numpy array from given list of images(List comprising of images in form of numpy array).
from numpy import array
from scipy.misc import imresize
# Takes list of images and provide HR images in form of numpy array
def hr_images(images):
images_hr = array(images)
return images_hr
# Takes list of images and provide LR images in form of numpy array
def lr_images(images_real , downscale):
images = []