class documentation
class TransposeSymmetricKeypoints(A.DualTransform):
Constructor: TransposeSymmetricKeypoints(keypoint_pairs, p)
Transpose images and symmetric keypoints.
| Method | __init__ |
Transpose an image and symmetric keypoints. |
| Method | apply |
Transpose an image. |
| Method | apply |
Transpose bounding boxes. |
| Method | apply |
Transpose keypoints and swap symmetric pairs. |
| Method | apply |
Transpose a segmentation mask. |
| Method | get |
Get parameters dependent on the targets. |
| Instance Variable | keypoint |
Pairs of keypoint indices swapped after transposition. |
| Instance Variable | n |
Number of unique keypoints described by keypoint_pairs. |
| Property | targets |
Undocumented |
Transpose an image and symmetric keypoints.
Equivalent to 90 degree rotation followed by horizontal flip.
| Parameters | |
keypointlist[ | Pairs of keypoint indices to swap after the transpose. |
p:float | Probability of applying the augmentation. |
Transpose an image.
| Parameters | |
img:np.ndarray | Image to transpose. |
| **params | Additional transform parameters. |
| Returns | |
np.ndarray | Transposed image. |
Transpose bounding boxes.
| Parameters | |
bboxes:np.ndarray | Bounding boxes to transpose. |
| **params | Additional transform parameters. |
| Returns | |
np.ndarray | Transposed bounding boxes. |
Transpose keypoints and swap symmetric pairs.
| Parameters | |
keypoints:np.ndarray | Keypoints to transpose. |
| **params | Additional transform parameters. |
| Returns | |
np.ndarray | Transposed keypoints. |
| Raises | |
ValueError | If the total number of keypoints is not a multiple of n_keypoints. |
Transpose a segmentation mask.
| Parameters | |
mask:np.ndarray | Segmentation mask to transpose. |
| **params | Additional transform parameters. |
| Returns | |
np.ndarray | Transposed segmentation mask. |
@override
def get_params_dependent_on_data(self, params: dict[ str, Any], data: dict[ str, Any]) -> dict[ str, Any]:
¶
Get parameters dependent on the targets.
| Parameters | |
params:dict[ | Existing augmentation parameters. |
data:dict[ | Input data. |
| Returns | |
dict[ | Parameters derived from the input targets. |