mirror of
https://github.com/nerfstudio-project/nerfstudio.git
synced 2026-11-22 07:35:26 +08:00
metrics automation
This commit is contained in:
1 parent
1b1e2d9fba
commit
8daba3cfc7
14 files changed
+442
-139
No files matched your search
@@ -80,4 +80,17 @@ if __name__ == "__main__":
|
||||
print("SSIM: ", ssim_index)
|
||||
print("PSNR: ", psnr_index)
|
||||
lpips_index = piq.LPIPS(reduction='none')(torch.stack(gts), torch.stack(preds))
|
||||
print("LPIPS: ", torch.mean(lpips_index))
|
||||
print("LPIPS: ", torch.mean(lpips_index))
|
||||
|
||||
results = {
|
||||
"SSIM": str(ssim_index),
|
||||
"PSNR": str(psnr_index),
|
||||
"LPIPS": str(torch.mean(lpips_index))
|
||||
}
|
||||
|
||||
output_path = os.path.join(args.data_dir, "ldr_results.json")
|
||||
|
||||
with open(output_path, 'w') as f:
|
||||
json.dump(results, f, indent=4)
|
||||
|
||||
print(f"Saved metrics to: {output_path}")
|
||||
Reference in new issue
Block a user