torchdrivesim.rendering.nvdiffrast
#
Nvdiffrast-based renderers, equivalent to those based on PyTorch3D but sometimes faster. This module imports correctly if nvdiffrast is missing, but the renderer will raise the NvdiffrastNotFound exception.
Module Contents#
Classes#
Configuration of nvdiffrast-based renderer. |
|
Similar to PyTorch3DRenderer, and producing indistinguishable images, but sometimes faster. |
Functions#
|
Attributes#
- exception torchdrivesim.rendering.nvdiffrast.NvdiffrastNotFound[source]#
Bases:
ImportError
Nvdiffrast is not installed.
- class torchdrivesim.rendering.nvdiffrast.NvdiffrastRendererConfig[source]#
Bases:
torchdrivesim.rendering.base.RendererConfig
Configuration of nvdiffrast-based renderer.
- class torchdrivesim.rendering.nvdiffrast.NvdiffrastRenderer(cfg: NvdiffrastRendererConfig, *args, **kwargs)[source]#
Bases:
torchdrivesim.rendering.base.BirdviewRenderer
Similar to PyTorch3DRenderer, and producing indistinguishable images, but sometimes faster. Note that nvdiffrast requires separate installation and is subject to its own license terms.
- render_mesh(mesh: torchdrivesim.mesh.BirdviewMesh, res: torchdrivesim.utils.Resolution, cameras: pytorch3d.renderer.FoVOrthographicCameras) torch.Tensor [source]#
Renders a given mesh, producing BxHxWxC tensor image of float RGB values in [0,255] range.