UpsamplingCRNN

class lightning_pose.models.heatmap_tracker_mhcrnn.UpsamplingCRNN(num_filters_for_upsampling: int, num_keypoints: int, upsampling_factor: Literal[1, 2] = 2, hkernel: int = 2, hstride: int = 2, hpad: int = 0, nfilters_channel: int = 16)[source]

Bases: Module

Bidirectional Convolutional RNN network that handles heatmaps of context frames.

The input to the CRNN is a set of heatmaps at times t-k, …, t, …t+k, one heatmap for each timepoint/keypoint

The output of the CRNN is a single heatmap for each keypoint

Methods Summary

forward(representations)

Define the computation performed at every call.

initialize_layers()

Methods Documentation

forward(representations: Tensor, {'__torchtyping__': True, 'details': ('frames', 'batch', 'features', 'rep_height', 'rep_width'), 'cls_name': 'TensorType'}]) Tensor, {'__torchtyping__': True, 'details': ('batch', 'num_keypoints', 'heatmap_height', 'heatmap_width',), 'cls_name': 'TensorType'}][source]

Define the computation performed at every call.

Should be overridden by all subclasses.

Note

Although the recipe for forward pass needs to be defined within this function, one should call the Module instance afterwards instead of this since the former takes care of running the registered hooks while the latter silently ignores them.

initialize_layers()[source]
__init__(num_filters_for_upsampling: int, num_keypoints: int, upsampling_factor: Literal[1, 2] = 2, hkernel: int = 2, hstride: int = 2, hpad: int = 0, nfilters_channel: int = 16) None[source]

Upsampling Convolutional RNN - initialize input and hidden weights.