microsoft / Bringing-Old-Photos-Back-to-Life

Bringing Old Photo Back to Life (CVPR 2020 oral)
https://arxiv.org/abs/2004.09484
MIT License
15.14k stars 2k forks source link

cpu and location #219

Open HibiVixx opened 2 years ago

HibiVixx commented 2 years ago

I am having difficulty in two steps that I can not solve, thank you if someone helps me because I am a layman in linux... First I do not know how to make the software use my CPU, and I'm having trouble finding folder or file...

(base) alex@mt:~/Bringing-Old-Photos-Back-to-Life-master$ python run.py --input_folder test_images/old_w_scratch \
>               --output_folder [output_path]
Running Stage 1: Overall restoration
Traceback (most recent call last):
  File "test.py", line 97, in <module>
    opt = TestOptions().parse(save=False)
  File "/home/alex/Bringing-Old-Photos-Back-to-Life-master/Global/options/base_options.py", line 354, in parse
    torch.cuda.set_device(self.opt.gpu_ids[0])
  File "/home/alex/anaconda3/lib/python3.7/site-packages/torch/cuda/__init__.py", line 311, in set_device
    torch._C._cuda_setDevice(device)
  File "/home/alex/anaconda3/lib/python3.7/site-packages/torch/cuda/__init__.py", line 214, in _lazy_init
    torch._C._cuda_init()
RuntimeError: Found no NVIDIA driver on your system. Please check that you have an NVIDIA GPU and installed a driver from http://www.nvidia.com/Download/index.aspx
Traceback (most recent call last):
  File "run.py", line 102, in <module>
    for x in os.listdir(stage_1_results):
FileNotFoundError: [Errno 2] No such file or directory: '/home/alex/Bringing-Old-Photos-Back-to-Life-master/[output_path]/stage_1_restore_output/restored_image'
(base) alex@mt:~/Bringing-Old-Photos-Back-to-Life-master$ 
noobyogi0010 commented 2 years ago

Hi @HibiVixx

So basically, your will be as follows if you have a folder called output inside the Bringing-Old-Photos-Back-to-Life-master directory:

python run.py --input_folder test_images/old_w_scratch --output_folder output --GPU -1

I hope this helps you.

Thanks.