Skip to content

Commit ccc0329

Browse files
authored
Fix data generation error in the referencerun_fmb.py (#33)
(Closes MET-58) ## Background Turns out I made a mistake when porting over the reference implementation in #6, where in the section that render the g round truth image, I dropped the code that delete the light & camera nodes (because I thought that `r.delete()` would delete everything regardless. However, without this cleanup, it seems like `pyrender` always uses the first camera node to render the image, so we end up with a sequence of identical input images, which causes convergence issue. This is fixed by placing back the cleanup code. ## Before & After **Before the fix**: Input depth image (generated by `pyrenderer`): <img width="558" height="423" alt="image" src="https://github.com/user-attachments/assets/6ed682a2-b219-4b3d-87aa-3ed6b335322a" /> FMB optimized output: <img width="551" height="427" alt="image" src="https://github.com/user-attachments/assets/433610bd-2371-43d9-80dd-a567cdbf5d43" /> **After the fix**: Input depth image: <img width="558" height="423" alt="image" src="https://github.com/user-attachments/assets/1c005a24-1659-4b0a-be0d-97faf00b5d11" /> FMB optimized output: <img width="551" height="427" alt="image" src="https://github.com/user-attachments/assets/943ed577-b941-4531-9712-114a82ee7c86" />
1 parent ef32857 commit ccc0329

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

examples/run_fmb.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -384,6 +384,10 @@ def main():
384384
ref_colors.append(color)
385385
ref_depths.append(target_depth)
386386

387+
for node in list(scene.light_nodes):
388+
scene.remove_node(node)
389+
for node in list(scene.camera_nodes):
390+
scene.remove_node(node)
387391
r.delete()
388392

389393
render_time = (time.perf_counter() - render_start) * 1000

0 commit comments

Comments
 (0)