Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
|
@@ -42,7 +42,6 @@ def visualize_model_output(prediction, img):
|
|
| 42 |
output = np.zeros(prediction.shape)
|
| 43 |
|
| 44 |
for unq_class in unique_classes:
|
| 45 |
-
print(unq_class,'unq_class')
|
| 46 |
rgb_class_unique = rgb_colors[str(int(unq_class))]
|
| 47 |
output[:,:,0][prediction[:,:,0]==unq_class] = rgb_class_unique[0]
|
| 48 |
output[:,:,1][prediction[:,:,0]==unq_class] = rgb_class_unique[1]
|
|
@@ -77,7 +76,6 @@ def return_num_columns(img):
|
|
| 77 |
|
| 78 |
def return_scaled_image(img, num_col, width_early, model_name):
|
| 79 |
if model_name == "SBB/eynollah-main-regions-aug-rotation" or "SBB/eynollah-main-regions-aug-scaling" or "SBB/eynollah-main-regions-ensembled" or "SBB/eynollah-textline":
|
| 80 |
-
print('here')
|
| 81 |
if num_col == 1 and width_early < 1100:
|
| 82 |
img_w_new = 2000
|
| 83 |
img_h_new = int(img.shape[0] / float(img.shape[1]) * 2000)
|
|
|
|
| 42 |
output = np.zeros(prediction.shape)
|
| 43 |
|
| 44 |
for unq_class in unique_classes:
|
|
|
|
| 45 |
rgb_class_unique = rgb_colors[str(int(unq_class))]
|
| 46 |
output[:,:,0][prediction[:,:,0]==unq_class] = rgb_class_unique[0]
|
| 47 |
output[:,:,1][prediction[:,:,0]==unq_class] = rgb_class_unique[1]
|
|
|
|
| 76 |
|
| 77 |
def return_scaled_image(img, num_col, width_early, model_name):
|
| 78 |
if model_name == "SBB/eynollah-main-regions-aug-rotation" or "SBB/eynollah-main-regions-aug-scaling" or "SBB/eynollah-main-regions-ensembled" or "SBB/eynollah-textline":
|
|
|
|
| 79 |
if num_col == 1 and width_early < 1100:
|
| 80 |
img_w_new = 2000
|
| 81 |
img_h_new = int(img.shape[0] / float(img.shape[1]) * 2000)
|