CarolineM5 commited on
Commit
482b9c7
·
verified ·
1 Parent(s): 131ac01

Upload inference.py

Browse files
Files changed (1) hide show
  1. inference.py +2 -2
inference.py CHANGED
@@ -88,8 +88,8 @@ def inference(fiber_imgs, ring_imgs, num_steps):
88
  bl = ring_imgs.crop((0, tile, tile, canvas_size))
89
  br = ring_imgs.crop((tile, tile, canvas_size, canvas_size))
90
 
91
- tr = cv2.resize(tr.astype(np.uint8), (new_width, original_height), interpolation=cv2.INTER_LANCZOS4)
92
- br = cv2.resize(br.astype(np.uint8), (new_width, original_height), interpolation=cv2.INTER_LANCZOS4)
93
 
94
  tr = PIL.Image.fromarray(tr)
95
  br = PIL.Image.fromarray(br)
 
88
  bl = ring_imgs.crop((0, tile, tile, canvas_size))
89
  br = ring_imgs.crop((tile, tile, canvas_size, canvas_size))
90
 
91
+ tr = cv2.resize(np.asarray(tr), (new_width, original_height), interpolation=cv2.INTER_LANCZOS4)
92
+ br = cv2.resize(np.asarray(br), (new_width, original_height), interpolation=cv2.INTER_LANCZOS4)
93
 
94
  tr = PIL.Image.fromarray(tr)
95
  br = PIL.Image.fromarray(br)