We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 299c434 commit df1defaCopy full SHA for df1defa
inference_iqa.py
@@ -4,6 +4,7 @@
4
from pyiqa import create_metric
5
from tqdm import tqdm
6
import csv
7
+from time import time
8
9
10
def main():
@@ -52,11 +53,13 @@ def main():
52
53
else:
54
ref_img_path = None
55
56
+ start_time = time()
57
score = iqa_model(img_path, ref_img_path).cpu().item()
58
+ end_time = time()
59
avg_score += score
60
pbar.update(1)
61
pbar.set_description(f'{metric_name} of {img_name}: {score}')
- pbar.write(f'{metric_name} of {img_name}: {score}')
62
+ pbar.write(f'{metric_name} of {img_name}: {score}\tTime: {end_time - start_time:.2f}s')
63
if args.save_file:
64
sfwriter.writerow([img_name, score])
65
0 commit comments