(frame_paths)
| 91 | |
| 92 | |
| 93 | def sort_frames(frame_paths): |
| 94 | # Extract filenames from each path and sort by their numeric part |
| 95 | jpg_paths = [p for p in frame_paths if p.lower().endswith('.jpg')] |
| 96 | return sorted(jpg_paths, key=lambda x: extract_frame_number(os.path.basename(x))) |
| 97 | |
| 98 | |
| 99 | def read_frames_folder(video_path, num_frames, sample='rand', fix_start=None, min_num_frames=4): |
no test coverage detected