pose_format.torch.representation.angle module
Classes:
|
Class to compute the angle between the X/Y axis and the line segments formed by two sets of points. |
- class pose_format.torch.representation.angle.AngleRepresentation(*args, **kwargs)[source]
Bases:
ModuleClass to compute the angle between the X/Y axis and the line segments formed by two sets of points.
Methods:
forward(p1s, p2s)Computes angle in radians between X/Y axis and line segments made by two sets of points.
Attributes:
- forward(p1s, p2s)[source]
Computes angle in radians between X/Y axis and line segments made by two sets of points.
- Parameters:
p1s (
MaskedTensor) – A tensor representing the first set of points with shape (Points, Batch, Len, Dims).p2s (
MaskedTensor) – A tensor representing the second set of points with the same shape asp1s.
- Returns:
A tensor of angles (in radians) with shape (Points, Batch, Len).
- Return type:
torch.Tensor
Note
The slope is determined for each pair of points. The arctangent function is then applied to calculate the angle in radians.
- training: bool