Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -60,12 +60,29 @@ if uploaded_img is not None:
|
|
| 60 |
fm = func_model.predict(input_img)
|
| 61 |
fm = fm[0]
|
| 62 |
|
| 63 |
-
|
| 64 |
-
|
| 65 |
-
|
| 66 |
-
|
| 67 |
-
|
| 68 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 69 |
|
| 70 |
plt.tight_layout()
|
| 71 |
st.pyplot(fig1)
|
|
|
|
| 60 |
fm = func_model.predict(input_img)
|
| 61 |
fm = fm[0]
|
| 62 |
|
| 63 |
+
if layer_ind == 0:
|
| 64 |
+
fig1 = plt.figure(figsize=(12, 4))
|
| 65 |
+
for i in range(6):
|
| 66 |
+
plt.subplot(2, 3, i + 1)
|
| 67 |
+
plt.imshow(fm[:, :, i], cmap='gray')
|
| 68 |
+
plt.title(f"Feature Map {i+1}")
|
| 69 |
+
plt.axis('off')
|
| 70 |
+
|
| 71 |
+
elif layer_ind == 1:
|
| 72 |
+
fig1 = plt.figure(figsize=(12, 4))
|
| 73 |
+
for i in range(16):
|
| 74 |
+
plt.subplot(2, 8, i + 1)
|
| 75 |
+
plt.imshow(fm[:, :, i], cmap='gray')
|
| 76 |
+
plt.title(f"Feature Map {i+1}")
|
| 77 |
+
plt.axis('off')
|
| 78 |
+
|
| 79 |
+
elif layer_ind == 2:
|
| 80 |
+
fig1 = plt.figure(figsize=(12, 4))
|
| 81 |
+
for i in range(120):
|
| 82 |
+
plt.subplot(30, 4, i + 1)
|
| 83 |
+
plt.imshow(fm[:, :, i], cmap='gray')
|
| 84 |
+
plt.title(f"Feature Map {i+1}")
|
| 85 |
+
plt.axis('off')
|
| 86 |
|
| 87 |
plt.tight_layout()
|
| 88 |
st.pyplot(fig1)
|