irtk.connectors.pytorch3d_connector.PyTorch3DConnector¶
- class irtk.connectors.pytorch3d_connector.PyTorch3DConnector¶
- __init__()¶
- renderC(scene, render_options, sensor_ids=[0], integrator_id=0)¶
Renders the scene with the given sensor IDs and integrator IDs.
- Parameters:
scene – The scene to render.
render_options – The render options.
sensor_ids – The sensor IDs.
integrator_id – The integrator ID.
- Returns:
A torch.Tensor containing the rendered images with shape (num_sensors, h, w, c).
- renderD(image_grads, scene, render_options, sensor_ids=[0], integrator_id=0)¶
Given the gradients of the rendered images, compute the gradients of the scene parameters.
- Parameters:
image_grads – The image gradients.
scene – The scene passed to renderC.
render_options – The render options.
sensor_ids – The sensor IDs.
integrator_id – The integrator ID.
- Returns:
A list of torch.Tensors, where each tensor corresponds to the gradient of a parameter in scene.requiring_grad, in the same order.