dgs.models.embedding_generator.pose_based.LinearPBEG

class dgs.models.embedding_generator.pose_based.LinearPBEG(*args: Any, **kwargs: Any)[source]

Model to compute a pose-embedding given a pose, or batch of poses describing them as a single vector.

Module Name

LinearPBEG

Description

The model consists of one or multiple linear layers followed by a single sigmoid activation function. The number of linear layers is determined by the length of the hidden_layers parameter.

Params

joint_shape: (tuple[int, int])

The number of joints and number of dimensions of the joints as tuple. For data from ‘COCO’ the number of joints is 17 and all joints are two-dimensional. Therefore, resulting in joint_shape = (17, 2).

Optional Params

hidden_layers: (Union[list[int], tuple[int, …], None], optional)

Respective size of every hidden layer. The value can be None to use only one single linear NN-layer to cast the inputs to the outputs. Default DEF_VAL.embed_gen.pose.LPBEG.hidden_layers.

bias: (bool, optional)

Whether to use a bias term in the linear layers. Default DEF_VAL.embed_gen.pose.LPBEG.bias.

bbox_format: (Union[str, tv_tensors.BoundingBoxFormat], optional)

The target format of the bounding box coordinates. This will have influence on the results. Default DEF_VAL.embed_gen.pose.LPBEG.bbox_format.

Important Inherited Params

embedding_size: (int)

Output shape or size of the embedding.

__init__(*args, **kwargs)

Methods

configure_torch_module(module[, train])

Set compute mode and send model to the device or multiple parallel devices if applicable.

embedding_key_exists(s)

Return whether the embedding_key of this model exists in a given state.

forward(ds)

Forward pass of the linear pose-based embedding generator.

terminate()

Terminate this module and all of its submodules.

validate_params(validations[, attrib_name])

Given per key validations, validate this module's parameters.

Attributes

device

Get the device of this module.

is_training

Get whether this module is set to training-mode.

module_name

Get the name of the module.

module_type

name

Get the name of the module.

name_safe

Get the escaped name of the module usable in filepaths by replacing spaces and underscores.

precision

Get the (floating point) precision used in multiple parts of this module.

embedding_size

The size of the embedding.

nof_classes

The number of classes in the dataset / embedding.