add log
Browse filesFiles changed (2)
15 unmodified lines16171819202110 unmodified lines32333435363715 unmodified linesdef read_video_frames(video_path, process_length, target_fps=-1, max_res=-1, dataset="open"):vid = VideoReader(video_path, ctx=cpu(0))original_height, original_width = vid.get_batch([0]).shape[1:3]height = original_heightwidth = original_width10 unmodified linesframes_idx = list(range(0, len(vid), stride))if process_length != -1 and process_length < len(frames_idx):frames_idx = frames_idx[:process_length]frames = vid.get_batch(frames_idx).asnumpy()return frames, fps15 unmodified lines1617181920212210 unmodified lines3334353637383915 unmodified linesdef read_video_frames(video_path, process_length, target_fps=-1, max_res=-1, dataset="open"):vid = VideoReader(video_path, ctx=cpu(0))print("==> original video shape: ", (len(vid), *vid.get_batch([0]).shape[1:]))original_height, original_width = vid.get_batch([0]).shape[1:3]height = original_heightwidth = original_width10 unmodified linesframes_idx = list(range(0, len(vid), stride))if process_length != -1 and process_length < len(frames_idx):frames_idx = frames_idx[:process_length]print(f"==> final processing shape: {len(frames_idx), *vid.get_batch([0]).shape[1:]}")frames = vid.get_batch(frames_idx).asnumpy()return frames, fps
70 unmodified lines71727374757670 unmodified linesinput_size = int(input_size * 1.78 / ratio)input_size = round(input_size / 14) * 14transform = Compose([Resize(width=input_size,70 unmodified lines717273747576777870 unmodified linesinput_size = int(input_size * 1.78 / ratio)input_size = round(input_size / 14) * 14print(f'==> infer lower bound input size: {input_size}')transform = Compose([Resize(width=input_size,
utils/dc_utils.py+2
video_depth_anything/video_depth.py+2