Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

对于输入帧的处理 #118

Open
ZXMMD opened this issue Nov 4, 2024 · 1 comment
Open

对于输入帧的处理 #118

ZXMMD opened this issue Nov 4, 2024 · 1 comment

Comments

@ZXMMD
Copy link

ZXMMD commented Nov 4, 2024

作者您好,在RIFE的inference_img.py中,是这样处理输入帧:
https://github.com/hzwer/ECCV2022-RIFE/blob/638322e8bfe6daca4439f7b56503fef4b090d34f/inference_img.py#L57-L60

在Practical-RIFE中,输入帧被resize到(448, 256):

img0 = cv2.imread(args.img[0], cv2.IMREAD_UNCHANGED)
img1 = cv2.imread(args.img[1], cv2.IMREAD_UNCHANGED)
img0 = cv2.resize(img0, (448, 256))
img1 = cv2.resize(img1, (448, 256))
img0 = (torch.tensor(img0.transpose(2, 0, 1)).to(device) / 255.).unsqueeze(0)
img1 = (torch.tensor(img1.transpose(2, 0, 1)).to(device) / 255.).unsqueeze(0)

请问这两种处理方式会对结果造成影响吗?为什么处理方式不一样?

另外还想请教一些问题:

  1. 如果测试集是Xiph,分辨率都是(4096, 2160),但我在测试的时候先把视频帧resize到(256,448),得到光流后,把光流插值到(4096, 2160),最后的插帧结果也是(4096, 2160),这样可以叫做4K视频插帧吗?还是必须保证输入大小是(4096, 2160)?
  2. 如果对输入帧进行resize,得到插帧结果后,再通过插值恢复原始大小,可以通过这种方式实现高分辨率视频插帧吗?
@hzwer
Copy link
Owner

hzwer commented Nov 4, 2024

你好,后者可能是以前为了跑一些demo的遗留代码;1. 可以这样做 但是不建议把分辨率搞这么小再求光流,0.25x 可能就极限了
2. 不能 会很模糊

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants