Skip to content
This repository was archived by the owner on Mar 31, 2026. It is now read-only.

Commit 99745d0

Browse files
committed
Update analysis script and metrics.
1 parent 06b2610 commit 99745d0

2 files changed

Lines changed: 5 additions & 4 deletions

File tree

ANALYSIS.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -111,6 +111,6 @@ The following commands should be executed once for each dataset.
111111

112112
```
113113
python.exe .\comparedds.py --todds --texconv --batch [Path to datasets]\[Dataset] [Path to output files] > [Path to results]\[dataset_name]_batch.csv
114-
python.exe .\comparedds.py --todds --metrics [Path to datasets]\[Dataset] [Path to output files] > [Path to results]\[dataset_name]_metrics.csv
115-
python.exe .\comparedds.py --texconv --metrics [Path to datasets]\[Dataset] [Path to output files] > [Path to results]\[dataset_name]_metrics.csv
114+
python.exe .\comparedds.py --todds --metrics [Path to datasets]\[Dataset] [Path to output files] > [Path to results]\[dataset_name]_todds_metrics.csv
115+
python.exe .\comparedds.py --texconv --metrics [Path to datasets]\[Dataset] [Path to output files] > [Path to results]\[dataset_name]_texconv_metrics.csv
116116
```

tools/comparedds.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -267,7 +267,7 @@ def calculate_metrics(arguments, input_files):
267267
csv_out = csv.writer(sys.stdout, lineterminator='\n')
268268
# ToDo FLIP fails on every data set.
269269
# csv_out.writerow(['File', 'Tool', 'FLIP (Mean)', 'PSNR'])
270-
csv_out.writerow(['File', 'Tool', 'PSNR'])
270+
csv_out.writerow(['File', 'Tool', 'PSNR', 'SSIM'])
271271
for tool, data in encoder_data.items():
272272
if getattr(arguments, tool):
273273
output_path = os.path.join(args.output, tool)
@@ -278,10 +278,11 @@ def calculate_metrics(arguments, input_files):
278278
decode_png(dds_file, png_file)
279279
# flip_mean = calculate_flip(input_file, png_file)
280280
psnr = calculate_metric(input_file, png_file, 'PSNR')
281+
ssim = calculate_metric(input_file, png_file, 'SSIM')
281282
if os.sep in input_file:
282283
input_file = input_file.rpartition(os.sep)[-1]
283284
# csv_out.writerow([input_file, tool, flip_mean, psnr])
284-
csv_out.writerow([input_file, tool, psnr])
285+
csv_out.writerow([input_file, tool, psnr, ssim])
285286

286287

287288
if __name__ == '__main__':

0 commit comments

Comments
 (0)