seoha-kim / Sync-NeRF

[AAAI 2024] Official repository for "Sync-NeRF: Generalizing Dynamic NeRFs to Unsynchronized Videos"
53 stars 1 forks source link

Dimension not match issue during training #1

Closed Winter-Dry closed 11 months ago

Winter-Dry commented 12 months ago

Thanks for your wonderful works!

When I try to train the two models in this repository on sears_steak dataset, they all occurs dimension not match problem.

For MixVoxels: Command: python train.py --config configs/plenoptic/searsteak.txt Errors:_

Traceback (most recent call last): File "train.py", line 1324, in reconstruction(args) File "train.py", line 231, in reconstruction train_dataset = dataset(args.datadir, split='train', downsample=args.downsample_train, is_stack=False, white_bg = args.chromakey, File "/home/a/Sync-NeRF/Sync-MixVoxels/dataLoader/llff_video.py", line 295, in init self.read_meta(no_load, optimize_test) File "/home/a/Sync-NeRF/Sync-MixVoxels/dataLoader/llff_video.py", line 439, in read_meta self.dynamic_rays = self.all_rays[dynamic_mask] IndexError: The shape of the mask [6854640] at index 0 does not match the shape of the indexed tensor [27418560, 6] at index 0

For K-Planes: Command: PYTHONPATH='.' python plenoxels/main.py --config-path plenoxels/configs/plenoptic/salmonexplicit.py Errors:_

Traceback (most recent call last): File "plenoxels/main.py", line 127, in main() File "plenoxels/main.py", line 123, in main trainer.train() File "/home/a/Sync-NeRF/Sync-K-Planes/plenoxels/runners/base_trainer.py", line 166, in train data = next(batch_iter) File "/home/a/miniconda3/envs/mixvoxels/lib/python3.8/site-packages/torch/utils/data/dataloader.py", line 681, in next data = self._next_data() File "/home/a/miniconda3/envs/mixvoxels/lib/python3.8/site-packages/torch/utils/data/dataloader.py", line 1376, in _next_data return self._process_data(data) File "/home/a/miniconda3/envs/mixvoxels/lib/python3.8/site-packages/torch/utils/data/dataloader.py", line 1402, in _process_data data.reraise() File "/home/a/miniconda3/envs/mixvoxels/lib/python3.8/site-packages/torch/_utils.py", line 461, in reraise raise exception IndexError: Caught IndexError in DataLoader worker process 0. Original Traceback (most recent call last): File "/home/a/miniconda3/envs/mixvoxels/lib/python3.8/site-packages/torch/utils/data/_utils/worker.py", line 302, in _worker_loop data = fetcher.fetch(index) File "/home/a/miniconda3/envs/mixvoxels/lib/python3.8/site-packages/torch/utils/data/_utils/fetch.py", line 51, in fetch data = self.dataset[possibly_batched_index] File "/home/a/Sync-NeRF/Sync-K-Planes/plenoxels/datasets/video_datasets.py", line 357, in getitem "timestamps": self.timestamps[index], # (num_rays or 1, ) IndexError: index 13598038670 is out of bounds for dimension 0 with size 7403011200

Could you please tell us how to fix this, Thanks again!

seoha-kim commented 12 months ago

Hello. I appreciate your interest in my research.

For MixVoxels, please check if you use the image folder path downsampled by 2. For K-Planes, pre-compute the weight map with downsample=4, and change it to downsample=2.