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

EDVR and ESRGAN are broken (fixed colab attached) #5

Open
eyaler opened this issue Aug 14, 2020 · 14 comments
Open

EDVR and ESRGAN are broken (fixed colab attached) #5

eyaler opened this issue Aug 14, 2020 · 14 comments

Comments

@eyaler
Copy link

eyaler commented Aug 14, 2020

fixed here: https://colab.research.google.com/drive/1dxYc6BBtUwOaIl6YHgHsoORel-8nhJNP

@eltechno
Copy link

hi i saw your notebook have the same issues as this

----> 5 import utils.util as util
6 import data.util as data_util
7 import models.archs.edvr_arch as EDVR_arch

the module utils is missing and there's no way to find it :(

@eyaler
Copy link
Author

eyaler commented Aug 15, 2020

@eltechno it works for me. utils is in EDVR/basicsr and this make it importable: sys.path.append('/content/EDVR/basicsr')

@AlexRMU
Copy link

AlexRMU commented Aug 15, 2020

Confirm.

[Errno 2] No such file or directory: '/content/EDVR/codes/models/archs/dcn'
/content
python3: can't open file 'setup.py': [Errno 2] No such file or directory
[Errno 2] No such file or directory: '/content/EDVR/codes'
/content
/content/EDVR/experiments/pretrained_models/EDVR_REDS_deblurcomp_L.pth: No such file or directory

In the original, the locations of some directories were changed, and the code changed accordingly. But not here.

@eltechno
Copy link

@AlexRMU i think this might help you

Replace "codes" for "basicsr"

@AlexRMU
Copy link

AlexRMU commented Aug 18, 2020

@eltechno Ok, but now there is this

!pip install mmcv-full yapf
!apt-get install yapf
---
import utils.util as util
---------------------------------------------------------------------------
ModuleNotFoundError                       Traceback (most recent call last)
<ipython-input-27-bf88b85cc2fb> in <module>()
----> 2 import utils.util as util
      3 import data.util as data_util
      4 import models.archs.EDVR_arch as EDVR_arch
      5 

6 frames
/usr/local/lib/python3.6/dist-packages/mmcv/utils/config.py in <module>()
     11 
     12 from addict import Dict
---> 13 from yapf.yapflib.yapf_api import FormatCode
     14 
     15 from .path import check_file_exist

ModuleNotFoundError: No module named 'yapf'

---------------------------------------------------------------------------
NOTE: If your import is failing due to a missing package, you can
manually install dependencies using either !pip or !apt.

To view examples of installing some common dependencies, click the
"Open Examples" button below.
---------------------------------------------------------------------------

@eltechno
Copy link

@AlexRMU as @eyaler mentioned a few days ago

@eltechno it works for me. utils is in EDVR/basicsr and this make it importable: sys.path.append('/content/EDVR/basicsr')

please add it to the header, i did it but unfortunately another issues came out and i decide to quit

@AlexRMU
Copy link

AlexRMU commented Aug 19, 2020

@eltechno, nope

import sys, os
%cd /content

sys.path.append('/content/EDVR/basicsr')
sys.path.append('/content/EDVR/basicsr/utils')
sys.path.append('/content/EDVR/basicsr/utils/util.py')

import utils.util as util
import data.util as data_util
import models.archs.EDVR_arch as EDVR_arch

---------------------------------------------------------------------------
ModuleNotFoundError                       Traceback (most recent call last)
<ipython-input-44-b5306e42746c> in <module>()
      7 sys.path.append('/content/EDVR/basicsr/utils/util.py')
      8 
----> 9 import utils.util as util
     10 import data.util as data_util
     11 import models.archs.EDVR_arch as EDVR_arch

1 frames
/content/EDVR/basicsr/utils/util.py in <module>()
     12 from torchvision.utils import make_grid
     13 
---> 14 from basicsr.utils import get_root_logger
     15 
     16 

ModuleNotFoundError: No module named 'basicsr'

@AlexRMU
Copy link

AlexRMU commented Aug 19, 2020

In short, the following problems have been found so far:

  • There is no /experiments/pretrained_models/ and it is unclear where to put ED VR_RED_deblurcomp_L.pth
  • Problems with utils

@eyaler
Copy link
Author

eyaler commented Aug 19, 2020

@AlexRMU @eltechno
sorry. i fixed all your issues. please note i only fixed sections 2 and 4

https://colab.research.google.com/drive/1dxYc6BBtUwOaIl6YHgHsoORel-8nhJNP

btw, i was not able yet to get any good results with EDVR or ESRGAN... would be happy to get some pointers.

@eyaler eyaler changed the title EDVR and ESRGAN are broken EDVR and ESRGAN are broken (fixed colab attached) Aug 19, 2020
@AlexRMU
Copy link

AlexRMU commented Aug 20, 2020

Confirm. The link version works.

@AlexRMU
Copy link

AlexRMU commented Aug 30, 2020

Colorize video (DeOldify)
Error:
Permission denied: https://drive.google.com/uc?id=1-3ONnPYcX9fOqnY-pUKYGJOd6XeFon9X

This does not apply to the topic, you need to create a new issue

@brunodbrazil
Copy link

The results are not good. With the previous version, I get great results. I tried to use the same video and the result is bad. I think it's broken.

I've this error too:

Using /usr/local/lib/python3.6/dist-packages
Finished processing dependencies for basicsr==1.0.1+6523ff3
File ‘/content/EDVR/experiments/pretrained_models/EDVR_REDS_deblurcomp_L.pth’ already there; not retrieving.
python3: can't open file 'update_model.py': [Errno 2] No such file or directory
mv: target '/content/EDVR/experiments/pretrained_models/EDVR_REDS_deblurcomp_L.pth' is not a directory

@brunodbrazil
Copy link

Nobody?

@scottvr
Copy link

scottvr commented Sep 13, 2021

Resurrecting this old thread to share information that may be useful to others who are only recently experimenting with EDVR/ESRGAN and haveing failures with python modules, their Googling has led them here, as mine did me.

With EDVR and Python as they exist today, to get past the utils.util (and then data.util once that line is remedied) ModuleNotFoundError - the sys.path.append() is still relevant, but the contents of utils and data have changed so in order to get this to work now, these lines:

import utils.util as util
import data.util as data_util

should be written thusly:

import utils as util
import data.data_util as data_util

Additionally, I found that - at least as of today - util.mkdirs() and util.mkdir_or_exist() are no longer valid. I replaced the mkdirs() calls with mkdir_and_rename(), which is provided by utils/misc.py.

I hope this is helpful to someone.

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

5 participants