Open xipeng5 opened 1 year ago
Did you pip install requirements.txt?
me too @Pengboi https://github.com/microsoft/Bringing-Old-Photos-Back-to-Life/issues/266
Running Stage 4: Blending
Traceback (most recent call last):
File "/content/photo_restoration/Face_Detection/align_warp_back_multiple_dlib.py", line 428, in <module>
blended = blur_blending_cv2(warped_back, blended, backward_mask)
File "/content/photo_restoration/Face_Detection/align_warp_back_multiple_dlib.py", line 219, in blur_blending_cv2
mask *= 255.0
numpy.core._exceptions._UFuncOutputCastingError: Cannot cast ufunc 'multiply' output from dtype('float64') to dtype('uint8') with casting rule 'same_kind'
Finish Stage 4 ...
on mac
Running Stage 1: Overall restoration /Users/xxx/Desktop/Bringing-Kmaster/output/stage_1_restore_output/restored_image /Users/xxx/Desktop/Bringing-Kmaster/output/final_output Finish Stage 1 ...
Running Stage 2: Face Detection Traceback (most recent call last): File "test.py", line 6, in
from torch.autograd import Variable
ImportError: No module named torch.autograd
Traceback (most recent call last):
File "detect_all_dlib.py", line 4, in
import torch
ImportError: No module named torch
Finish Stage 2 ...
Running Stage 3: Face Enhancement Traceback (most recent call last): File "test_face.py", line 7, in
import data
File "/Users/waterclean/Desktop/Bringing-Kmaster/Face_Enhancement/data/init.py", line 4, in
import torch.utils.data
ImportError: No module named torch.utils.data
Finish Stage 3 ...
Running Stage 4: Blending Finish Stage 4 ...
All the processing is done. Please check the results. Traceback (most recent call last): File "align_warp_back_multiple_dlib.py", line 4, in
import torch
ImportError: No module named torch
on windows
Running Stage 1: Overall restoration C:\Users\Administrator\AppData\Local\Programs\Python\Python310\lib\site-packages\torchvision\models\detection\anchor_utils.py:63: UserWarning: Failed to initialize NumPy: module compiled against API version 0x10 but this version of numpy is 0xf (Triggered internally at ..\torch\csrc\utils\tensor_numpy.cpp:68.) device: torch.device = torch.device("cpu"), C:\Users\Administrator\Desktop\BringingK-master\Global\test.py:18: DeprecationWarning: BILINEAR is deprecated and will be removed in Pillow 10 (2023-07-01). Use Resampling.BILINEAR instead. def data_transforms(img, method=Image.BILINEAR, scale=False): Traceback (most recent call last): File "C:\Users\Administrator\Desktop\BringingK-master\Global\test.py", line 97, in
opt = TestOptions().parse(save=False)
File "C:\Users\Administrator\Desktop\BringingK-master\Global\options\base_options.py", line 354, in parse
torch.cuda.set_device(self.opt.gpu_ids[0])
File "C:\Users\Administrator\AppData\Local\Programs\Python\Python310\lib\site-packages\torch\cuda__init__.py", line 314, in set_device
torch._C._cuda_setDevice(device)
AttributeError: module 'torch._C' has no attribute '_cuda_setDevice'
Finish Stage 1 ...
Running Stage 2: Face Detection Traceback (most recent call last): File "C:\Users\Administrator\Desktop\BringingK-master\Face_Detection\detect_all_dlib.py", line 10, in
import matplotlib.pyplot as plt
ModuleNotFoundError: No module named 'matplotlib'
Finish Stage 2 ...
Running Stage 3: Face Enhancement C:\Users\Administrator\AppData\Local\Programs\Python\Python310\lib\site-packages\torchvision\models\detection\anchor_utils.py:63: UserWarning: Failed to initialize NumPy: module compiled against API version 0x10 but this version of numpy is 0xf (Triggered internally at ..\torch\csrc\utils\tensor_numpy.cpp:68.) device: torch.device = torch.device("cpu"), Traceback (most recent call last): File "C:\Users\Administrator\Desktop\BringingK-master\Face_Enhancement\test_face.py", line 9, in
from models.pix2pix_model import Pix2PixModel
File "C:\Users\Administrator\Desktop\BringingK-master\Face_Enhancement\models\pix2pix_model.py", line 5, in
import models.networks as networks
File "C:\Users\Administrator\Desktop\BringingK-master\Face_Enhancement\models\networks__init__.py", line 6, in
from models.networks.generator import *
File "C:\Users\Administrator\Desktop\BringingK-master\Face_Enhancement\models\networks\generator.py", line 8, in
from models.networks.normalization import get_nonspade_norm_layer
File "C:\Users\Administrator\Desktop\BringingK-master\Face_Enhancement\models\networks\normalization.py", line 8, in
from models.networks.sync_batchnorm import SynchronizedBatchNorm2d
ModuleNotFoundError: No module named 'models.networks.sync_batchnorm'
Finish Stage 3 ...
Running Stage 4: Blending Traceback (most recent call last): File "C:\Users\Administrator\Desktop\BringingK-master\Face_Detection\align_warp_back_multiple_dlib.py", line 9, in
import matplotlib.pyplot as plt
ModuleNotFoundError: No module named 'matplotlib'
Finish Stage 4 ...
All the processing is done. Please check the results.