sniklaus / revisiting-sepconv

an implementation of Revisiting Adaptive Convolutions for Video Frame Interpolation using PyTorch
Other
82 stars 12 forks source link

About the 1280 × 720 resolution #1

Closed zzxihuanheixiu closed 2 years ago

zzxihuanheixiu commented 2 years ago

Dear author, I want to use your model to deal with 1624 × 1224 resolution video, but unfortunately, your model seems to limit the maximum resolution to 1280 × 720。 How can you change your code to deal with higher resolution video? I'm a little worried. If you see the message, please contact my email: zhongzhi@hnu.edu.cn

sniklaus commented 2 years ago

Thank you for your interest in our work! What happens if you try to run it on a 1624x1224 resolution?

zzxihuanheixiu commented 2 years ago

Traceback (most recent call last): File "run.py", line 486, in tenFrames[2] = estimate(tenFrames[0], tenFrames[4]) File "run.py", line 443, in estimate assert(intWidth <= 1280) # while our approach works with larger images, we do not recommend it unless you are aware of the implications AssertionError

zzxihuanheixiu commented 2 years ago

I have a good idea. I can use OpenCV to resize the video below 1280 × 720 resolution, and then throw the processed video into your model. Do you think it's ok?

zzxihuanheixiu commented 2 years ago

Hello, I just tried to turn the video into 224 × 224 resolution, and then throw the processed video into your model, but the program prompts me the following error:

Traceback (most recent call last): File "run.py", line 486, in tenFrames[2] = estimate(tenFrames[0], tenFrames[4]) File "run.py", line 455, in estimate return netNetwork([tenPreprocessedOne, tenPreprocessedTwo])[0, :, :intHeight, :intWidth].cpu() File "/home/zz/anaconda3/envs/pytorch-1/lib/python3.8/site-packages/torch/nn/modules/module.py", line 889, in _call_impl result = self.forward(*input, *kwargs) File "run.py", line 414, in forward tenOut = sepconv.sepconv_func.apply(tenOne, tenVerone, tenHorone) + sepconv.sepconv_func.apply(tenTwo, tenVertwo, tenHortwo) File "/home/zz/anaconda3/envs/pytorch-1/lib/python3.8/site-packages/torch/cuda/amp/autocast_mode.py", line 216, in decorate_fwd return fwd(args, **kwargs) File "/home/disk/Zhong_Zhi_Experiments/Frame_Interpolation_Experiments/SepConv++_code/./sepconv/sepconv.py", line 199, in forward cuda_launch(cuda_kernel('sepconv_out', ''' File "cupy/_util.pyx", line 67, in cupy._util.memoize.decorator.ret File "/home/disk/Zhong_Zhi_Experiments/Frame_Interpolation_Experiments/SepConv++_code/./sepconv/sepconv.py", line 185, in cuda_launch return cupy.cuda.compile_with_cache(objCudacache[strKey]['strKernel'], tuple(['-I ' + os.environ['CUDA_HOME'], '-I ' + os.environ['CUDA_HOME'] + '/include'])).get_function(objCudacache[strKey]['strFunction']) AttributeError: 'NoneType' object has no attribute 'get_function'

sniklaus commented 2 years ago

assert(intWidth <= 1280) # while our approach works with larger images, we do not recommend it unless you are aware of the implications

Have you tried commenting out this assert statement?

I can use OpenCV to resize the video below 1280 × 720 resolution, and then throw the processed video into your model. Do you think it's ok?

Yes, and lowering the resolution might even get you better interpolation results (at a loss of fidelity, of course).

'NoneType' object has no attribute 'get_function'

You are hitting this bug in CuPy which you should be able to resolve be using an older CuPy version: https://github.com/cupy/cupy/issues/6231

zzxihuanheixiu commented 2 years ago

assert(intWidth <= 1280) # while our approach works with larger images, we do not recommend it unless you are aware of the implications

Have you tried commenting out this assert statement?

I can use OpenCV to resize the video below 1280 × 720 resolution, and then throw the processed video into your model. Do you think it's ok?

Yes, and lowering the resolution might even get you better interpolation results (at a loss of fidelity, of course).

'NoneType' object has no attribute 'get_function'

You are hitting this bug in CuPy which you should be able to resolve be using an older CuPy version: cupy/cupy#6231

zzxihuanheixiu commented 2 years ago

Thanks,I will install older CuPy and try this code again!

sniklaus commented 2 years ago

Closing due to inactivity, feel free to reopen if this issue persists.