Code Monkey home page Code Monkey logo

Comments (11)

GarrettBeatty avatar GarrettBeatty commented on August 19, 2024 1

Are you running it from the right directory?

git clone https://github.com/microsoft/Bringing-Old-Photos-Back-to-Life.git
cd Bringing-Old-Photos-Back-to-Life
python3 -m venv .venv
source .venv/bin/activate


cd Face_Enhancement/models/networks/
git clone https://github.com/vacancy/Synchronized-BatchNorm-PyTorch
cp -rf Synchronized-BatchNorm-PyTorch/sync_batchnorm .
cd ../../../

cd Global/detection_models
git clone https://github.com/vacancy/Synchronized-BatchNorm-PyTorch
cp -rf Synchronized-BatchNorm-PyTorch/sync_batchnorm .
cd ../../

cd Face_Detection/
wget http://dlib.net/files/shape_predictor_68_face_landmarks.dat.bz2
bzip2 -d shape_predictor_68_face_landmarks.dat.bz2
cd ../

cd Face_Enhancement/
wget https://facevc.blob.core.windows.net/zhanbo/old_photo/pretrain/Face_Enhancement/checkpoints.zip
unzip checkpoints.zip
cd ../
cd Global/
wget https://facevc.blob.core.windows.net/zhanbo/old_photo/pretrain/Global/checkpoints.zip
unzip checkpoints.zip
cd ../

#try pip3 if below doesnt work
pip install -r requirements.txt

#try python3 if below doesnt work
python run.py --input_folder [test_image_folder_path] \
              --output_folder [output_path] \
              --GPU 0

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

nishuer avatar nishuer commented on August 19, 2024 1

try use --GPU -1

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

allwinlucious avatar allwinlucious commented on August 19, 2024

i get the exact same error. Im running python 2.7.x even when I just type "python import torch" i get the same error.

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

allwinlucious avatar allwinlucious commented on August 19, 2024

i changed to python3 and it works now. ull have to change some hardcoded python to python3.

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

drupanchal avatar drupanchal commented on August 19, 2024

torch should be added to the requirements.txt file to resolve this issue

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

Lauriy avatar Lauriy commented on August 19, 2024

Had to:
pip install torchvision
and make that missing restored_image directory.

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

GarrettBeatty avatar GarrettBeatty commented on August 19, 2024

I have tried

pip install torchvision

and even with it installing successfully it still didn't work. I was only able to get it to work by using a virtual env.

python3 -m venv .venv
source .venv/bin/activate
pip install -r requirements.txt

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

fant59 avatar fant59 commented on August 19, 2024
Traceback (most recent call last):
  File "test.py", line 9, in <module>
    from Global.options.test_options import TestOptions
ModuleNotFoundError: No module named 'Global'

I fixed all libs and modules, when we imported it's, but I get this error again and again.
Before, I'm download project – install and it's not work ☹️☹️☹️

What am I doing wrong?

P.s. All packeges were installed to the project venv.

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

fant59 avatar fant59 commented on August 19, 2024

Of course 😊

This is my dir where the project is located.

image

At the screen you can see, that I fixed path of libraries, because I thinked, that it wiil help. Also I imported modules at the next format .options.test_options import TestOptions and this doesn't work ☹️

All libs were installed to the venv of this project.

image

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

guoqc3 avatar guoqc3 commented on August 19, 2024

Has the problem been solved? Could you tell me how to solve the same problem I have

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

zhangmozhe avatar zhangmozhe commented on August 19, 2024

We've fixed the issue. Please have a try.

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.