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.
Attributes¶
Exceptions¶
Nvdiffrast is not installed. |
Classes¶
Configuration of nvdiffrast-based renderer. |
|
Similar to PyTorch3DRenderer, and producing indistinguishable images, but sometimes faster. |
Functions¶
|
Module Contents¶
- exception torchdrivesim.rendering.nvdiffrast.NvdiffrastNotFound[source]¶
Bases:
ImportErrorNvdiffrast is not installed.
- class torchdrivesim.rendering.nvdiffrast.NvdiffrastRendererConfig[source]¶
Bases:
torchdrivesim.rendering.base.RendererConfigConfiguration of nvdiffrast-based renderer.
- class torchdrivesim.rendering.nvdiffrast.NvdiffrastRenderer(cfg: NvdiffrastRendererConfig, *args, **kwargs)[source]¶
Bases:
torchdrivesim.rendering.base.BirdviewRendererSimilar to PyTorch3DRenderer, and producing indistinguishable images, but sometimes faster. Note that nvdiffrast requires separate installation and is subject to its own license terms.
- render_rgb_mesh(mesh: torchdrivesim.mesh.RGBMesh, res: torchdrivesim.utils.Resolution, cameras: torchdrivesim.rendering.base.Cameras) torch.Tensor[source]¶
Renders a given mesh, producing BxHxWxC tensor image of float RGB values in [0,255] range.