3d-photo-inpainting icon indicating copy to clipboard operation
3d-photo-inpainting copied to clipboard

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

Open LulzRose opened this issue 2 years ago • 4 comments

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_net_G.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'

LulzRose avatar Aug 27 '21 16:08 LulzRose

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.

VjayalakshmiK avatar Aug 28 '21 03:08 VjayalakshmiK

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

miangoleh avatar Mar 01 '22 18:03 miangoleh

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

wux12 avatar Mar 11 '22 04:03 wux12

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

hsnbsrbalaban avatar Aug 08 '22 12:08 hsnbsrbalaban