Code Monkey home page Code Monkey logo

Comments (4)

zhangmozhe avatar zhangmozhe commented on July 19, 2024

It seems that the code cannot locate the input folder. Have you tried to use absolute path?

from bringing-old-photos-back-to-life.

raywzy avatar raywzy commented on July 19, 2024

After checking the error information, I suggest you could use the absolute path. Besides, it seems that the dlib library is not installed correctly which is used for face detection. I have not met this problem before.

from bringing-old-photos-back-to-life.

bycloudai avatar bycloudai commented on July 19, 2024

Having the absolute path (the full file path) works. But still can't solve the dlib problem. Any tips?
Also is there a way to bypass the CUDA out of memory? Should I like use the CPU or make the input image smaller?

Running Stage 1: Overall restoration
initializing the dataloader
model weights loaded
directory of testing image: G:\Bringing-Old-Photos-Back-to-Life\input
processing 31e3reott1i51.jpg
Traceback (most recent call last):
  File "detection.py", line 151, in <module>
    main(config)
  File "detection.py", line 123, in main
    P = torch.sigmoid(model(scratch_image))
  File "E:\Anaconda3\envs\restore\lib\site-packages\torch\nn\modules\module.py", line 722, in _call_impl
    result = self.forward(*input, **kwargs)
  File "G:\Bringing-Old-Photos-Back-to-Life\Global\detection_models\networks.py", line 119, in forward
    x = up(x, blocks[-i - 1])
  File "E:\Anaconda3\envs\restore\lib\site-packages\torch\nn\modules\module.py", line 722, in _call_impl
    result = self.forward(*input, **kwargs)
  File "G:\Bringing-Old-Photos-Back-to-Life\Global\detection_models\networks.py", line 167, in forward
    out = torch.cat([up, crop1], 1)
RuntimeError: CUDA out of memory. Tried to allocate 368.00 MiB (GPU 0; 8.00 GiB total capacity; 5.66 GiB already allocated; 71.71 MiB free; 5.77 GiB reserved in total by PyTorch)
You are using NL + Res
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
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
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.

Some screenshots that might help:
qwrfqwsss
qweqwes
wqeqwewdeew

from bringing-old-photos-back-to-life.

zhangmozhe avatar zhangmozhe commented on July 19, 2024

Having the absolute path (the full file path) works. But still can't solve the dlib problem. Any tips?
Also is there a way to bypass the CUDA out of memory? Should I like use the CPU or make the input image smaller?

Sorry that this work requires the CUDA to work. If code runs out of memory, you can resize the image a little bit. For the dlib installation issue, maybe you can try to use WSL2 on windows.

For convenient usage, you can also try our Colab demo which allows uploading your own photos.

from bringing-old-photos-back-to-life.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.