Spaces:
Running
Running
Commit
·
3f31420
1
Parent(s):
0665ec1
Update app.py
Browse files
app.py
CHANGED
|
@@ -199,7 +199,7 @@ def model_process(input):
|
|
| 199 |
start = time.time()
|
| 200 |
res_np_img = model(image, mask, config)
|
| 201 |
logger.info(f"process time: {(time.time() - start) * 1000}ms, {res_np_img.shape}")
|
| 202 |
-
print(f"process
|
| 203 |
|
| 204 |
torch.cuda.empty_cache()
|
| 205 |
|
|
@@ -211,6 +211,7 @@ def model_process(input):
|
|
| 211 |
res_np_img = np.concatenate(
|
| 212 |
(res_np_img, alpha_channel[:, :, np.newaxis]), axis=-1
|
| 213 |
)
|
|
|
|
| 214 |
image = Image.fromarray(res_np_img)
|
| 215 |
image.save(f'./result_image.png')
|
| 216 |
return image
|
|
|
|
| 199 |
start = time.time()
|
| 200 |
res_np_img = model(image, mask, config)
|
| 201 |
logger.info(f"process time: {(time.time() - start) * 1000}ms, {res_np_img.shape}")
|
| 202 |
+
print(f"process time_1_: {(time.time() - start) * 1000}ms, {alpha_channel.shape}, {res_np_img.shape} / {res_np_img[250][250]}")
|
| 203 |
|
| 204 |
torch.cuda.empty_cache()
|
| 205 |
|
|
|
|
| 211 |
res_np_img = np.concatenate(
|
| 212 |
(res_np_img, alpha_channel[:, :, np.newaxis]), axis=-1
|
| 213 |
)
|
| 214 |
+
print(f"process time_2_: {(time.time() - start) * 1000}ms, {res_np_img.shape} / {res_np_img[250][250]}")
|
| 215 |
image = Image.fromarray(res_np_img)
|
| 216 |
image.save(f'./result_image.png')
|
| 217 |
return image
|