From b6d9a804faf012b80dc1fdc862d96ec56c4a89fa Mon Sep 17 00:00:00 2001 From: Zeyi Sun <983499284@qq.com> Date: Tue, 8 Jul 2025 16:25:00 +0800 Subject: [PATCH] fix compare_videos in vlc.py (#242) fix result in the same format of float number. --- desktop_env/evaluators/metrics/vlc.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/desktop_env/evaluators/metrics/vlc.py b/desktop_env/evaluators/metrics/vlc.py index bb8e5de..52125a3 100644 --- a/desktop_env/evaluators/metrics/vlc.py +++ b/desktop_env/evaluators/metrics/vlc.py @@ -308,7 +308,7 @@ def compare_videos(video_path1, video_path2, max_frames_to_check=100, threshold= # If a video ends, then check if both ended to confirm they are of the same length if not ret1 or not ret2: - return ret1 == ret2 + return 1. if ret1 == ret2 else 0. # return float only # Convert frames to PIL Images frame1 = Image.fromarray(cv2.cvtColor(frame1, cv2.COLOR_BGR2RGB))