mirror of
https://github.com/hzwer/ECCV2022-RIFE.git
synced 2026-02-24 04:19:41 +01:00
Fix lastframe
This commit is contained in:
@@ -48,9 +48,9 @@ if args.montage:
|
||||
while success:
|
||||
lastframe = frame
|
||||
success, frame = videoCapture.read()
|
||||
if args.montage:
|
||||
frame = frame[:, left: left + w]
|
||||
if success:
|
||||
if args.montage:
|
||||
frame = frame[:, left: left + w]if args.montage:
|
||||
I0 = torch.from_numpy(np.transpose(lastframe, (2,0,1)).astype("float32") / 255.).to(device).unsqueeze(0)
|
||||
I1 = torch.from_numpy(np.transpose(frame, (2,0,1)).astype("float32") / 255.).to(device).unsqueeze(0)
|
||||
I0 = F.pad(I0, padding)
|
||||
|
||||
@@ -48,9 +48,9 @@ if args.montage:
|
||||
while success:
|
||||
lastframe = frame
|
||||
success, frame = videoCapture.read()
|
||||
if args.montage:
|
||||
frame = frame[:, left: left + w]
|
||||
if success:
|
||||
if args.montage:
|
||||
frame = frame[:, left: left + w]
|
||||
I0 = torch.from_numpy(np.transpose(lastframe, (2,0,1)).astype("float32") / 255.).to(device).unsqueeze(0)
|
||||
I1 = torch.from_numpy(np.transpose(frame, (2,0,1)).astype("float32") / 255.).to(device).unsqueeze(0)
|
||||
I0 = F.pad(I0, padding)
|
||||
|
||||
Reference in New Issue
Block a user