torchdrivesim.rendering.pytorch3d¶
PyTorch3D-based renderers, used by default in TorchDriveSim.
Attributes¶
Exceptions¶
Import can't find module, or can't find name in module. |
Classes¶
Blending choices from pytorch3d. May be ignored by other renderer types. |
|
Configuration of pytorch3d-based renderer. |
|
Shader that ignores lighting, based on https://github.com/facebookresearch/pytorch3d/issues/84 |
|
Renderer based on pytorch3d, using an orthographic projection and a trivial shader. |
Functions¶
Module Contents¶
- exception torchdrivesim.rendering.pytorch3d.Pytorch3DNotFound[source]¶
Bases:
ImportErrorImport can’t find module, or can’t find name in module.
- class torchdrivesim.rendering.pytorch3d.RenderingBlend[source]¶
Bases:
enum.EnumBlending choices from pytorch3d. May be ignored by other renderer types. https://pytorch3d.readthedocs.io/en/latest/modules/renderer/blending.html
- class torchdrivesim.rendering.pytorch3d.Pytorch3DRendererConfig[source]¶
Bases:
torchdrivesim.rendering.base.RendererConfigConfiguration of pytorch3d-based renderer.
- differentiable_rendering: RenderingBlend[source]¶
- class torchdrivesim.rendering.pytorch3d.Shader2D(device='cpu', background_color: Tuple[float, float, float] = (0, 0, 0), blend=RenderingBlend.soft)[source]¶
Bases:
torch.nn.ModuleShader that ignores lighting, based on https://github.com/facebookresearch/pytorch3d/issues/84
- class torchdrivesim.rendering.pytorch3d.Pytorch3DRenderer(cfg: Pytorch3DRendererConfig, *args, **kwargs)[source]¶
Bases:
torchdrivesim.rendering.base.BirdviewRendererRenderer based on pytorch3d, using an orthographic projection and a trivial shader. Works on both GPU and CPU, but CPU is very slow.
- render_mesh(mesh: torchdrivesim.mesh.BirdviewMesh, 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.
- torchdrivesim.rendering.pytorch3d.construct_pytorch3d_cameras(cameras: torchdrivesim.rendering.base.Cameras) pytorch3d.renderer.FoVOrthographicCameras[source]¶