sign_language_translator.models.video_embedding.video_embedding_model module

This module provides an abstract base class for video embedding models that transform a sequence of video frames into an embedding tensor.

Classes:
  • VideoEmbeddingModel: An abstract base class for video embedding models.

class sign_language_translator.models.video_embedding.video_embedding_model.VideoEmbeddingModel[source]

Bases: ABC

Abstract base class for video embedding models.

This class defines the interface for video embedding models, which transform a sequence of video frames into an embedding tensor.

None
embed(frame_sequence, **kwargs)[source]

Abstract method to embed a sequence of video frames.

abstract embed(frame_sequence: Iterable[Tensor | ndarray[Any, dtype[uint8]]], **kwargs) Tensor[source]

Embed a sequence of video frames into an embedding tensor.

Parameters:
  • frame_sequence (Iterable[Union[Tensor, NDArray[uint8]]]) – A sequence of video frames, where each frame can be either a Tensor or a numpy array of uint8 values of shape (W, H, C).

  • **kwargs – Additional keyword arguments specific to the embedding model.

Returns:

An embedding tensor representing the sequence of video frames.

Return type:

Tensor