TimeReverse

Targets:
image
mask
bboxes
keypoints
volume
mask3d
Image Types:uint8, float32

Reverse time axis of a spectrogram (time inversion). Alias for HorizontalFlip; for audio. Used in AudioCLIP; p controls probability.

Time inversion of a spectrogram is analogous to the random flip of an image, an augmentation technique widely used in the visual domain. This can be relevant in the context of audio classification tasks when working with spectrograms. The technique was successfully applied in the AudioCLIP paper, which extended CLIP to handle image, text, and audio inputs.

This transform is implemented as a subclass of HorizontalFlip since reversing time in a spectrogram is equivalent to flipping the image horizontally.

Arguments
p
float
0.5

probability of applying the transform. Default: 0.5.

Notes

This transform is functionally identical to HorizontalFlip but provides a more semantically meaningful name when working with spectrograms and other time-series visualizations.