FlipUD#
- class deeptrack.optical.augmentations.FlipUD(p: float | Callable[[...], float] = 0.5, augment: bool | Callable[[...], bool] | None = None, **kwargs)#
Bases:
AugmentationFlip images up-down.
If the input is a ScatteredVolume or ScatteredField, the underlying array is flipped along the height axis and any “position” metadata is updated accordingly.
Parameters#
- p: PropertyLike[float], optional
Probability of performing the flip. Defaults to 0.5.
- augment: PropertyLike[bool] | None
Boolean controlling whether the augmentation is applied. If None, the augmentation is performed with probability p.
Methods#
- _get_xp(image, xp, augment, **kwargs) -> np.ndarray | torch.Tensor
Abstract method which performs the FlipUD augmentation.
- _update_properties(…) -> ScatteredVolume | ScatteredField
Abstract method to update the properties of the scattered volume or field.
Examples#
>>> import deeptrack as dt
>>> particle = dt.PointParticle(intensity=1) >>> optics = dt.Fluorescence() >>> image = optics(particle) >> dt.FlipUD(p=1.0) >>> image.plot();