jhj0517 commited on
Commit
922c507
1 Parent(s): 2088999

move function

Browse files
modules/utils/helper.py CHANGED
@@ -145,8 +145,3 @@ def str2bool(v):
145
  return False
146
  else:
147
  raise argparse.ArgumentTypeError('Boolean value expected.')
148
-
149
-
150
- def save_image(numpy_array: np.ndarray, output_path: str):
151
- out = Image.fromarray(numpy_array)
152
- out.save(output_path, compress_level=1, format="png")
 
145
  return False
146
  else:
147
  raise argparse.ArgumentTypeError('Boolean value expected.')
 
 
 
 
 
modules/utils/image_helper.py CHANGED
@@ -51,3 +51,8 @@ def calc_crop_limit(center, img_size, crop_size):
51
  pos = pos2 - crop_size
52
 
53
  return pos, pos2, crop_size
 
 
 
 
 
 
51
  pos = pos2 - crop_size
52
 
53
  return pos, pos2, crop_size
54
+
55
+
56
+ def save_image(numpy_array: np.ndarray, output_path: str):
57
+ out = Image.fromarray(numpy_array)
58
+ out.save(output_path, compress_level=1, format="png")