diff options
| author | jules@lens <julescarbon@gmail.com> | 2019-12-09 02:36:54 +0100 |
|---|---|---|
| committer | jules@lens <julescarbon@gmail.com> | 2019-12-09 02:36:54 +0100 |
| commit | 750f6e26d58a97a65d371839e15924ecaf5b844d (patch) | |
| tree | a544e762b65fa0201f2fc0798d45ea7c0aa48a58 /inversion/visualize.py | |
| parent | fb70ab05768fa4a54358dc1f304b68bc7aff6dae (diff) | |
trying to make this work
Diffstat (limited to 'inversion/visualize.py')
| -rw-r--r-- | inversion/visualize.py | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/inversion/visualize.py b/inversion/visualize.py index 07aea2d..d17fe13 100644 --- a/inversion/visualize.py +++ b/inversion/visualize.py @@ -55,7 +55,7 @@ def imread(filename): def imconvert_float32(im): im = np.float32(im) - im = (im / 256) * 2.0 - 1 + im = (im / 255) * 2.0 - 1 return im def load_image(opt_fp_in, opt_dims=128): @@ -84,5 +84,9 @@ def load_image(opt_fp_in, opt_dims=128): phi_target = phi_target[y0:y1,x0:x1] if phi_target.shape[2] == 4: phi_target = phi_target[:,:,1:4] - phi_target = np.expand_dims(phi_target, 0) + b = np.dsplit(phi_target, 3) + phi_target = np.stack(b).reshape((3,opt_dims, opt_dims)) + #print(phi_target.shape) + #phi_target = np.expand_dims(phi_target, 0) + #phi_target = np.reshape(3, opt_dims, opt_dims) return phi_target |
