irtk.renderer.Renderer¶
- class irtk.renderer.Renderer(*args: Any, **kwargs: Any)¶
A PyTorch module for rendering.
This class wraps the rendering process in a PyTorch module, allowing it to be used seamlessly with other PyTorch operations.
- __init__(connector_name: str, render_options: dict[str, Any] = {})¶
Initializes the Renderer.
- Parameters:
connector_name – Name of the connector to use for rendering.
render_options – Options for the rendering process.
- forward(scene: Any, sensor_ids: List[int] | torch.Tensor = [0], integrator_id: int = 0) torch.Tensor ¶
Performs the forward pass of the rendering.
- Parameters:
scene – The scene to be rendered.
sensor_ids – List of sensor IDs to render from.
integrator_id – ID of the integrator to use.
- Returns:
The rendered image(s) as a tensor.
- Return type:
torch.Tensor