Giter Club home page Giter Club logo

gtp-pnet's People

Contributors

haozhang1018 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

gtp-pnet's Issues

Does all data need to be 8bit?

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?

Issue on different patch size

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.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.