LoSealL / VideoSuperResolution

A collection of state-of-the-art video or single-image super-resolution architectures, reimplemented in tensorflow.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

List Index Out Of Range

davrocks opened this issue · comments

Hello (again)!
I just had a quick question about the proper configuration for evaluating RBPN. I input the following:
python eval.py rbpn --cuda --test /usr/local/VideoSuperResolution/LR_INPUT/

This returns an error:

2019-07-06 00:52:13,227 INFO: LICENSE: RBPN is implemented by M. Haris, et. al. @alterzero
2019-07-06 00:52:13,227 WARNING: I use unsupervised flownet to estimate optical flow, rather than pyflow module.
2019-07-06 00:52:16,775 INFO: Total params: 14517449
Traceback (most recent call last):
  File "eval.py", line 162, in <module>
    main()
  File "eval.py", line 153, in main
    loader = Loader(test_data, 'test', loader_config, n_threads=opt.thread)
  File "/usr/local/VideoSuperResolution/VSR/DataLoader/Loader.py", line 322, in __init__
    augmentation, **kwargs)
  File "/usr/local/VideoSuperResolution/VSR/DataLoader/Loader.py", line 127, in __init__
    self.parser = _m.Parser(dataset, config)
  File "/usr/local/VideoSuperResolution/VSR/DataLoader/Parser/custom_pairs.py", line 46, in __init__
    vf.pad([depth // 2, depth // 2])
  File "/usr/local/VideoSuperResolution/VSR/DataLoader/VirtualFile.py", line 419, in pad
    self.file.insert(0, self.file[0])
IndexError: list index out of range

I have tried inputting both .mp4 files and frames titled 01.jpg, 02.jpg, 03.jpg ... (in separate attempts) and the input is about 350 by 350 pixels. I've tried using a video that only has 30 or so frames, and I also tried a 700 frame video. All give the same error.

By the way, here is a link for some of the training pth files I made on the CelebA dataset for esrgan:
https://drive.google.com/open?id=1e9F7QCd-SeK0FCxQ_cJz09XIUDwxJVYv
It might be useful for someone... after epoch 310, I switched from PSNR to gan-oriented training with a weight of 5.0e-4. The results at epoch 527 look good :)

EDIT: I just put some video frames into ESRGAN, and I seem to be getting the same problem in all images for ESRGAN as well (which is weird because ESRGAN worked a few minutes ago).

EDIT 2: Huh, that is so weird, ESRGAN sometimes works, and sometimes gives this error (for the same images!!!) It might have something to do with the graphics card, because ESRGAN never works on my computer for these images, but sometimes works on google colab (when the servers arent busy ig).

Got it, will take some time to verify it.

You should arrange a video into sequential pictures and put them under a folder:

|-LR_INPUT
|----video0
|--------frame000.png
|--------frame001.png
|--------...
|----video1
|----...