Hi, when I render the apartment_2, I got wrong depth map and rgb.
I was using the script:
def render_scene(scene_name, scene_file):
output_dir = os.path.join(output_root, scene_name)
os.makedirs(output_dir, exist_ok=True)
sim = make_simulator(scene_file)
agent = sim.get_agent(0)
poses = generate_camera_poses(sim, n_views=N_VIEWS)
print(f" rendering {scene_name}: {len(poses)} views")
for idx, pose in enumerate(poses):
transform = mn.Matrix4(np.array(pose).T)
agent.scene_node.transformation = transform
obs = sim.get_sensor_observations()
if SAVE_RGB:
rgb_img = obs["color_sensor"]
rgb_path = os.path.join(output_dir, f"rgb_{idx:03d}.png")
Image.fromarray(rgb_img[:, :, :3]).save(rgb_path)
if SAVE_DEPTH:
depth_img = obs["depth_sensor"]
depth_vis = (depth_img / np.clip(np.max(depth_img), 1e-6, None) * 255).astype(np.uint8)
depth_path = os.path.join(output_dir, f"depth_{idx:03d}.png")
Image.fromarray(depth_vis).save(depth_path)
sim.close()
Hi, when I render the apartment_2, I got wrong depth map and rgb.
I was using the script:
def render_scene(scene_name, scene_file):
output_dir = os.path.join(output_root, scene_name)
os.makedirs(output_dir, exist_ok=True)