Skip to content

Commit

Permalink
Merge pull request #4 from kotauchisunsun/run_on_cpu
Browse files Browse the repository at this point in the history
Thank you!!
  • Loading branch information
shunsukesaito authored Feb 27, 2020
2 parents f54afa6 + 802a7f1 commit e7f66b6
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 2 deletions.
4 changes: 2 additions & 2 deletions apps/eval.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ def __init__(self, opt, projection_mode='orthogonal'):
transforms.Normalize((0.5, 0.5, 0.5), (0.5, 0.5, 0.5))
])
# set cuda
cuda = torch.device('cuda:%d' % opt.gpu_id)
cuda = torch.device('cuda:%d' % opt.gpu_id) if torch.cuda.is_available() else torch.device('cpu')

# create net
netG = HGPIFuNet(opt, projection_mode).to(device=cuda)
Expand Down Expand Up @@ -120,4 +120,4 @@ def eval(self, data, use_octree=False):
data = evaluator.load_image(image_path, mask_path)
evaluator.eval(data, True)
except Exception as e:
print("error:", e.args)
print("error:", e.args)
23 changes: 23 additions & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
cycler==0.10.0
decorator==4.4.1
imageio==2.8.0
kiwisolver==1.1.0
matplotlib==3.1.3
networkx==2.4
numpy==1.18.1
opencv-python==4.2.0.32
pathlib==1.0.1
Pillow==7.0.0
PyOpenGL==3.1.5
pyparsing==2.4.6
python-dateutil==2.8.1
PyWavelets==1.1.1
scikit-image==0.16.2
scipy==1.4.1
Shapely==1.7.0
six==1.14.0
torch==1.4.0
torchvision==0.5.0
tqdm==4.43.0
trimesh==3.5.23
xxhash==1.4.3

0 comments on commit e7f66b6

Please sign in to comment.