google / nerfies

This is the code for Deformable Neural Radiance Fields, a.k.a. Nerfies.
https://nerfies.github.io
Apache License 2.0
1.59k stars 215 forks source link

Key error in Nerfies_Render_Video.ipynb #49

Open toobaimt opened 2 years ago

toobaimt commented 2 years ago

In the second to last code block, 'camera' key is not specified for batch metadata. render = render_fn(state, batch, rng=rng) What do I set it to?

jasper2326 commented 2 years ago

I got the same error message in nerfies/model.py while rendering. camera_code = self.camera_encoder(metadata['camera']) KeyError: 'camera'

wuzijian1997 commented 2 years ago

Same issue here. Did you guys solve it?

wuzijian1997 commented 2 years ago

Same issue here. Did you guys solve it?

I replace batch['metadata'] = { 'appearance': jnp.zeros_like(batch['origins'][..., 0, jnp.newaxis], jnp.uint32), 'warp': jnp.zeros_like(batch['origins'][..., 0, jnp.newaxis], jnp.uint32),} with batch['metadata'] = { 'appearance': jnp.zeros_like(batch['origins'][..., 0, jnp.newaxis], jnp.uint32), 'warp': jnp.zeros_like(batch['origins'][..., 0, jnp.newaxis], jnp.uint32), 'camera': jnp.zeros_like(batch['origins'][..., 0, jnp.newaxis], jnp.uint32),}

This works for me.