sarafridov / K-Planes

Other
479 stars 45 forks source link

Image Height and Width Flipped for D-NeRF scenes #44

Open azzarelli opened 6 months ago

azzarelli commented 6 months ago

I've been messing about with 360 in-the-wild datasets using D-NeRF data format and I believe I found a minor bug with setting the image height and width during data loading.

From plenoxels.datasets.data_loading.py

def _load_nerf_image_pose(...):
    ...
    if out_h is None:
        out_h = int(img.size[0] / downsample) # Should be img.size[1]
    if out_w is None:
        out_w = int(img.size[1] / downsample) # Should be img.size[0]

This doesn't affect square images (i.e. the original D-NeRF dataset) or K-Planes paper results, though for anyone looking to use their own datasets might be a useful note!