Spaces:
Running
Running
turhancan97
commited on
Commit
•
eb45374
1
Parent(s):
3d450b6
Refactor image reconstruction interface to remove unused code and improve layout
Browse files
app.py
CHANGED
@@ -74,17 +74,17 @@ def visualize_single_image_no_mode(image_path):
|
|
74 |
# make the plt figure larger
|
75 |
plt.figure(figsize=(18, 8))
|
76 |
|
77 |
-
plt.subplot(1,
|
78 |
show_image(img, "original")
|
79 |
|
80 |
-
plt.subplot(1,
|
81 |
show_image(im_masked, "masked")
|
82 |
|
83 |
-
plt.subplot(1, 4, 3)
|
84 |
-
show_image(predicted_img, "reconstruction")
|
85 |
|
86 |
-
plt.subplot(1,
|
87 |
-
show_image(im_paste, "reconstruction
|
88 |
|
89 |
plt.tight_layout()
|
90 |
|
@@ -116,17 +116,17 @@ def visualize_single_image_pca_mode_bottom(image_path):
|
|
116 |
# make the plt figure larger
|
117 |
plt.figure(figsize=(18, 8))
|
118 |
|
119 |
-
plt.subplot(1,
|
120 |
show_image(img, "original")
|
121 |
|
122 |
-
plt.subplot(1,
|
123 |
show_image(im_masked, "masked")
|
124 |
|
125 |
-
plt.subplot(1,
|
126 |
show_image(predicted_img, "reconstruction")
|
127 |
|
128 |
-
plt.subplot(1, 4, 4)
|
129 |
-
show_image(im_paste, "reconstruction + visible")
|
130 |
|
131 |
plt.tight_layout()
|
132 |
|
@@ -158,17 +158,17 @@ def visualize_single_image_pca_mode_top(image_path):
|
|
158 |
# make the plt figure larger
|
159 |
plt.figure(figsize=(18, 8))
|
160 |
|
161 |
-
plt.subplot(1,
|
162 |
show_image(img, "original")
|
163 |
|
164 |
-
plt.subplot(1,
|
165 |
show_image(im_masked, "masked")
|
166 |
|
167 |
-
plt.subplot(1,
|
168 |
show_image(predicted_img, "reconstruction")
|
169 |
|
170 |
-
plt.subplot(1, 4, 4)
|
171 |
-
show_image(im_paste, "reconstruction + visible")
|
172 |
|
173 |
plt.tight_layout()
|
174 |
|
|
|
74 |
# make the plt figure larger
|
75 |
plt.figure(figsize=(18, 8))
|
76 |
|
77 |
+
plt.subplot(1, 3, 1)
|
78 |
show_image(img, "original")
|
79 |
|
80 |
+
plt.subplot(1, 3, 2)
|
81 |
show_image(im_masked, "masked")
|
82 |
|
83 |
+
# plt.subplot(1, 4, 3)
|
84 |
+
# show_image(predicted_img, "reconstruction")
|
85 |
|
86 |
+
plt.subplot(1, 3, 3)
|
87 |
+
show_image(im_paste, "reconstruction")
|
88 |
|
89 |
plt.tight_layout()
|
90 |
|
|
|
116 |
# make the plt figure larger
|
117 |
plt.figure(figsize=(18, 8))
|
118 |
|
119 |
+
plt.subplot(1, 3, 1)
|
120 |
show_image(img, "original")
|
121 |
|
122 |
+
plt.subplot(1, 3, 2)
|
123 |
show_image(im_masked, "masked")
|
124 |
|
125 |
+
plt.subplot(1, 3, 3)
|
126 |
show_image(predicted_img, "reconstruction")
|
127 |
|
128 |
+
# plt.subplot(1, 4, 4)
|
129 |
+
# show_image(im_paste, "reconstruction + visible")
|
130 |
|
131 |
plt.tight_layout()
|
132 |
|
|
|
158 |
# make the plt figure larger
|
159 |
plt.figure(figsize=(18, 8))
|
160 |
|
161 |
+
plt.subplot(1, 3, 1)
|
162 |
show_image(img, "original")
|
163 |
|
164 |
+
plt.subplot(1, 3, 2)
|
165 |
show_image(im_masked, "masked")
|
166 |
|
167 |
+
plt.subplot(1, 3, 3)
|
168 |
show_image(predicted_img, "reconstruction")
|
169 |
|
170 |
+
# plt.subplot(1, 4, 4)
|
171 |
+
# show_image(im_paste, "reconstruction + visible")
|
172 |
|
173 |
plt.tight_layout()
|
174 |
|