FlipDiagonal#
- class deeptrack.augmentations.FlipDiagonal(p: float | Callable[[...], float] = 0.5, augment: bool | Callable[[...], bool] | None = None, **kwargs)#
Bases:
AugmentationFlips images along the main diagonal.
Updates all properties called “position” by swapping the first and second index.
Parameters#
- p: float
Probability of flipping the image, leaving as default (0.5) is sufficient most of the time.
- augment: bool
Whether to perform the augmentation.
Methods#
- get(image: Image | np.ndarray, augment: PropertyLike[bool], **kwargs) -> Image
Abstract method which performs the FlipDiagonal augmentation.
- update_properties(image: Image | np.ndarray, augment: PropertyLike[bool], **kwargs) -> None
Abstract method to update the properties of the image.
Methods Summary
get(image, augment, **kwargs)Abstract method which performs the FlipDiagonal augmentation.
update_properties(image, augment, **kwargs)Abstract method to update the properties of the image.
Methods Documentation