Mukosame / Zooming-Slow-Mo-CVPR-2020

Fast and Accurate One-Stage Space-Time Video Super-Resolution (accepted in CVPR 2020)
GNU General Public License v3.0
915 stars 164 forks source link

Questions about generating LR images #17

Closed littlewhitesea closed 4 years ago

littlewhitesea commented 4 years ago

thanks for your excellent work. I met some problems in the stage of generating LR images.

  1. I want to generate LR images via Python, so I run generate_mod_LR_bic.py, but I am told ''name 'imresize_np' is not defined''. I try to solve it, but don't find 'imresize_np' in util.py of 'data' folder.

  2. Are the input and output path in generate_mod_LR_bic.py identical to these of sep_vimeo_list.py? I set these path in the two python files same, the HR, LR and Bic folder can be created, but no images are produced in these folder.

Could you help me to solve above issues?

Mukosame commented 4 years ago

Hi, thanks for bringing this up! I forgot to put that function when creating this repo. I just made a new push to fix this issue.

The input of generate_mod_LR_bic.py is the HR path, the output path is where you want to put the generated LR images, and bicubic-upsampled images(usually we only use them as a baseline to compare with).

The input of sep_vimeo_list.py is your input test/train/etc. images, it just cuts the files in the given list from the input path and pastes in your output path. It won't create any images, but just a cut/paste script to help you separate your test/train files from the whole Vimeo set, or separate the fast/medium/slow subsets from the test sets.

Hope these answers find you well :)

littlewhitesea commented 4 years ago

Thanks for your quick and detailed reply!

I added the function 'imresize_np' in the util.py, besides I also imported 'torch' and 'math' Library Functions, but I was told that 'calculate_weights_indices' function on the line 224 of util.py is unresolved reference.

Could you please help me again?

Mukosame commented 4 years ago

Hi, does the new update work?

Mukosame commented 4 years ago

The function you jus mentioned is defined here: https://github.com/Mukosame/Zooming-Slow-Mo-CVPR-2020/blob/master/codes/data/util.py#L212

littlewhitesea commented 4 years ago

Thank you very much, the update version can work.

L4zyy commented 4 years ago

You seem to forget to import torch and math to util.py at the new commit @Mukosame

Mukosame commented 4 years ago

@L4zyyThanks! You're right :)