zju3dv / IntrinsicNeRF

[ICCV2023] IntrinsicNeRF: Learning Intrinsic Neural Radiance Fields for Editable Novel View Synthesis
https://zju3dv.github.io/intrinsic_nerf/
183 stars 6 forks source link

compute loss error #3

Closed xiyufeng2 closed 1 year ago

xiyufeng2 commented 1 year ago

when I train the blender dataset, there is an error occured: chroma_loss, residual_loss, reflect_sparsity_loss, shading_smooth_loss, far_reflect_loss, intensity_loss = compute_intrinsic_loss(albedo, shading, residual, target_s, disp, acc, target_m)

UnboundLocalError: local variable 'target_m' referenced before assignment

ywcmaike commented 1 year ago

please set "dataset_type = blender_intrinsic" in your config.txt like object_level/configs/intrinsic.txt. and this bug will be solved. target_m is generated in https://github.com/zju3dv/IntrinsicNeRF/blob/5c41fc6aaa6880e8b334de0372a3747831171f68/object_level/run_nerf.py#L935C17-L939C17