Open santolina opened 2 years 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?
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.
OS: ubuntu 20.04, GPU: RTX 2080 Ti, Pytorch: 1.10.0, CUDA version: 11.6
Evaluation command
mega_nerf/eval.py --config_file configs/mega-nerf/rubble.yaml --exp_name logs/rubble-pixsfm-8 --dataset_path dataset/rubble --container_path pretrain/rubble-pixsfm-8.pt
Generated hparams.txt config_file: configs/mega-nerf/rubble.yaml
dataset_type: filesystem
chunk_paths: None
num_chunks: 200
disk_flush_size: 10000000
train_every: 1
cluster_mask_path: None
ckpt_path: None
container_path: pretrain/rubble-pixsfm-8.pt
near: 1
far: None
ray_altitude_range: [11.0, 38.0]
coarse_samples: 256
fine_samples: 512
train_scale_factor: 1
val_scale_factor: 4
pos_xyz_dim: 12
pos_dir_dim: 4
layers: 8
skip_layers: [4]
layer_dim: 256
bg_layer_dim: 256
appearance_dim: 48
affine_appearance: False
use_cascade: False
train_mega_nerf: None
boundary_margin: 1.15
all_val: False
cluster_2d: False
sh_deg: None
center_pixels: True
shifted_softplus: True
batch_size: 1024
image_pixel_batch_size: 65536
model_chunk_size: 32768
perturb: 1.0
noise_std: 1.0
lr: 0.0005
lr_decay_factor: 0.1
bg_nerf: True
ellipse_scale_factor: 1.1
ellipse_bounds: True
train_iterations: 500000
val_interval: 500001
ckpt_interval: 10000
resume_ckpt_state: True
amp: True
detect_anomalies: False
random_seed: 42
exp_name: logs/rubble-pixsfm-8
dataset_path: dataset/rubble