mirror of
https://github.com/hzwer/ECCV2022-RIFE.git
synced 2025-12-16 16:37:51 +01:00
Update inference_video.py
This commit is contained in:
@@ -223,7 +223,11 @@ while True:
|
||||
pbar.update(1)
|
||||
continue
|
||||
|
||||
if ssim < 0.5:
|
||||
if ssim < 0.2:
|
||||
output = []
|
||||
for i in range((2 ** args.exp) - 1):
|
||||
output.append(I0)
|
||||
'''
|
||||
output = []
|
||||
step = 1 / (2 ** args.exp)
|
||||
alpha = 0
|
||||
@@ -231,6 +235,7 @@ while True:
|
||||
alpha += step
|
||||
beta = 1-alpha
|
||||
output.append(torch.from_numpy(np.transpose((cv2.addWeighted(frame[:, :, ::-1], alpha, lastframe[:, :, ::-1], beta, 0)[:, :, ::-1].copy()), (2,0,1))).to(device, non_blocking=True).unsqueeze(0).float() / 255.)
|
||||
'''
|
||||
else:
|
||||
output = make_inference(I0, I1, 2**args.exp-1) if args.exp else []
|
||||
|
||||
|
||||
Reference in New Issue
Block a user