nerfstudio icon indicating copy to clipboard operation
nerfstudio copied to clipboard

Camera rescaling applied twice in dataparser and dataset

Open RohanChacko opened this issue 2 years ago • 3 comments

Hi,

Is there a reason for camera rescaling being applied twice - both in dataparser and dataset classes? Is scale_factor and downscale_factor supposed to mean different things? Thanks!

https://github.com/nerfstudio-project/nerfstudio/blob/492fa0e67b238a1ca3158a37845aec313e5deb23/nerfstudio/data/dataparsers/nerfstudio_dataparser.py#L276

https://github.com/nerfstudio-project/nerfstudio/blob/492fa0e67b238a1ca3158a37845aec313e5deb23/nerfstudio/data/datasets/base_dataset.py#L55

RohanChacko avatar Jul 08 '23 00:07 RohanChacko

Yea, agreed thats a little odd. The scale factors are defined in two different configs. The the dataparser one, it is used to determine which data to load from preprocess sizes (must be powers of 2). The dataset one lets you apply an arbitrary scaling (float) on the already loaded data.

https://github.com/nerfstudio-project/nerfstudio/blob/91291bc52c2501c8c93378382416edc2693647a8/nerfstudio/data/datamanagers/base_datamanager.py

and https://github.com/nerfstudio-project/nerfstudio/blob/91291bc52c2501c8c93378382416edc2693647a8/nerfstudio/data/dataparsers/nerfstudio_dataparser.py#L51-L52

tancik avatar Jul 14 '23 01:07 tancik

Since InputDataset does a deepcopy of the dataparser's camera, wouldn't it be erroneously applying the scaling factor to the camera twice? https://github.com/nerfstudio-project/nerfstudio/blob/492fa0e67b238a1ca3158a37845aec313e5deb23/nerfstudio/data/datasets/base_dataset.py#L54

RohanChacko avatar Jul 14 '23 19:07 RohanChacko

I encounter the same issue here. I think it looks weird to apply the scale twice. Is there an update on this thread? Thanks.

Serenitysmk avatar Jun 25 '24 14:06 Serenitysmk