The model code of "Super-Resolution-Guided Progressive Pansharpening based on a Deep Convolutional Neural Network"
[paper]
This repo includes the main code of the SRPPNN (with Tensorflow). To use this model:
- import this .py file into your file that wants to create SRPPNN
from SRPPNN_model import *
- Create the SRPPNN model by
input_mul_pl = tf.placeholder(tf.float32, shape = (None, img_rows//scale, img_cols//scale, num_bands), name='input_mul') //Low-resolution multispectral images. Scale is the parameter that represents ratio between panchromatic and multispectral images.
input_pan_pl = tf.placeholder(tf.float32, shape = (None, img_rows, img_cols, 1), name='input_pan') //High-resolution panchromatic images
lbl_pl = tf.placeholder(tf.float32, shape = (None, img_rows, img_cols, num_bands), name='label') //Original multispectral images
net = SRPPNN(scale=scale) //the default scale is 4
outputs = net._srppnn(input_mul_pl,input_pan_pl)
- loss function and optimizer
loss = L2_loss(outputs, lbl_pl)
train_op = training(loss[0], l_rate) //l_rate: learning rate
- Train the model like the typical Tensorflow model