microsoft / bringing-old-photos-back-to-life Goto Github PK
View Code? Open in Web Editor NEWBringing Old Photo Back to Life (CVPR 2020 oral)
Home Page: https://arxiv.org/abs/2004.09484
License: MIT License
Bringing Old Photo Back to Life (CVPR 2020 oral)
Home Page: https://arxiv.org/abs/2004.09484
License: MIT License
Hello all!, It seems install is ok
Requirement already satisfied: torchvision in /usr/local/lib/python3.8/dist-packages (0.8.1) Requirement already satisfied: torch==1.7.0 in /usr/local/lib/python3.8/dist-packages (from torchvision) (1.7.0) Requirement already satisfied: pillow>=4.1.1 in /usr/lib/python3/dist-packages (from torchvision) (7.2.0) Requirement already satisfied: numpy in /usr/lib/python3/dist-packages (from torchvision) (1.19.2) Requirement already satisfied: future in /usr/lib/python3/dist-packages (from torch==1.7.0->torchvision) (0.18.2) Requirement already satisfied: typing-extensions in /usr/lib/python3/dist-packages (from torch==1.7.0->torchvision) (3.7.4.3) Requirement already satisfied: dataclasses in /usr/local/lib/python3.8/dist-packages (from torch==1.7.0->torchvision) (0.6)
Guided by Installation instructions all ok except when I launch:
# python run.py --input_folder /imgs/ --output_folder /imgs/output/ --GPU 0
Running Stage 1: Overall restoration Traceback (most recent call last): File "test.py", line 6, in <module> from torch.autograd import Variable ImportError: No module named torch.autograd Traceback (most recent call last): File "run.py", line 91, in <module> for x in os.listdir(stage_1_results): OSError: [Errno 2] No such file or directory: '/imgs/output/stage_1_restore_output/restored_image'
root@DESKTOP-H0VF09L:/home/akenateb/Bringing-Old-Photos-Back-to-Life# python Python 2.7.18 (default, Apr 20 2020, 20:30:41) [GCC 9.3.0] on linux2
`
What I am doing wrong?
Thanks in advance.
thanks for the fantastic works!
I was testing the face enhance model with my own dataset which struct as follows:
dataset
-- xyz
-- test_A (image to be enhanced, 256*256, .png format)
-- test_B (empty as no labels were provided)
When I run test_face.py I got the following errors:
RuntimeError: Error(s) in loading state_dict for SPADEGenerator:
size mismatch for fc.weight : copying a param with shape torch.Size([1024,3,3,3]) from checkpoint, the shape in current model is torch.Size([1024,184,3,3]).
similar errors for some other weights i.e., head_0_norm_0.mlp_shared.0.weight
love to hear from u guys
cheers
Is it possible to use CPU or even OpenCL instead? CUDA is nvidia proprietary code and I have an AMD laptop. Thanks.
Hi!
The code is working quite well! My only issue is for serious photo restoration it doesn't support higher resolution scans. I've been working on a workaround for this, but I was wondering if there was anything that could be done in a future iteration to help with higher resolution images?
I have split a larger photo into smaller images and then re-stitched it together. Is there anyway I can get the code to run on one large image so the color is consistent and no photo detail is lost?
Installation went fine, all my folders have been created
I'm running Python 3.6.3 :: Anaconda custom (64-bit) in Ubuntu
After I run:
$ python run.py --input_folder ~/Documents/revive-old-photos/input --output ~/Documents/revive-old-photos/output --GPU 0
I get:
Running Stage 1: Overall restoration
python: can't open file 'test.py': [Errno 2] No such file or directory
Finish Stage 1 ...
Running Stage 2: Face Detection
python: can't open file 'detect_all_dlib.py': [Errno 2] No such file or directory
Finish Stage 2 ...
Running Stage 3: Face Enhancement
python: can't open file 'test_face.py': [Errno 2] No such file or directory
Finish Stage 3 ...
Running Stage 4: Blending
python: can't open file 'align_warp_back_multiple_dlib.py': [Errno 2] No such file or directory
Finish Stage 4 ...
All the processing is done. Please check the results.
First of all, thank you for project. I was able to install on windows, but because my gpu doesnt have vram for large resolution images, (2-8MPx scanned archive photos), and cuda out of memory always, decided to try with pytorch for cpu. I have Ryzen 1700 CPU, and know that cpu mode is much slower, but have patience and will wait untill final output render. Saw that models updated to support cpu but dont know how to run code properly....Tried with modifications to run on cpu but without success.... please help :)
Thank you
I have been struggled to understand a good approach on your paper.
Then, I could not find the role of sampling to perform VAE on inference time as below.
Also, if you have only used the sampling function to define KL divergence on training step,
I can only think that it is hard to assume that the input of G corresponds to a normal distribution.
Because the collection of mean and std. does not have the characteristic of Gaussian distribution itself.
Can you clarify our mis-understanding or fix missing points?
I have no choice but to guess that the input of G is feature map only including mean and std. not samples from Gaussian prior. Right?
On paper "The VAEs assumes Gaussian prior
for the distribution of latent codes, so that images can be
reconstructed by sampling from the latent space. We use the
re-parameterization trick to enable differentiable stochastic
sampling"
def inference(self, label, inst):
input_concat = label.data.cuda()
label_feat = self.netG_A.forward(input_concat, flow="enc")
if self.opt.NL_use_mask:
label_feat_map = self.mapping_net(label_feat.detach(), inst.cuda())
else:
label_feat_map = self.mapping_net(label_feat.detach())
fake_image = self.netG_B.forward(label_feat_map, flow="dec")
return fake_image
I have added the --with_scratch
option to the section
!python run.py --input_folder /content/photo_restoration/test_images/upload --output_folder /content/photo_restoration/upload_output --GPU 0 --with_scratch
in order to process images with scratches.
This is the result that I obtain:
Running Stage 1: Overall restoration
initializing the dataloader
model weights loaded
directory of testing image: /content/photo_restoration/test_images/upload
processing EMILIA 55.png
You are using NL + Res
Now you are processing EMILIA 55.png
Skip EMILIA 55.png
Finish Stage 1 ...
Running Stage 2: Face Detection
1
Finish Stage 2 ...
Running Stage 3: Face Enhancement
The main GPU is
0
dataset [FaceTestDataset] of size 1 was created
The size of the latent vector size is [8,8]
Network [SPADEGenerator] was created. Total number of parameters: 92.1 million. To see the architecture, do print(network).
hi :)
/usr/local/lib/python3.6/dist-packages/torch/nn/functional.py:3121: UserWarning: Default upsampling behavior when mode=bilinear is changed to align_corners=False since 0.4.0. Please specify align_corners=True if the old behavior is desired. See the documentation of nn.Upsample for details.
"See the documentation of nn.Upsample for details.".format(mode))
/usr/local/lib/python3.6/dist-packages/torch/nn/functional.py:1614: UserWarning: nn.functional.tanh is deprecated. Use torch.tanh instead.
warnings.warn("nn.functional.tanh is deprecated. Use torch.tanh instead.")
Finish Stage 3 ...
Running Stage 4: Blending
Finish Stage 4 ...
All the processing is done. Please check the results.
and the image (I have intentionally obscured the face) for privacy:
Is the pipeline command correct? Thank you!
Could someone insert an installation and use tutorial for Windows 10?
I have installed Python, Anaconda, PyThorc and Nvidia Cuda, but I didn't understand how to install and use this artificial intelligence software for restoring old photos (sorry if my English is bad but I'm Italian and I'm using Google Translate)
hi ! i did try to run the code with no success using pytorch 1.4 and 1.6 with python 3 im running Ubuntu 18.04.5 LTS (GNU/Linux 5.4.0-1025-aws x86_64v) CUDA 10.1 and Intel MKL
but i always have the same results no FACES, is any advise to fix this issues ?
============================================================================
Running Stage 3: Face Enhancement
The main GPU is
0
dataset [FaceTestDataset] of size 12 was created
The size of the latent vector size is [8,8]
Network [SPADEGenerator] was created. Total number of parameters: 92.1 million. To see the architecture, do print(network).
hi :)
/home/ubuntu/anaconda3/envs/pytorch_p36/lib/python3.6/site-packages/torch/nn/functional.py:2506: UserWarning: Default upsampling behavior when mode=bilinear is changed to align_corners=False since 0.4.0. Please specify align_corners=True if the old behavior is desired. See the documentation of nn.Upsample for details.
"See the documentation of nn.Upsample for details.".format(mode))
/home/ubuntu/anaconda3/envs/pytorch_p36/lib/python3.6/site-packages/torch/nn/functional.py:1340: UserWarning: nn.functional.tanh is deprecated. Use torch.tanh instead.
warnings.warn("nn.functional.tanh is deprecated. Use torch.tanh instead.")
Finish Stage 3 ...
Hi, thank you for this amazing work.
Unfortunately, I have run into 2 issues while trying to run this on Windows 10 Anaconda Prompt
my input
python run.py --input_folder input --output_folder output --GPU 0 --with_scratch
the error
Running Stage 1: Overall restoration
initializing the dataloader
model weights loaded
directory of testing image: input
Traceback (most recent call last):
File "detection.py", line 151, in <module>
main(config)
File "detection.py", line 85, in main
imagelist = os.listdir(config.test_path)
FileNotFoundError: [WinError 3] The system cannot find the path specified: 'input'
You are using NL + Res
Traceback (most recent call last):
File "test.py", line 110, in <module>
input_loader = os.listdir(opt.test_input)
FileNotFoundError: [WinError 3] The system cannot find the path specified: 'output\\stage_1_restore_output\\masks\\input'
Finish Stage 1 ...
Running Stage 2: Face Detection
Traceback (most recent call last):
File "detect_all_dlib.py", line 24, in <module>
import dlib
File "E:\Anaconda3\envs\restore\lib\site-packages\dlib\__init__.py", line 19, in <module>
from _dlib_pybind11 import *
ImportError: DLL load failed: The specified module could not be found.
Finish Stage 2 ...
Running Stage 3: Face Enhancement
The main GPU is
0
Traceback (most recent call last):
File "test_face.py", line 15, in <module>
dataloader = data.create_dataloader(opt)
File "G:\Bringing-Old-Photos-Back-to-Life\Face_Enhancement\data\__init__.py", line 13, in create_dataloader
instance.initialize(opt)
File "G:\Bringing-Old-Photos-Back-to-Life\Face_Enhancement\data\face_dataset.py", line 29, in initialize
image_list = os.listdir(image_path)
FileNotFoundError: [WinError 3] The system cannot find the path specified: './datasets/cityscapes/output\\stage_2_detection_output'
Finish Stage 3 ...
Running Stage 4: Blending
Traceback (most recent call last):
File "align_warp_back_multiple_dlib.py", line 23, in <module>
import dlib
File "E:\Anaconda3\envs\restore\lib\site-packages\dlib\__init__.py", line 19, in <module>
from _dlib_pybind11 import *
ImportError: DLL load failed: The specified module could not be found.
Finish Stage 4 ...
All the processing is done. Please check the results.
The output folder is empty
I already have CUDA 10.2 and cudnn64_7.dll in PATH, but the dlib error still pops up.
And I have no idea how to solve the backslashes issue.
How can I solve this?
Thank you!
How can I run Face Enhancement on a custom image?
I tried this command:
cd Face_Enhancement
python -m test_face --dataroot ./datasets/faces/ --netG pix2pixhd --gpu_ids 0
but the results are all-gray images.
hi, I tried and unfortunately it can't store my preciously old photo which the scratch is big and across the face, is there any way I could fine-tune the code so it could restore the scratch on face? thanks.
Good Evening,
Which mask must be specified to run the Global restoration with scratch repair?
When running the section "Try it on your own photos!"
the upload of the photo works fine:
EMILIA 78.png(image/png) - 6794251 bytes, last modified: 19/9/2020 - 100% done
Saving EMILIA 78.png to EMILIA 78.png
and even the pipeline seems to work:
Running Stage 1: Overall restoration
Now you are processing EMILIA 78.png
Skip EMILIA 78.png
Finish Stage 1 ...
Running Stage 2: Face Detection
Finish Stage 2 ...
Running Stage 3: Face Enhancement
The main GPU is
0
dataset [FaceTestDataset] of size 0 was created
The size of the latent vector size is [8,8]
Network [SPADEGenerator] was created. Total number of parameters: 92.1 million. To see the architecture, do print(network).
hi :)
Finish Stage 3 ...
Running Stage 4: Blending
Finish Stage 4 ...
All the processing is done. Please check the results.
but there is any file named "EMILIA 78.png(As the input) in the output folder, so the next section "Visualize" will do nothing, since the folder
output/` has only the test images, but not this one, I assume due to the following like:
Skip EMILIA 78.png
so it seems it is related to #3
So I manually rescaled:
EMILIA 78.png(image/png) - 1639881 bytes, last modified: 19/9/2020 - 100% done
Saving EMILIA 78.png to EMILIA 78.png
Closing here then, forwarding a question in the other issue.
I'm sorry if I'm just being silly, but shouldn't there be a ReLU (or other non-linearity) between ResNet layers (after the add)? For example, the mapping net architecture looks like:
...
(10): InstanceNorm2d(512, eps=1e-05, momentum=0.1, affine=False, track_running_stats=False)
(11): ReLU(inplace=True)
(12): ResnetBlock(
(conv_block): Sequential(
(0): ReflectionPad2d((1, 1, 1, 1))
(1): Conv2d(512, 512, kernel_size=(3, 3), stride=(1, 1))
(2): InstanceNorm2d(512, eps=1e-05, momentum=0.1, affine=False, track_running_stats=False)
(3): ReLU(inplace=True)
(4): ReflectionPad2d((1, 1, 1, 1))
(5): Conv2d(512, 512, kernel_size=(3, 3), stride=(1, 1))
(6): InstanceNorm2d(512, eps=1e-05, momentum=0.1, affine=False, track_running_stats=False)
)
)
(13): ResnetBlock(
(conv_block): Sequential(
(0): ReflectionPad2d((1, 1, 1, 1))
(1): Conv2d(512, 512, kernel_size=(3, 3), stride=(1, 1))
...
I have found this error when I try:
python run.py --input_folder /home/akenateb/Bringing-Old-Photos-Back-to-Life/imgs/ --output_folder /home/akenateb/Bringing-Old-Photos-Back-to-Life/imgs/output/ --GPU 0
Running Stage 1: Overall restoration Traceback (most recent call last): File "test.py", line 93, in <module> opt = TestOptions().parse(save=False) File "/root/photos/Bringing-Old-Photos-Back-to-Life/Global/options/base_options.py", line 350, in parse torch.cuda.set_device(self.opt.gpu_ids[0]) File "/root/anaconda3/lib/python3.8/site-packages/torch/cuda/__init__.py", line 263, in set_device torch._C._cuda_setDevice(device) File "/root/anaconda3/lib/python3.8/site-packages/torch/cuda/__init__.py", line 172, 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
nvcc --version: vcc: NVIDIA (R) Cuda compiler driver
Copyright (c) 2005-2020 NVIDIA Corporation
Built on Mon_Oct_12_20:09:46_PDT_2020
Cuda compilation tools, release 11.1, V11.1.105
Build cuda_11.1.TC455_06.29190527_0
Any help?
Thanks in advance
test.py imports torch but requirements.txt doesn't list it
Hi, recently I tried your Colab demo to restore some of my old images, but here comes the issue. When I follow the steps and run the code, it always prints skip the my uploaded images like the following shows:
Running Stage 1: Overall restoration
initializing the dataloader
model weights loaded
directory of testing image: /content/photo_restoration/test_images/upload
processing testScratch.png
You are using NL + Res
Now you are processing testScratch.png
Skip testScratch.png
Finish Stage 1 ...
Running Stage 2: Face Detection
Finish Stage 2 ...
Running Stage 3: Face Enhancement
The main GPU is
0
dataset [FaceTestDataset] of size 0 was created
The size of the latent vector size is [8,8]
Network [SPADEGenerator] was created. Total number of parameters: 92.1 million. To see the architecture, do print(network).
hi :)
Finish Stage 3 ...
Running Stage 4: Blending
Finish Stage 4 ...
All the processing is done. Please check the results.
Therefore, I'd like to know whether there are any requirements that the uploaded images have to satisfy or did I make some mistakes ? Thanks a lot.
Must it run on devices with Nvidia GPUs and CUDA? Most servers don't have Nvidia graphics CARDS
Can you provide docker version for this since it is hard to install pytorch?
Hello. At first, Thanks for s sharing this amazing project. You guys have done a really good job.
Currently, I'm going through your research paper. As you stated in the paper, the local branch targets the unstructured defects, such as noises and blurriness. This inspired me to try it over an ongoing problem about OCR (here). Just to make a quick test, I've tried it on two cases, gaussian blur and motion blur text (with minimum acute). I've found that the model does a great job of restoring gaussian blurry text but not much on motion blur. Please see the results below, (left-side
: normal image; right-side
: restored image)
I believe that the model has much potential to restored more complex degraded raw samples. However, I like to know, in training time, was it ensured various blurring effects in the training data set? Or, to generalize the model on various blurry effects, do we need to fine-tune it?
Hey,
Setup may be a bit easier if you didn't have to manually download weights. This can be done through Github releases
https://docs.github.com/en/free-pro-team@latest/github/administering-a-repository/about-releases
This allows you to attach multiple files and each file has a 2gb filesize limit so the models in here fit in that!
Cheers
Sorry for this trivial question. I have tried to run every command for installation:
cd Face_Enhancement/models/networks/
git clone https://github.com/vacancy/Synchronized-BatchNorm-PyTorch
cp -rf Synchronized-BatchNorm-PyTorch/sync_batchnorm .
at the step:
cp -rf Synchronized-BatchNorm-PyTorch/sync_batchnorm .
I got the following error:
'cp' is not recognized as an internal or external command, operable program or batch file.
What I have done wrong ?
I have get the excellent result with my uploaded img in Colab
can you give some performance test result?
such as how many fps in 1080Ti or some other GPU
can you give some slim or optimize suggestion to speedup inference
thanks a lot
With some image throws this exception:
Skip a.png due to an error:
CUDA out of memory. Tried to allocate 3.10 GiB (GPU 0; 8.00 GiB total capacity; 3.83 GiB already allocated; 2.17 GiB free; 4.40 GiB reserved in total by PyTorch).
Thanks in advance
any instructions on training on custom data?
If you encounter the above error you will probably need to change one line of code in Face_Enhancement\test_face.py
Currently line 40 reads
img_name = img_path[b].split("/")[-1]
Change this to
img_name = img_path[b].split("\\")[-1]
when I run code,get the error like thie
"RuntimeError: CUDA error: all CUDA-capable devices are busy or unavailable"
I already installed cuna,nvidia driver,check the processes, this is the info
(venv) dash@dash-KVM:~/Bringing-Old-Photos-Back-to-Life-master$ nvidia-smi
Fri Oct 23 11:07:33 2020
+-----------------------------------------------------------------------------+
| NVIDIA-SMI 440.118.02 Driver Version: 440.118.02 CUDA Version: 10.2 |
|-------------------------------+----------------------+----------------------+
| GPU Name Persistence-M| Bus-Id Disp.A | Volatile Uncorr. ECC |
| Fan Temp Perf Pwr:Usage/Cap| Memory-Usage | GPU-Util Compute M. |
|===============================+======================+======================|
| 0 GRID T4-8Q On | 00000000:00:09.0 Off | N/A |
| N/A N/A P8 N/A / N/A | 592MiB / 8192MiB | 0% Default |
+-------------------------------+----------------------+----------------------+
+-----------------------------------------------------------------------------+
| Processes: GPU Memory |
| GPU PID Type Process name Usage |
|=============================================================================|
| No running processes found |
+-----------------------------------------------------------------------------+
GPU info:
CUDA Device Query (Runtime API) version (CUDART static linking)
Detected 1 CUDA Capable device(s)
Device 0: "GRID T4-8Q"
CUDA Driver Version / Runtime Version 10.2 / 10.2
CUDA Capability Major/Minor version number: 7.5
Total amount of global memory: 8192 MBytes (8589934592 bytes)
(40) Multiprocessors, ( 64) CUDA Cores/MP: 2560 CUDA Cores
GPU Max Clock rate: 1590 MHz (1.59 GHz)
Memory Clock rate: 5001 Mhz
Memory Bus Width: 256-bit
L2 Cache Size: 4194304 bytes
Maximum Texture Dimension Size (x,y,z) 1D=(131072), 2D=(131072, 65536), 3D=(16384, 16384, 16384)
Maximum Layered 1D Texture Size, (num) layers 1D=(32768), 2048 layers
Maximum Layered 2D Texture Size, (num) layers 2D=(32768, 32768), 2048 layers
Total amount of constant memory: 65536 bytes
Total amount of shared memory per block: 49152 bytes
Total number of registers available per block: 65536
Warp size: 32
Maximum number of threads per multiprocessor: 1024
Maximum number of threads per block: 1024
Max dimension size of a thread block (x,y,z): (1024, 1024, 64)
Max dimension size of a grid size (x,y,z): (2147483647, 65535, 65535)
Maximum memory pitch: 2147483647 bytes
Texture alignment: 512 bytes
Concurrent copy and kernel execution: Yes with 3 copy engine(s)
Run time limit on kernels: No
Integrated GPU sharing Host Memory: No
Support host page-locked memory mapping: Yes
Alignment requirement for Surfaces: Yes
Device has ECC support: Disabled
Device supports Unified Addressing (UVA): Yes
Device supports Compute Preemption: Yes
Supports Cooperative Kernel Launch: Yes
Supports MultiDevice Co-op Kernel Launch: Yes
Device PCI Domain ID / Bus ID / location ID: 0 / 0 / 9
Compute Mode:
< Default (multiple host threads can use ::cudaSetDevice() with device simultaneously) >
deviceQuery, CUDA Driver = CUDART, CUDA Driver Version = 10.2, CUDA Runtime Version = 10.2, NumDevs = 1
Result = PASS
Here are better links to download checkpoints, because you don't have hours to waste downloading it on that poor Azure Blob Storage.
Face_Enhancement: https://we.tl/t-5tZD5lB3O6
Global: https://we.tl/t-zsrsNnOkGN
I setup everything successfully using pip3 and I run this with a test image in the test_image
folder on my desktop.
python run.py --input_folder /Users/g14a/Desktop/test_image/ --output_folder /Users/g14a/Desktop/test_output/ --GPU 0 --with_scratch
and then I get this error log.
Running Stage 1: Overall restoration
Traceback (most recent call last):
File "detection.py", line 9, in <module>
import torch
ImportError: No module named torch
Traceback (most recent call last):
File "test.py", line 6, in <module>
from torch.autograd import Variable
ImportError: No module named torch.autograd
Traceback (most recent call last):
File "run.py", line 79, in <module>
for x in os.listdir(stage_1_results):
OSError: [Errno 2] No such file or directory: '/Users/g14a/Desktop/test_output/stage_1_restore_output/restored_image'
Is there anything I'm missing here?
Can somebody please make a google collab version please?
I get the following error:
RuntimeError: CUDA out of memory. Tried to allocate 88.00 MiB (GPU 0; 5.80 GiB total capacity; 4.14 GiB already allocated; 154.56 MiB free; 4.24 GiB reserved in total by PyTorch)
Is there a way to allocate more memory? I do not get why 4.14Gb are already allocated.
Hi
Originally posted by @alylynn1426 in #34 (comment)
I launched the Colab and this is what I'm getting
Now you are processing my_image.png
Skip my_image.png
Finish Stage 1 ...
RIght now, because of hardcoded paths with usage of python
command there is no possibility to make full run with python3
Hi, could you release the training data and training code? Thank you very much!
I can run successfully your Colab notebook locally, runs nicely.
The only issue is the file size in pixels is rather limited.
Is there a way to run it with large files in local Colab ?
Or should I run it under Python 3.6 ? Is there a file size limit under Python ?
Originally posted by @phadytou in phadytou/hello-word-#1
pip install -r requirements.txt
Collecting torch
Using cached torch-0.1.2.post2.tar.gz (128 kB)
Collecting torchvision
Using cached torchvision-0.2.2.post3-py2.py3-none-any.whl (64 kB)
Collecting dlib
Using cached dlib-19.21.0.tar.gz (3.2 MB)
Collecting scikit-image
Using cached scikit-image-0.17.2.tar.gz (29.8 MB)
ERROR: Command errored out with exit status 1:
command: 'c:\users\国b的小仓库\appdata\local\programs\python\python39-32\python.exe' -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\Users\国b的小仓库\AppData\Local\Temp\pip-install-wvym9snv\scikit-image\setup.py'"'"'; file='"'"'C:\Users\国b的小仓库\AppData\Local\Temp\pip-install-wvym9snv\scikit-image\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(file);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, file, '"'"'exec'"'"'))' egg_info --egg-base 'C:\Users\国b的小仓库\AppData\Local\Temp\pip-pip-egg-info-4a7567v8'
cwd: C:\Users\国b的小仓库\AppData\Local\Temp\pip-install-wvym9snv\scikit-image
Complete output (7 lines):
Traceback (most recent call last):
File "", line 1, in
File "C:\Users\国b的小仓库\AppData\Local\Temp\pip-install-wvym9snv\scikit-image\setup.py", line 234, in
'build_ext': openmp_build_ext(),
File "C:\Users\国b的小仓库\AppData\Local\Temp\pip-install-wvym9snv\scikit-image\setup.py", line 58, in openmp_build_ext
from numpy.distutils.command.build_ext import build_ext
ModuleNotFoundError: No module named 'numpy'
----------------------------------------
ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
When I enter pip install -r requirements.txt in my powershell, an error is reported 。Thank you all!
Is it possible to run this on a (recent) Mac, which does not support CUDA? I would have guessed setting --GPU 0 would not attempt to call CUDA, but it fails.
File "/Users/../Desktop/bopbtl/venv/lib/python3.7/site-packages/torch/cuda/__init__.py", line 61, in _check_driver
raise AssertionError("Torch not compiled with CUDA enabled")
AssertionError: Torch not compiled with CUDA enabled
Sorry for asking I am a newibe programer pls make a website in which we can see the results
Ok I'm just now I'm going back to the house
Originally posted by @phadytou in phadytou/hello-word-#1 (comment)
Need to manually create the restored_image dir otherwise the following failure occurs:
$ python run.py --input_folder ~/Documents/revive-old-photos/input --output ~/Documents/revive-old-photos/output --GPU 0
Running Stage 1: Overall restoration
Traceback (most recent call last):
File "test.py", line 6, in <module>
from torch.autograd import Variable
ImportError: No module named torch.autograd
Traceback (most recent call last):
File "run.py", line 79, in <module>
for x in os.listdir(stage_1_results):
FileNotFoundError: [Errno 2] No such file or directory: '~/Documents/revive-old-photos/output/stage_1_restore_output/restored_image'
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.