haozhang1018 / gtp-pnet Goto Github PK
View Code? Open in Web Editor NEWCode of GTP-PNet: A residual learning network based on gradient transformation prior for pansharpening.
License: MIT License
Code of GTP-PNet: A residual learning network based on gradient transformation prior for pansharpening.
License: MIT License
When I was training TNet with my own data, I found that when the data was read, it was converted to 'YCbCr' mode. This operation requires the data to be 8 bits, but the remote sensing images are commonly 11bit, did you preprocess the data?
Dear!
I am also working at pansharpening and trying to test your project with my own training set.
After a little modification, I successfully trained your TNET, but i have met a problem in PNET, especially in function "fusion_model" from line 223 to line 262.
with tf.variable_scope('fusion_model'):
MS_x2=tf.image.resize_images(images=img_MS, size=[2self.image_size_MS, 2self.image_size_MS],method=tf.image.ResizeMethod.BICUBIC)
with tf.variable_scope('layer1_MS_x2'):
weights=tf.get_variable("w1_MS_x2",[3,3,4,16],initializer=tf.truncated_normal_initializer(stddev=1e-3))
bias=tf.get_variable("b1_MS_x2",[16],initializer=tf.constant_initializer(0.0))
conv1_MS_x2=tf.nn.conv2d(MS_x2, weights, strides=[1,1,1,1], padding='SAME') + bias
conv1_MS_x2 = lrelu(conv1_MS_x2)
MS_x4=tf.image.resize_images(images=conv1_MS_x2, size=[4self.image_size_MS, 4self.image_size_MS],method=tf.image.ResizeMethod.BICUBIC)
with tf.variable_scope('layer2_MS_x4'):
weights=tf.get_variable("w2_MS_x4",[3,3,16,4],initializer=tf.truncated_normal_initializer(stddev=1e-3))
bias=tf.get_variable("b2_MS_x4",[4],initializer=tf.constant_initializer(0.0))
conv2_MS_x4=tf.nn.conv2d(MS_x4, weights, strides=[1,1,1,1], padding='SAME') + bias
conv2_MS_x4 = lrelu(conv2_MS_x4)
#########################################################
#################### MS Layer 1 ###########################
#########################################################
with tf.variable_scope('layer1_MS'):
weights=tf.get_variable("w1_MS",[3,3,4,16],initializer=tf.truncated_normal_initializer(stddev=1e-3))
bias=tf.get_variable("b1_MS",[16],initializer=tf.constant_initializer(0.0))
conv1_MS=tf.nn.conv2d(conv2_MS_x4, weights, strides=[1,1,1,1], padding='SAME') + bias
conv1_MS = lrelu(conv1_MS)
#########################################################
#################### PAN Layer 1 ###########################
#########################################################
with tf.variable_scope('layer1_PAN'):
weights=tf.get_variable("w1_PAN",[3,3,1,16],initializer=tf.truncated_normal_initializer(stddev=1e-3))
bias=tf.get_variable("b1_PAN",[16],initializer=tf.constant_initializer(0.0))
conv1_PAN=tf.nn.conv2d(img_PAN, weights, strides=[1,1,1,1], padding='SAME') + bias
conv1_PAN = lrelu(conv1_PAN)
#########################################################
#################### MS Layer 2 #########################
#########################################################
MS_dense_2=tf.concat([conv2_MS_x4,conv1_MS,conv1_PAN],axis=-1)
with tf.variable_scope('layer2_MS'):
weights=tf.get_variable("w2_MS",[3,3,36,16],initializer=tf.truncated_normal_initializer(stddev=1e-3))
bias=tf.get_variable("b2_MS",[16],initializer=tf.constant_initializer(0.0))
conv2_MS=tf.nn.conv2d(MS_dense_2, weights, strides=[1,1,1,1], padding='SAME') + bias
conv2_MS = lrelu(conv2_MS)
Here, what's the meaning of [3,3,36,16]?
If I am training with dataset of size 32x32(for LRMS) and 128x128(for PAN), what is this value?
Thank you in advance.
Kind regards.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.