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

Running impersonator.ipynb in Google Colab #69

Open
Leggerla opened this issue Dec 9, 2020 · 2 comments
Open

Running impersonator.ipynb in Google Colab #69

Leggerla opened this issue Dec 9, 2020 · 2 comments

Comments

@Leggerla
Copy link

Leggerla commented Dec 9, 2020

If I try to run your impersonator.ipynb on Colab with just Run All, on cell

%%bash
python run_imitator.py --gpu_ids 0 --model imitator --output_dir ./outputs/results/  \
    --src_path      ./assets/src_imgs/internet/men1_256.jpg    \
    --tgt_path      ./assets/samples/refs/iPER/024_8_2    \
    --bg_ks 7   --ft_ks 3 \
    --has_detector  --post_tune --front_warp \
    --save_res

it gives this error:

---------------------------------------------------------------------------
UnknownBackend                            Traceback (most recent call last)
/usr/local/lib/python3.6/dist-packages/IPython/core/interactiveshell.py in enable_matplotlib(self, gui)
   2953         # Now we must activate the gui pylab wants to use, and fix %run to take
   2954         # plot updates into account
-> 2955         self.enable_gui(gui)
   2956         self.magics_manager.registry['ExecutionMagics'].default_runner = \
   2957             pt.mpl_runner(self.safe_execfile)

/usr/local/lib/python3.6/dist-packages/IPython/terminal/interactiveshell.py in enable_gui(self, gui)
    512         if gui:
    513             self.active_eventloop, self._inputhook =\
--> 514                 get_inputhook_name_and_func(gui)
    515         else:
    516             self.active_eventloop = self._inputhook = None

/usr/local/lib/python3.6/dist-packages/IPython/terminal/pt_inputhooks/__init__.py in get_inputhook_name_and_func(gui)
     36 
     37     if gui not in backends:
---> 38         raise UnknownBackend(gui)
     39 
     40     if gui in aliases:

UnknownBackend: No event loop integration for 'inline'. Supported event loops are: qt, qt4, qt5, gtk, gtk2, gtk3, tk, wx, pyglet, glut, osx
[TerminalIPythonApp] WARNING | GUI event loop or pylab initialization failed
Traceback (most recent call last):
  File "run_swap.py", line 2, in <module>
    from models.swapper import Swapper
  File "/content/impersonator/models/swapper.py", line 12, in <module>
    import ipdb
  File "/usr/local/lib/python3.6/dist-packages/ipdb/__init__.py", line 7, in <module>
    from ipdb.__main__ import set_trace, post_mortem, pm, run             # noqa
  File "/usr/local/lib/python3.6/dist-packages/ipdb/__main__.py", line 29, in <module>
    ipapp.initialize(['--no-term-title'])
  File "<decorator-gen-110>", line 2, in initialize
  File "/usr/local/lib/python3.6/dist-packages/traitlets/config/application.py", line 87, in catch_config_error
    return method(app, *args, **kwargs)
  File "/usr/local/lib/python3.6/dist-packages/IPython/terminal/ipapp.py", line 321, in initialize
    self.init_extensions()
  File "/usr/local/lib/python3.6/dist-packages/IPython/core/shellapp.py", line 248, in init_extensions
    self.shell.extension_manager.load_extension(ext)
  File "/usr/local/lib/python3.6/dist-packages/IPython/core/extensions.py", line 83, in load_extension
    __import__(module_str)
  File "/usr/local/lib/python3.6/dist-packages/google/colab/__init__.py", line 28, in <module>
    from google.colab import data_table
  File "/usr/local/lib/python3.6/dist-packages/google/colab/data_table.py", line 39, in <module>
    from google.colab import _interactive_table_helper
  File "/usr/local/lib/python3.6/dist-packages/google/colab/_interactive_table_helper.py", line 31, in <module>
    import pandas as _pd
  File "/usr/local/lib/python3.6/dist-packages/pandas/__init__.py", line 22, in <module>
    from pandas.compat.numpy import (
  File "/usr/local/lib/python3.6/dist-packages/pandas/compat/numpy/__init__.py", line 21, in <module>
    "this version of pandas is incompatible with numpy < 1.15.4\n"
ImportError: this version of pandas is incompatible with numpy < 1.15.4
your numpy version is 1.14.5.
Please upgrade numpy to >= 1.15.4 to use this pandas version

If you suspect this is an IPython bug, please report it at:
    https://github.com/ipython/ipython/issues
or send an email to the mailing list at [email protected]

You can print a more detailed traceback right now with "%tb", or use "%debug"
to interactively debug it.

Extra-detailed tracebacks for bug-reporting purposes can be enabled via:
    %config Application.verbose_crash=True

First, I assumed the packages aren't updated, so I need to restart the notebook. When trying to restart, it crushes for unknown reason and unable to connect (tested multiple times). Even terminating session didn't help to reconnect to the runtime.

My second guess was that your requirements.txt file is not full and that's why pandas is incompatible. Installing pandas==0.7.3 resulted in another pandas incompatibility issue.

Then I deleted all of the "==version" from requirements.txt and installed like that.

Now running the

%%bash
python run_imitator.py --gpu_ids 0 --model imitator --output_dir ./outputs/results/  \
    --src_path      ./assets/src_imgs/internet/men1_256.jpg    \
    --tgt_path      ./assets/samples/refs/iPER/024_8_2    \
    --bg_ks 7   --ft_ks 3 \
    --has_detector  --post_tune --front_warp \
    --save_res

Gives this error:

Traceback (most recent call last):
  File "run_imitator.py", line 9, in <module>
    from models.imitator import Imitator
  File "/content/impersonator/models/imitator.py", line 8, in <module>
    from utils.nmr import SMPLRenderer
  File "/content/impersonator/utils/nmr.py", line 6, in <module>
    import neural_renderer as nr
ModuleNotFoundError: No module named 'neural_renderer'
@Corgi911
Copy link

got the same problem, did you figure it out?

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

3 participants