Spaces:
Runtime error
Runtime error
ercanburak
commited on
Commit
•
7ce8504
1
Parent(s):
d123883
add crop since some input videos have black lines at rightmost column
Browse files
app.py
CHANGED
@@ -51,7 +51,7 @@ def retrieve_results(selected_dataset, selected_sequence, selected_models, selec
|
|
51 |
padding = 2
|
52 |
font_size = 20
|
53 |
num_cols = len(selected_models)
|
54 |
-
crop_str = "crop=trunc(iw/2)*2:trunc(ih/2)*2"
|
55 |
pad_str = "pad=ceil(iw/2)*2+{}:ceil(ih/2)*2+{}:{}:{}:white".format(padding*2, padding*2, padding, padding)
|
56 |
num_elements = num_rows * num_cols
|
57 |
|
@@ -108,7 +108,7 @@ def retrieve_results(selected_dataset, selected_sequence, selected_models, selec
|
|
108 |
else:
|
109 |
pad_txt_str = ""
|
110 |
|
111 |
-
input_filter_part = "[{}:v]scale={}:-1,{}{}[v{}]".format(vid_idx, w, pad_str, pad_txt_str, vid_idx)
|
112 |
input_filter_parts.append(input_filter_part)
|
113 |
xstack_input_part = "[v{}]".format(vid_idx)
|
114 |
xstack_input_parts.append(xstack_input_part)
|
|
|
51 |
padding = 2
|
52 |
font_size = 20
|
53 |
num_cols = len(selected_models)
|
54 |
+
crop_str = "crop=trunc(iw/2)*2-2:trunc(ih/2)*2,"
|
55 |
pad_str = "pad=ceil(iw/2)*2+{}:ceil(ih/2)*2+{}:{}:{}:white".format(padding*2, padding*2, padding, padding)
|
56 |
num_elements = num_rows * num_cols
|
57 |
|
|
|
108 |
else:
|
109 |
pad_txt_str = ""
|
110 |
|
111 |
+
input_filter_part = "[{}:v]scale={}:-1,{}{}{}[v{}]".format(vid_idx, w, crop_str, pad_str, pad_txt_str, vid_idx)
|
112 |
input_filter_parts.append(input_filter_part)
|
113 |
xstack_input_part = "[v{}]".format(vid_idx)
|
114 |
xstack_input_parts.append(xstack_input_part)
|