From f668ad82eeb7d479bd8ea95d217dc1fedf7ec40d Mon Sep 17 00:00:00 2001 From: hzwer <598460606@163.com> Date: Thu, 17 Jun 2021 14:14:34 +0800 Subject: [PATCH] Remove frame blend in default --- inference_video.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/inference_video.py b/inference_video.py index f05109d..d5b33bd 100644 --- a/inference_video.py +++ b/inference_video.py @@ -214,7 +214,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 @@ -222,6 +226,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 []