Spaces:
Sleeping
Sleeping
Commit
·
077e104
1
Parent(s):
af03c71
bug fix
Browse files
app.py
CHANGED
|
@@ -55,6 +55,9 @@ def visualize_single_image(image_path):
|
|
| 55 |
|
| 56 |
# MAE reconstruction pasted with visible patches
|
| 57 |
im_paste = img * (1 - mask) + predicted_img * mask
|
|
|
|
|
|
|
|
|
|
| 58 |
|
| 59 |
# # make the plt figure larger
|
| 60 |
# plt.figure(figsize=(12, 4))
|
|
@@ -73,7 +76,7 @@ def visualize_single_image(image_path):
|
|
| 73 |
|
| 74 |
# plt.tight_layout()
|
| 75 |
|
| 76 |
-
return img
|
| 77 |
|
| 78 |
inputs_image = [
|
| 79 |
gr.components.Image(type="filepath", label="Input Image"),
|
|
|
|
| 55 |
|
| 56 |
# MAE reconstruction pasted with visible patches
|
| 57 |
im_paste = img * (1 - mask) + predicted_img * mask
|
| 58 |
+
|
| 59 |
+
# convert to numpy
|
| 60 |
+
img = img[0].cpu().detach().numpy()
|
| 61 |
|
| 62 |
# # make the plt figure larger
|
| 63 |
# plt.figure(figsize=(12, 4))
|
|
|
|
| 76 |
|
| 77 |
# plt.tight_layout()
|
| 78 |
|
| 79 |
+
return img # , im_masked[0].numpy(), predicted_img[0].numpy(), im_paste[0].numpy()
|
| 80 |
|
| 81 |
inputs_image = [
|
| 82 |
gr.components.Image(type="filepath", label="Input Image"),
|