From f5e426de8b5f8636aa15a12153afb65eab8dec56 Mon Sep 17 00:00:00 2001 From: tomrink <rink@ssec.wisc.edu> Date: Mon, 7 Aug 2023 15:13:45 -0500 Subject: [PATCH] snapshot... --- modules/deeplearning/esrgan_exp.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/modules/deeplearning/esrgan_exp.py b/modules/deeplearning/esrgan_exp.py index a53675d5..c068ca86 100644 --- a/modules/deeplearning/esrgan_exp.py +++ b/modules/deeplearning/esrgan_exp.py @@ -21,10 +21,10 @@ model = hub.load(SAVED_MODEL_PATH) def get_image(in_file): h5f = h5py.File(in_file, 'r') - # s_x = slice(2622, 3134) - # s_y = slice(2622, 3134) - s_x = slice(1854, 3902) - s_y = slice(1854, 3902) + s_x = slice(2622, 3134) + s_y = slice(2622, 3134) + # s_x = slice(1854, 3902) + # s_y = slice(1854, 3902) # bt = get_grid_values_all(h5f, 'temp_11_0um_nom') # bt = bt[s_y, s_x] @@ -78,6 +78,7 @@ def run(in_file): # model = hub.load(SAVED_MODEL_PATH) hr_image = get_image(in_file) hr_image = preprocess_image(hr_image) + print('start inference: ', hr_image.shape) t0 = time.time() fake_image = model(hr_image) t1 = time.time() -- GitLab