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 on windows 10 #1

Closed
joemcglinchy opened this issue Jan 9, 2018 · 2 comments
Closed

running on windows 10 #1

joemcglinchy opened this issue Jan 9, 2018 · 2 comments

Comments

@joemcglinchy
Copy link

Hello, thanks for your work on this! I am trying to run one of the pretrained models (srresnet) on some sample images and have some questions:

  1. do you think this will work directly on windows?? There is a pytorch version out there that plays nice with windows which I am using.
  2. does it support TIF files? I tried initially with a TIF format image and an error message returned that 0 images were found
  3. I tried running the pretrained srresnet model on a JPG image and received this error:
Running on GPU 0
Restored checkpoint from ./resources/pretrained/srresnet.pth
Traceback (most recent call last):
  File "eval.py", line 225, in <module>
    data = runner.infer(loader)
  File "C:\Projects\dl_pytorch\srgan\training\base_runner.py", line 125, in infer
    self.data_iter = iter(loader)
  File "C:\software\Anaconda3\lib\site-packages\torch\utils\data\dataloader.py", line 310, in __iter__
    return DataLoaderIter(self)
  File "C:\software\Anaconda3\lib\site-packages\torch\utils\data\dataloader.py", line 167, in __init__
    w.start()
  File "C:\software\Anaconda3\lib\multiprocessing\process.py", line 105, in start
    self._popen = self._Popen(self)
  File "C:\software\Anaconda3\lib\multiprocessing\context.py", line 223, in _Popen
    return _default_context.get_context().Process._Popen(process_obj)
  File "C:\software\Anaconda3\lib\multiprocessing\context.py", line 322, in _Popen
    return Popen(process_obj)
  File "C:\software\Anaconda3\lib\multiprocessing\popen_spawn_win32.py", line 65, in __init__
    reduction.dump(process_obj, to_child)
  File "C:\software\Anaconda3\lib\multiprocessing\reduction.py", line 60, in dump
    ForkingPickler(file, protocol).dump(obj)
AttributeError: Can't pickle local object 'sr_test_transform.<locals>.transform'
Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "C:\software\Anaconda3\lib\multiprocessing\spawn.py", line 105, in spawn_main
    exitcode = _main(fd)
  File "C:\software\Anaconda3\lib\multiprocessing\spawn.py", line 115, in _main
    self = reduction.pickle.load(from_parent)
EOFError: Ran out of input
@mseitzer
Copy link
Owner

mseitzer commented Jan 9, 2018

Hi, thanks for trying out the project.

  1. I can not say for sure, as I do not have a Windows 10 machine available to test, but provided you have a working Pytorch version, it could work.
  2. As long as pillow can read the tiff file, there should be no problem. Right now input images are filtered by file extension, so that's why it ignores the image. Will add support for the tiff extensions.
  3. This looks like an issue with your Pytorch. Which version are you running? The problem is that your Pytorch uses the native Python multithreading library, instead of Pytorch's custom one. Python's multithreading library appears to be incompatible with my code, whereas it works with the Pytorch's.
    This is a problem related to Windows' Pytorch. See e.g. here Multiprocessing  pytorch/pytorch#2394. You can try to run with --conf num_data_workers=1 as a workaround which should disable multithreading.

@joemcglinchy
Copy link
Author

joemcglinchy commented Jan 9, 2018 via email

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

2 participants