jhj0517
commited on
Commit
•
f0d2b3d
1
Parent(s):
6058d6e
Refactor to return output path
Browse files
modules/utils/image_helper.py
CHANGED
@@ -56,6 +56,7 @@ def calc_crop_limit(center, img_size, crop_size):
|
|
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")
|
|
|
59 |
|
60 |
|
61 |
def image_path_to_array(image_path: str) -> np.ndarray:
|
|
|
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")
|
59 |
+
return output_path
|
60 |
|
61 |
|
62 |
def image_path_to_array(image_path: str) -> np.ndarray:
|