Skip to content

Commit f087b49

Browse files
committed
[formatting] isort and black
1 parent 287343a commit f087b49

File tree

1 file changed

+10
-10
lines changed

1 file changed

+10
-10
lines changed

utils/compute_overall_kmac_per_px.py

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -52,15 +52,15 @@ def generate_csv_classwise_image_gmac(dataset_name, result_path, list_of_classwi
5252
complexity_dict = {"Dataset": seq_name, "pp": idx}
5353
comp_path = f"{base_path}/{qp}/evaluation/summary_complexity.csv"
5454
summary_path = f"{base_path}/{qp}/evaluation/summary.csv"
55-
55+
5656
if not (os.path.exists(summary_path) or os.path.exists(summary_path)):
5757
continue
58-
58+
5959
with open(summary_path, mode="r", newline="", encoding="utf-8") as file:
6060
reader = csv.DictReader(file)
6161
data = [row for row in reader][0]
6262
complexity_dict["qp"] = data["qp"]
63-
63+
6464
with open(comp_path, mode="r", newline="", encoding="utf-8") as file:
6565
reader = csv.DictReader(file)
6666
data = [row for row in reader][0]
@@ -80,22 +80,22 @@ def generate_csv_classwise_video_gmac(
8080
):
8181

8282
seq_base_path = [
83-
f
84-
for f in os.listdir(result_path)
85-
if os.path.isdir(os.path.join(result_path, f))
86-
]
83+
f
84+
for f in os.listdir(result_path)
85+
if os.path.isdir(os.path.join(result_path, f))
86+
]
8787

8888
seq_wise_results, cls_wise_results = [], []
8989
for cls_seqs in list_of_classwise_seq:
9090
for cls_name, seqs in cls_seqs.items():
9191
complexity_lst_class_wise = []
92-
92+
9393
seq_path = [
94-
next(name for name in seq_base_path if s in name)
94+
next(name for name in seq_base_path if s in name)
9595
for s in seqs
9696
if any(s in name for name in seq_base_path)
9797
]
98-
98+
9999
for seq in seq_path:
100100
base_path = f"{result_path}/{seq}"
101101
qps = [

0 commit comments

Comments
 (0)