diff --git a/modules/deeplearning/srcnn.py b/modules/deeplearning/srcnn.py index f5391cd5abf5e3c2cd62bd38ba7463a7a0bb2b77..7df149b0fefd70bca2770c8d1f00630368a791cb 100644 --- a/modules/deeplearning/srcnn.py +++ b/modules/deeplearning/srcnn.py @@ -669,14 +669,15 @@ def run_evaluate_static(in_file, out_file, ckpt_dir): def run_evaluate_static_new(in_file, out_file, ckpt_dir): - nda = np.load(in_file) - - nda = nda[:, data_idx, 3:131:2, 3:131:2] - nda = resample(x_64, y_64, nda, t, s) - nda = np.expand_dims(nda, axis=3) - h5f = h5py.File(in_file, 'r') grd = get_grid_values_all(h5f, data_param) + leny, lenx = grd.shape + x = np.arange(lenx) + y = np.arange(leny) + x_up = np.arange(0, lenx, 0.5) + y_up = np.arange(0, leny, 0.5) + + grd = resample(x, y, grd, x_up, y_up) nn = SRCNN() out_sr = nn.run_evaluate(grd, data_param, ckpt_dir)