Spaces:
Sleeping
Sleeping
Commit
·
b62208c
1
Parent(s):
36a6b78
minor bug fix!
Browse files
app.py
CHANGED
|
@@ -58,11 +58,11 @@ def visualize_single_image_no_mode(image_path):
|
|
| 58 |
# MAE reconstruction pasted with visible patches
|
| 59 |
im_paste = img * (1 - mask) + predicted_img * mask
|
| 60 |
|
| 61 |
-
#
|
| 62 |
-
img =
|
| 63 |
-
im_masked =
|
| 64 |
-
predicted_img =
|
| 65 |
-
im_paste =
|
| 66 |
|
| 67 |
# make the plt figure larger
|
| 68 |
plt.figure(figsize=(18, 8))
|
|
@@ -101,6 +101,7 @@ def visualize_single_image_pca_mode(image_path):
|
|
| 101 |
im_paste = img * (1 - mask) + predicted_img * mask
|
| 102 |
|
| 103 |
# remove the batch dimension
|
|
|
|
| 104 |
im_masked = im_masked[0]
|
| 105 |
predicted_img = predicted_img[0]
|
| 106 |
im_paste = im_paste[0]
|
|
|
|
| 58 |
# MAE reconstruction pasted with visible patches
|
| 59 |
im_paste = img * (1 - mask) + predicted_img * mask
|
| 60 |
|
| 61 |
+
# remove the batch dimension
|
| 62 |
+
img = img[0]
|
| 63 |
+
im_masked = im_masked[0]
|
| 64 |
+
predicted_img = predicted_img[0]
|
| 65 |
+
im_paste = im_paste[0]
|
| 66 |
|
| 67 |
# make the plt figure larger
|
| 68 |
plt.figure(figsize=(18, 8))
|
|
|
|
| 101 |
im_paste = img * (1 - mask) + predicted_img * mask
|
| 102 |
|
| 103 |
# remove the batch dimension
|
| 104 |
+
img = img[0]
|
| 105 |
im_masked = im_masked[0]
|
| 106 |
predicted_img = predicted_img[0]
|
| 107 |
im_paste = im_paste[0]
|