Audio MixUp & Friends

Apply MixUp, CutMix, and combination of both to audio waveforms before converting to Spectrogram or MelSpectrogram

source

AudioMixHandler

 AudioMixHandler (alpha:float=0.5, interp_label:bool|None=None)

Mixup base for TensorAudio

Type Default Details
alpha float 0.5 Alpha & beta parametrization for Beta distribution
interp_label bool | None None Blend or stack labels. Defaults to loss_func.y_int if None

source

AudioMixUp

 AudioMixUp (alpha=0.5, stack_y=True)

Implementation of https://arxiv.org/abs/1710.09412 for TensorAudio


source

AudioCutMix

 AudioCutMix (alpha:float=1.0, uniform:bool=True, p:float=1.0,
              interp_label:bool|None=None)

Implementation of https://arxiv.org/abs/1710.09412 for TensorAudio

Type Default Details
alpha float 1.0 Alpha & beta parametrization for Beta distribution
uniform bool True Uniform patches across batch. True matches fastai CutMix
p float 1.0 Per Image probablily of applying CutMix if uniform is False
interp_label bool | None None Blend or stack labels. Defaults to loss’ y_int if None

source

AudioCutMixUp

 AudioCutMixUp (mix_alpha=0.4, cut_alpha=1.0, stack_y=True, cut_ratio=1,
                mix_ratio=1)

Implementation of Mixup or CutMix for TensorAudio


source

AudioCutMixUpAugment

 AudioCutMixUpAugment (mix_alpha=0.4, cut_alpha=1.0, stack_y=True,
                       aug_ratio=1, cut_ratio=1, mix_ratio=1,
                       augs_only=None, wave_augs=False)

Implementation of Mixup, CutMix, or Augment for TensorAudio