stillleben module

The stillleben package.

Contents

Modules

module camera_model
Introduces camera noise effects.
module diff
Differentiation package for stillleben
module extension
module losses
Loss functions to be used with stillleben differentiation package.

Classes

class Animator
Generates interpolated object poses.
class ImageLoader
Multi-threaded image loader.
class ImageSaver
Multi-threaded image writer.
class LightMap
An .ibl light map for image-based lighting.
class Mesh
Represents a mesh shape.
class MeshCache
Caches Mesh instances.
class Object
An instantiated mesh with associated pose and other instance properties.
class Range3D
An axis-aligned 3D range (bounding box).
class RenderPass
Renders a Scene.
class RenderPassResult
Result of a RenderPass run.
class Scene
Represents a scene with multiple objects.
class Texture
An RGBA texture.
class Texture2D
An RGBA texture.
class Viewer
Interactive scene viewer.

Functions

def init() -> None
Initialize without CUDA support
def init_cuda(device_index: int = 0, use_cuda: bool = True) -> None
Initialize with CUDA support.
def render_debug_image(arg0: Scene, /) -> at::Tensor
Render a debug image with object coordinate systems
def view(scene: Scene) -> None
Shortcut for viewing a scene interactively.
def quat_to_matrix(quat: at::Tensor) -> at::Tensor
Convert a quaternion into a 3x3 rotation matrix.
def matrix_to_quat(matrix: at::Tensor) -> at::Tensor
Convert a 3x3 rotation matrix into a quaternion.

Function documentation

def stillleben.init() -> None

Initialize without CUDA support

Creates the OpenGL context on the first available EGL device.

def stillleben.init_cuda(device_index: int = 0, use_cuda: bool = True) -> None

Initialize with CUDA support.

Parameters
device_index Index of CUDA device to use for rendering
use_cuda If False, return RenderPass results on CPU

This initialization function chooses an EGL device that corresponds to a given CUDA device (as specified by device_index). If there is no such device, initialization will abort.

Setting use_cuda to False can help in situations where it is desirable to use CUDA_VISIBLE_DEVICES or device_index to choose the GPU, but CUDA is not actually used.

def stillleben.view(scene: Scene) -> None

Shortcut for viewing a scene interactively.

Parameters
scene Scene to be shown

Creates and launches a Viewer for the given scene. This call is blocking and returns when the viewer is closed by the user.

def stillleben.quat_to_matrix(quat: at::Tensor) -> at::Tensor

Convert a quaternion into a 3x3 rotation matrix.

Parameters
quat Should be a size 4 tensor with elements [x y z w]
Returns 3x3 rotation matrix

def stillleben.matrix_to_quat(matrix: at::Tensor) -> at::Tensor

Convert a 3x3 rotation matrix into a quaternion.

Parameters
matrix 3x3 rotation matrix
Returns Quaternion [x y z w]