app
Browse files
app.py
CHANGED
@@ -71,12 +71,11 @@ def label_to_color_image(label):
|
|
71 |
return colormap[label]
|
72 |
|
73 |
def draw_plot(pred_img, seg):
|
74 |
-
fig = plt.figure(figsize=(
|
75 |
|
76 |
-
# 그리드의 구성을 변경하여 입력 상자와 출력 상자의 위치를 바꿈
|
77 |
-
grid_spec = gridspec.GridSpec(1, 2, width_ratios=[2, 8]) # width_ratios 값을 조절하여 비율 변경
|
78 |
|
79 |
-
|
|
|
80 |
ax = plt.subplot(grid_spec[1])
|
81 |
LABEL_NAMES = np.asarray(labels_list)
|
82 |
FULL_LABEL_MAP = np.arange(len(LABEL_NAMES)).reshape(len(LABEL_NAMES), 1)
|
@@ -89,7 +88,6 @@ def draw_plot(pred_img, seg):
|
|
89 |
plt.xticks([], [])
|
90 |
ax.tick_params(width=0.0, labelsize=25)
|
91 |
|
92 |
-
# 입력 상자를 다음으로 플로팅
|
93 |
ax = plt.subplot(grid_spec[0])
|
94 |
ax.imshow(pred_img)
|
95 |
ax.axis('off')
|
|
|
71 |
return colormap[label]
|
72 |
|
73 |
def draw_plot(pred_img, seg):
|
74 |
+
fig = plt.figure(figsize=(20, 15))
|
75 |
|
|
|
|
|
76 |
|
77 |
+
grid_spec = gridspec.GridSpec(1, 2, width_ratios=[1, 6])
|
78 |
+
|
79 |
ax = plt.subplot(grid_spec[1])
|
80 |
LABEL_NAMES = np.asarray(labels_list)
|
81 |
FULL_LABEL_MAP = np.arange(len(LABEL_NAMES)).reshape(len(LABEL_NAMES), 1)
|
|
|
88 |
plt.xticks([], [])
|
89 |
ax.tick_params(width=0.0, labelsize=25)
|
90 |
|
|
|
91 |
ax = plt.subplot(grid_spec[0])
|
92 |
ax.imshow(pred_img)
|
93 |
ax.axis('off')
|