Spaces:
Running
Running
yizhangliu
commited on
Commit
•
7e3a73d
1
Parent(s):
65d6992
Update app.py
Browse files
app.py
CHANGED
@@ -204,13 +204,13 @@ def model_process(input):
|
|
204 |
torch.cuda.empty_cache()
|
205 |
|
206 |
if alpha_channel is not None:
|
207 |
-
print(f"liuyz_here_10_: {alpha_channel.shape}")
|
208 |
if alpha_channel.shape[:2] != res_np_img.shape[:2]:
|
209 |
print(f"liuyz_here_20_: {alpha_channel.shape} / {res_np_img.shape}")
|
210 |
alpha_channel = cv2.resize(
|
211 |
alpha_channel, dsize=(res_np_img.shape[1], res_np_img.shape[0])
|
212 |
)
|
213 |
-
print(f"liuyz_here_30_: {alpha_channel.shape} / {res_np_img.shape}")
|
214 |
res_np_img = np.concatenate(
|
215 |
(res_np_img, alpha_channel[:, :, np.newaxis]), axis=-1
|
216 |
)
|
|
|
204 |
torch.cuda.empty_cache()
|
205 |
|
206 |
if alpha_channel is not None:
|
207 |
+
print(f"liuyz_here_10_: {alpha_channel.shape} / {alpha_channel.dtype} / {res_np_img.dtype}")
|
208 |
if alpha_channel.shape[:2] != res_np_img.shape[:2]:
|
209 |
print(f"liuyz_here_20_: {alpha_channel.shape} / {res_np_img.shape}")
|
210 |
alpha_channel = cv2.resize(
|
211 |
alpha_channel, dsize=(res_np_img.shape[1], res_np_img.shape[0])
|
212 |
)
|
213 |
+
print(f"liuyz_here_30_: {alpha_channel.shape} / {res_np_img.shape} / {alpha_channel.dtype} / {res_np_img.dtype}")
|
214 |
res_np_img = np.concatenate(
|
215 |
(res_np_img, alpha_channel[:, :, np.newaxis]), axis=-1
|
216 |
)
|