Spaces:
Running
Running
yizhangliu
commited on
Commit
•
6efd69c
1
Parent(s):
4aefcfd
Update app.py
Browse files
app.py
CHANGED
@@ -216,9 +216,9 @@ def model_process_pil(input):
|
|
216 |
)
|
217 |
print(f"liuyz_here_40_: {alpha_channel.shape} / {res_np_img.shape} / {alpha_channel.dtype} / {res_np_img.dtype}")
|
218 |
print(f"process time_2_: {(time.time() - start) * 1000}ms, {alpha_channel.shape}, {res_np_img.shape} / {res_np_img[250][250]} / {res_np_img.dtype}")
|
219 |
-
image = Image.
|
220 |
image.save(f'./result_image.png')
|
221 |
-
return
|
222 |
|
223 |
'''
|
224 |
ext = get_image_ext(origin_image_bytes)
|
|
|
216 |
)
|
217 |
print(f"liuyz_here_40_: {alpha_channel.shape} / {res_np_img.shape} / {alpha_channel.dtype} / {res_np_img.dtype}")
|
218 |
print(f"process time_2_: {(time.time() - start) * 1000}ms, {alpha_channel.shape}, {res_np_img.shape} / {res_np_img[250][250]} / {res_np_img.dtype}")
|
219 |
+
image = Image.open(io.BytesIO(numpy_to_bytes(res_np_img, ext)))
|
220 |
image.save(f'./result_image.png')
|
221 |
+
return image # res_np_img.astype(np.uint8) # image
|
222 |
|
223 |
'''
|
224 |
ext = get_image_ext(origin_image_bytes)
|