vt-vl-lab / 3d-photo-inpainting

[CVPR 2020] 3D Photography using Context-aware Layered Depth Inpainting
https://shihmengli.github.io/3D-Photo-Inpainting/
Other
6.9k stars 1.11k forks source link

Receiving Error in Google Colab when running !python main.py --config argument.yml #134

Open LulzRose opened 3 years ago

LulzRose commented 3 years ago

running on device 0 0% 0/3 [00:00<?, ?it/s]Current Source ==> Anubis-Sun_01 Running depth extraction at 1630080273.0608075 BoostingMonocularDepth/inputs/*.jpg device: cuda Namespace(Final=True, R0=False, R20=False, colorize_results=False, data_dir='inputs/', depthNet=0, max_res=inf, net_receptive_field_size=None, output_dir='outputs', output_resolution=1, pix2pixsize=1024, savepatchs=0, savewholeest=0) ----------------- Options --------------- Final: True [default: False] R0: False
R20: False
aspect_ratio: 1.0
batch_size: 1
checkpoints_dir: ./pix2pix/checkpoints
colorize_results: False
crop_size: 672
data_dir: inputs/ [default: None] dataroot: None
dataset_mode: depthmerge
depthNet: 0 [default: None] direction: AtoB
display_winsize: 256
epoch: latest
eval: False
generatevideo: None
gpu_ids: 0
init_gain: 0.02
init_type: normal
input_nc: 2
isTrain: False [default: None] load_iter: 0 [default: 0] load_size: 672
max_dataset_size: 10000
max_res: inf
model: pix2pix4depth
n_layers_D: 3
name: void
ndf: 64
netD: basic
netG: unet_1024
net_receptive_field_size: None
ngf: 64
no_dropout: False
no_flip: False
norm: none
num_test: 50
num_threads: 4
output_dir: outputs [default: None] output_nc: 1
output_resolution: None
phase: test
pix2pixsize: None
preprocess: resize_and_crop
savecrops: None
savewholeest: None
serial_batches: False
suffix:
verbose: False
----------------- End ------------------- initialize network with normal loading the model from ./pix2pix/checkpoints/mergemodel/latest_netG.pth Traceback (most recent call last): File "run.py", line 580, in run(dataset, option_) File "run.py", line 52, in run pix2pixmodel.load_networks('latest') File "/content/3d-photo-inpainting/BoostingMonocularDepth/pix2pix/models/base_model.py", line 192, in load_networks state_dict = torch.load(load_path, map_location=str(self.device)) File "/usr/local/lib/python3.7/dist-packages/torch/serialization.py", line 525, in load with _open_file_like(f, 'rb') as opened_file: File "/usr/local/lib/python3.7/dist-packages/torch/serialization.py", line 212, in _open_file_like return _open_file(name_or_buffer, mode) File "/usr/local/lib/python3.7/dist-packages/torch/serialization.py", line 193, in init super(_open_file, self).init(open(name, mode)) FileNotFoundError: [Errno 2] No such file or directory: './pix2pix/checkpoints/mergemodel/latest_net_G.pth' 0% 0/3 [00:04<?, ?it/s] Traceback (most recent call last): File "main.py", line 54, in run_boostmonodepth(sample['ref_img_fi'], config['src_folder'], config['depth_folder']) File "/content/3d-photo-inpainting/boostmonodepth_utils.py", line 41, in run_boostmonodepth depth = imageio.imread(os.path.join(BOOST_BASE, BOOST_OUTPUTS, tgt_name)) File "/usr/local/lib/python3.7/dist-packages/imageio/core/functions.py", line 265, in imread reader = read(uri, format, "i", kwargs) File "/usr/local/lib/python3.7/dist-packages/imageio/core/functions.py", line 172, in get_reader request = Request(uri, "r" + mode, kwargs) File "/usr/local/lib/python3.7/dist-packages/imageio/core/request.py", line 124, in init self._parse_uri(uri) File "/usr/local/lib/python3.7/dist-packages/imageio/core/request.py", line 260, in _parse_uri raise FileNotFoundError("No such file: '%s'" % fn) FileNotFoundError: No such file: '/content/3d-photo-inpainting/BoostingMonocularDepth/outputs/Anubis-Sun_01.png'

VjayalakshmiK commented 3 years ago

Did you notice another error in this? FileNotFoundError: [Errno 2] No such file or directory: './pix2pix/checkpoints/mergemodel/latest_net_G.pth'

I faced this problem too: the download.sh file is supposed to download all the model weights, which includes that of the pix2pix n/w latest_net_G.pth. This file is not available at the site anymore, and hence it has not been downloaded to the 'mergemodel' folder. That is causing the whole error.

miangoleh commented 2 years ago

Hi. Please replace the old link links with the following: Midas Link: https://github.com/AlexeyAB/MiDaS/releases/download/midas_dpt/midas_v21-f6b98070.pt (rename it to model.pt) BoostMonocularDepth link: https://sfu.ca/~yagiz/CVPR21/latest_net_G.pth

wux12 commented 2 years ago

Hi. Please replace the old link links with the following: Midas Link: https://github.com/AlexeyAB/MiDaS/releases/download/midas_dpt/midas_v21-f6b98070.pt (rename it to model.pt) BoostMonocularDepth link: https://sfu.ca/~yagiz/CVPR21/latest_net_G.pth

Hi, i tried this command but still the same error

hsnbsrbalaban commented 2 years ago

https://github.com/vt-vl-lab/3d-photo-inpainting/issues/155#issuecomment-1208022222 Try this please.