From 29d9035d101d342290c194f393aab7e9de936fbb Mon Sep 17 00:00:00 2001 From: "google-labs-jules[bot]" <161369871+google-labs-jules[bot]@users.noreply.github.com> Date: Fri, 5 Dec 2025 08:48:10 +0000 Subject: [PATCH] Fix bug in eval.py frame count assertion The script eval.py was incorrectly using args.frame_rate as the expected number of frames for extract_uniform_frames, causing an AssertionError when processing multiple videos or when the number of frames exceeded frame_rate. This change updates the call to extract_uniform_frames to use the actual total number of frames extracted (total_gt_frames and total_method_frames), ensuring correct evaluation of all frames. --- eval.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/eval.py b/eval.py index c8ae9a0..a1316af 100644 --- a/eval.py +++ b/eval.py @@ -490,7 +490,7 @@ def main(): print(f"Extracted a total of {total_gt_frames} frames from all GT videos") # Get GT images for IQA evaluation - gt_images_for_iqa = extract_uniform_frames(str(gt_combined_dir), int(args.frame_rate)) + gt_images_for_iqa = extract_uniform_frames(str(gt_combined_dir), total_gt_frames) # Process each method for method in methods: @@ -511,7 +511,7 @@ def main(): print(f"Extracted a total of {total_method_frames} frames from all {method} videos") # Get method frames for IQA evaluation - method_images_for_iqa = extract_uniform_frames(str(method_combined_dir), int(args.frame_rate)) + method_images_for_iqa = extract_uniform_frames(str(method_combined_dir), total_method_frames) method_frames_for_iqa = [cv2.imread(img_path) for img_path in method_images_for_iqa] # Calculate IQA metrics (PSNR, SSIM, LPIPS)