Skip to content
Snippets Groups Projects
Commit 05706f68 authored by tomrink's avatar tomrink
Browse files

snapshot...

parent f4897f7e
No related branches found
No related tags found
No related merge requests found
......@@ -37,8 +37,6 @@ NOISE_TRAINING = False
NOISE_STDDEV = 0.01
DO_AUGMENT = True
DO_SMOOTH = False
SIGMA = 1.0
DO_ZERO_OUT = False
DO_ESPCN = False # Note: If True, cannot do mixed resolution input fields (Adjust accordingly below)
......@@ -138,7 +136,7 @@ def upsample(tmp):
return tmp
def upsample_nearest(grd):
def upsample_mean(grd):
bsize, ylen, xlen = grd.shape
grd = get_grid_cell_mean(grd)
up = np.zeros(bsize, ylen, xlen)
......@@ -345,13 +343,13 @@ class SRCNN:
tmp = input_data[:, label_idx, :, :]
tmp = tmp.copy()
tmp = np.where(np.isnan(tmp), 0, tmp)
if DO_SMOOTH:
tmp = smooth_2d(tmp, sigma=SIGMA)
# tmp = median_filter_2d(tmp)
if DO_ESPCN:
tmp = tmp[:, slc_y_2, slc_x_2]
else: # Half res upsampled to full res:
tmp = upsample(tmp)
# tmp = upsample(tmp)
tmp = upsample_mean(tmp)
tmp = tmp[:, slc_y, slc_x]
if label_param != 'cloud_probability':
tmp = normalize(tmp, label_param, mean_std_dct)
if DO_ADD_NOISE:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment