Skip to content

Commit

Permalink
easyvolcap: fix nerf conversion
Browse files Browse the repository at this point in the history
  • Loading branch information
dendenxu committed Jan 22, 2024
1 parent 9100287 commit 9f6f599
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions scripts/nerf/nerf_to_easyvolcap.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@
@catch_throw
def main():
parser = argparse.ArgumentParser()
parser.add_argument('--nerf_root', type=str, default='/mnt/data/home/shuaiqing/Code/MultiNBFast/cache/Hospital/4')
parser.add_argument('--volcap_root', type=str, default='/mnt/data/home/shuaiqing/Code/MultiNBFast/cache/Hospital/4')
parser.add_argument('--nerf_root', type=str, default='/mnt/data/home/xuzhen/projects/large_gaussian/hospital')
parser.add_argument('--volcap_root', type=str, default='/mnt/data/home/xuzhen/projects/large_gaussian/hospital')
parser.add_argument('--transforms_file', type=str, default='transforms_train.json')
parser.add_argument('--intri_file', type=str, default='cameras_train/00/intri.yml')
parser.add_argument('--extri_file', type=str, default='cameras_train/00/extri.yml')
Expand Down Expand Up @@ -73,12 +73,12 @@ def main():
if args.transforms_file.endswith('_train.json') and \
exists(join(args.nerf_root, args.transforms_file.replace("_train.json", "_test.json"))) and \
args.convert_test:
run(f'python scripts/nerf/nerf_to_easyvolcap.py --nerf_root {args.nerf_root} --volcap_root {args.volcap_root} --transforms_file {args.transforms_file.replace("_train.json", "_test.json")} --images_dir {args.images_dir.replace("_train", "_test")} --intri_file {args.intri_file.replace("_train", "_test")} --extri_file {args.extri_file.replace("_train", "_test")}' + '--organize_images' if args.organize_images else '')
run(f'python scripts/nerf/nerf_to_easyvolcap.py --nerf_root {args.nerf_root} --volcap_root {args.volcap_root} --transforms_file {args.transforms_file.replace("_train.json", "_test.json")} --images_dir {args.images_dir.replace("_train", "_test")} --intri_file {args.intri_file.replace("_train", "_test")} --extri_file {args.extri_file.replace("_train", "_test")}' + ' --organize_images' if args.organize_images else '')

if args.transforms_file.endswith('_train.json') \
and exists(join(args.nerf_root, args.transforms_file.replace("_train.json", "_val.json"))) \
and args.convert_val:
run(f'python scripts/nerf/nerf_to_easyvolcap.py --nerf_root {args.nerf_root} --volcap_root {args.volcap_root} --transforms_file {args.transforms_file.replace("_train.json", "_val.json")} --images_dir {args.images_dir.replace("_train", "_val")} --intri_file {args.intri_file.replace("_train", "_val")} --extri_file {args.extri_file.replace("_train", "_val")}' + '--organize_images' if args.organize_images else '')
run(f'python scripts/nerf/nerf_to_easyvolcap.py --nerf_root {args.nerf_root} --volcap_root {args.volcap_root} --transforms_file {args.transforms_file.replace("_train.json", "_val.json")} --images_dir {args.images_dir.replace("_train", "_val")} --intri_file {args.intri_file.replace("_train", "_val")} --extri_file {args.extri_file.replace("_train", "_val")}' + ' --organize_images' if args.organize_images else '')


if __name__ == '__main__':
Expand Down

0 comments on commit 9f6f599

Please sign in to comment.