From f8b1f0f9f61e90fa2f519d9d1c174901b5c0b189 Mon Sep 17 00:00:00 2001 From: tomrink <rink@ssec.wisc.edu> Date: Thu, 18 Aug 2022 14:44:24 -0500 Subject: [PATCH] snapshot... --- modules/deeplearning/srcnn.py | 21 ++++++++++++--------- 1 file changed, 12 insertions(+), 9 deletions(-) diff --git a/modules/deeplearning/srcnn.py b/modules/deeplearning/srcnn.py index 0af63acc..6b56b7af 100644 --- a/modules/deeplearning/srcnn.py +++ b/modules/deeplearning/srcnn.py @@ -61,10 +61,14 @@ label_param = label_params[label_idx] x_134 = np.arange(134) y_134 = np.arange(134) -#x_134_2 = x_134[3:131:2] -#y_134_2 = y_134[3:131:2] -x_134_2 = x_134[2:133:2] -y_134_2 = y_134[2:133:2] +x_64 = np.arange(64) +y_64 = np.arange(64) +x_134_2 = x_134[3:131:2] +y_134_2 = y_134[3:131:2] +#x_134_2 = x_134[2:133:2] +#y_134_2 = y_134[2:133:2] +t = np.arange(0, 64, 0.5) +s = np.arange(0, 64, 0.5) def build_residual_conv2d_block(conv, num_filters, block_name, activation=tf.nn.relu, padding='SAME', kernel_initializer='he_uniform', scale=None): @@ -202,13 +206,12 @@ class SRCNN: data = np.concatenate(label_s) label = data.copy() - data = data[:, data_idx, :, :] - data = resample(x_134, y_134, data, x_134_2, y_134_2) + data = data[:, data_idx, 3:131:2, 3:131:2] + data = resample(x_64, y_64, data, t, s) data = np.expand_dims(data, axis=3) - # label = label[:, label_idx, :, :] - label = label[:, label_idx, 3:131:2, 3:131:2] - # label = label[:, label_idx, 3:67, 3:67] + # label = label[:, label_idx, 3:131:2, 3:131:2] + label = label[:, label_idx, 3:131, 3:131] label = np.expand_dims(label, axis=3) data = data.astype(np.float32) -- GitLab