sign_language_translator.vision.landmarks.connections module

class sign_language_translator.vision.landmarks.connections.BaseConnections[source][source]

Bases: ABC

A class containing information about the connections between landmarks generated from various models.

abstract property connections: List[Connection][source]

indexes of landmarks that are connected

property line_colors: List[Tuple[int, int, int]][source]

list of colors for each connection

property line_indexes: List[Sequence[int]][source]

list of sequence of indexes that are connected with single line

property line_labels: List[str][source]

list of labels for each connection

property matplot3d_config: Dict[str, Any][source]

Configuration arguments for 3D matplotlib plot

abstract property n_features: int[source]

Total number of features per landmark

abstract property n_landmarks: int[source]

Total number of landmarks

abstract static name() str[source][source]

The name of the connection format

class sign_language_translator.vision.landmarks.connections.MediapipeConnections[source][source]

Bases: BaseConnections

Represents the connections for the Mediapipe landmark model.

property connections: List[Connection][source]

indexes of landmarks that are connected

property n_features: int[source]

Total number of features per landmark

property n_landmarks: int[source]

Total number of landmarks

static name() str[source][source]

The name of the connection format

sign_language_translator.vision.landmarks.connections.get_connections(connections: str) BaseConnections[source][source]

Create a connections object based on the given string

Parameters:

connections (str) – The name of the connections format to use.

Returns:

The connections object.

Return type:

BaseConnections

Raises:

ValueError – If the connections format is not recognized.