cmusatyalab / mega-nerf

MIT License
450 stars 54 forks source link

On evaluation settings for the pretrained models #10

Open santolina opened 2 years ago

santolina commented 2 years ago

Thanks a lot for sharing the pretrained models.

I'd like to confirm the evaluation setting for the pretrained models (8 submodules case).

When validation images for rubble were rendered by the following evaluation command, I got predicted images which looks other scene compared to Ground Truth (PSNR is quite lower than reported one). Also, similar things happen for other sequences.

So, I'm afraid that there are some missed settings in my side.

I would appreciate if you have some insights to reproduce the results using the pretrained models.

gjgjgjfff commented 1 year ago

Hello,Did you run the file eval.py successfully? I run: python mega_nerf/eval.py --config_file configs/nerf/rubble.yaml --exp_name logs/Mill_19/rubble --dataset_path /share/home/drliuqi/gjf/3D-Reconstruction/dataset/mill19/rubble-pixsfm --container_path out_merga/Mill_19/rubble-pixsfm-8.pt but error: Traceback (most recent call last): File "/share/home/drliuqi/gjf/3D-Reconstruction/mega-nerf-main/mega_nerf/eval.py", line 30, in main(_get_eval_opts()) File "/share/home/drliuqi/anaconda3/envs/mega-nerf/lib/python3.9/site-packages/torch/distributed/elastic/multiprocessing/errors/init.py", line 345, in wrapper return f(*args, *kwargs) File "/share/home/drliuqi/gjf/3D-Reconstruction/mega-nerf-main/mega_nerf/eval.py", line 26, in main Runner(hparams).eval() File "/share/home/drliuqi/gjf/3D-Reconstruction/mega-nerf-main/mega_nerf/runner.py", line 323, in eval val_metrics = self._run_validation(0) File "/share/home/drliuqi/gjf/3D-Reconstruction/mega-nerf-main/mega_nerf/runner.py", line 427, in _runvalidation results, = self.render_image(metadata_item) File "/share/home/drliuqi/gjf/3D-Reconstruction/mega-nerf-main/mega_nerf/runner.py", line 587, in render_image resultbatch, = render_rays(nerf=nerf, bg_nerf=bg_nerf, File "/share/home/drliuqi/gjf/3D-Reconstruction/mega-nerf-main/mega_nerf/rendering.py", line 88, in render_rays results = _get_results(nerf=nerf, File "/share/home/drliuqi/gjf/3D-Reconstruction/mega-nerf-main/mega_nerf/rendering.py", line 195, in _get_results _inference(results=results, File "/share/home/drliuqi/gjf/3D-Reconstruction/mega-nerf-main/mega_nerf/rendering.py", line 324, in _inference model_chunk = nerf(typ == 'coarse', xyz_chunk, sigma_noise=sigma_noise) File "/share/home/drliuqi/anaconda3/envs/mega-nerf/lib/python3.9/site-packages/torch/nn/modules/module.py", line 1102, in _call_impl return forward_call(input, **kwargs) File "/share/home/drliuqi/gjf/3D-Reconstruction/mega-nerf-main/mega_nerf/models/mega_nerf.py", line 22, in forward cluster_distances = torch.cdist(x[:, self.cluster_dim_start:3], self.centroids[:, self.cluster_dim_start:]) TypeError: 'bool' object is not subscriptable can you help me?