threedb.controls.blender.background

Set the background to a solid-color. An example config file using this control can be found here: https://github.com/3db/3db/tree/main/examples/unit_tests/background.yaml.

class threedb.controls.blender.background.BackgroundControl(root_folder: str)

Bases: threedb.controls.base_control.PostProcessControl

Control that replace the transparent background of a render (i.e., the alpha channel) with a given color specified in HSV by the control parameters.

Continuous parameters:

  • H, S and V: the hue, saturation, and value of the color to fill the background with. (default range: [0, 1])

Example images

Varying all parameters across their ranges.

__init__(root_folder: str)

Construct a BaseControl

Parameters

root_folder – The folder containing all the data for this 3DB experiment. All paths are lative to his folder

apply(render: torch.Tensor, control_args: Dict[str, Any])torch.Tensor

Modify a rendered image and return the transformed output.

Parameters
  • render (ch.Tensor) – A tensor representation of the rendered image.

  • control_args (Dict[str, Any]) – Control-specific settings (e.g., noise level for noise corruption, contrast level for contrast change, etc.).

Returns

The post-processed output.

Return type

ch.Tensor

threedb.controls.blender.background.Control

alias of threedb.controls.blender.background.BackgroundControl