mvsnerf icon indicating copy to clipboard operation
mvsnerf copied to clipboard

Rendering after finetuning: index out of bounds

Open cduguet opened this issue 4 years ago • 0 comments
trafficstars

I have finetuned using your indications for a blender lego scene:

CUDA_VISIBLE_DEVICES=0  python train_mvs_nerf_finetuning_pl.py  \
    --dataset_name blender --datadir /path/to/nerf_synthetic/lego \
    --expname lego-ft  --with_rgb_loss  --batch_size 1024  \
    --num_epochs 1 --imgScale_test 1.0 --white_bkgd  --pad 0 \
    --ckpt ./ckpts/mvsnerf-v0.tar --N_vis 1

Then using rendering on renderer-video.ipynb I get to the following error:

Found ckpts ['./runs_fine_tuning/lego-ft/ckpts/latest.tar']
Reloading from ./runs_fine_tuning/lego-ft/ckpts/latest.tar
===> training index: [6, 43, 33, 13, 17, 19, 20, 25, 30, 37, 46, 48, 49, 55, 59, 65]
====> ref idx: [6, 43, 33]
---------------------------------------------------------------------------
IndexError                                Traceback (most recent call last)
/tmp/ipykernel_3803/820391564.py in <module>
     54             w2cs, c2ws = pose_source['w2cs'], pose_source['c2ws']
     55             pair_idx = torch.load('configs/pairs.th')[f'{scene}_train']
---> 56             c2ws_render = get_spiral(c2ws_all[pair_idx], near_far_source, rads_scale = 0.6, N_views=60)# you can enlarge the rads_scale if you want to render larger baseline
     57         else:
     58             # neighboring views with position distance

IndexError: index 43 is out of bounds for axis 0 with size 16

Some more info while debugging:

ipdb>  pair_idx
[6, 43, 33, 13, 17, 19, 20, 25, 30, 37, 46, 48, 49, 55, 59, 65] 
ipdb>  c2ws_all.shape
(16, 4, 4)

cduguet avatar Nov 12 '21 17:11 cduguet