Skip to content

Commit

Permalink
Update enerf.py
Browse files Browse the repository at this point in the history
fix bug for nearest images selection
  • Loading branch information
haotongl authored Mar 24, 2023
1 parent 71763e4 commit 5ba9ed2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/datasets/zjumocap/enerf.py
Original file line number Diff line number Diff line change
Expand Up @@ -93,9 +93,9 @@ def build_metas(self, config):
nearest_ids = argsorts_dir[:2*input_views_num]

if render_id not in train_ids or self.split == 'test':
src_views = [train_ids[i] for i in argsorts[:input_views_num] if i in nearest_ids]
src_views = [train_ids[i] for i in argsorts[:2*input_views_num] if i in nearest_ids][:input_views_num]
else:
src_views = [train_ids[i] for i in argsorts[1:input_views_num+1] if i in nearest_ids]
src_views = [train_ids[i] for i in argsorts[1:2*input_views_num+1] if i in nearest_ids][:input_views_num]
if len(src_views) < input_views_num:
__import__('ipdb').set_trace()
self.metas += [(scene, render_id, src_views, frame_id) for frame_id in (np.arange(frame_len))[b:e:s]]
Expand Down

0 comments on commit 5ba9ed2

Please sign in to comment.