zju3dv / object_nerf

Code for "Learning Object-Compositional Neural Radiance Field for Editable Scene Rendering", ICCV 2021
https://zju3dv.github.io/object_nerf/
MIT License
313 stars 23 forks source link

assert self.embedding_space_ftr.num_embeddings >= idx_occu.shape[0] #9

Open CongSuxu opened 2 years ago

CongSuxu commented 2 years ago

assert self.embedding_space_ftr.num_embeddings >= idx_occu.shape[0] AssertionError

I encounter this error when test on toy_desk dataset. Does anyone know what is causing it? the error location is in embeding_helper.py line 197.

by the way, how can i change the transformation matrix form slam/opncv format to NDC format, is there any code exist in project that i didnt found.

ybbbbt commented 2 years ago

Hi, CongSuxu,

Can you plese check if https://github.com/zju3dv/object_nerf/issues/7 can resolve your problem? If this can't be fixed, please let me know.

BTW, the convension of transformation matrix between SLAM/OpenCV format and NDC format can be found here:

https://github.com/zju3dv/object_nerf/blob/e8b1a7a5ab0596babdf4400a9e8908f1bfdcf990/datasets/generic_dataset.py#L358-L361

CongSuxu commented 2 years ago

Thank you for your reply. I tried #7 's answer that change the N_max_voxels from 800000 to 1200000 (just to enlarge it) in object_nerf_edit_demo_models/toydesk_2/run_config_snapshot.yaml, which is in the downloaded pre-trained models. Then i get the load state_dict error, because the number in checkpoint is 80000, but this number in model is 1200000.

my comand is python test/demo_editable_render.py config=test/config/edit_toy_desk_2.yaml ckpt_path=object_nerf_edit_demo_models/toydesk_2/last.ckpt prefix=toy_desk2_rotating

ybbbbt commented 2 years ago

Hi, it seems that I cannot reproduce this issue. Can you provide more information or logs printed on the terminal? I guess there might be something wrong with checkpoint loading.