das.augmentation¶
Waveform level augmentations.
Individual implementations of Augmentation are callables that accept
the signal to augment as an argument and return the augmented signal.
Augmentation parameters can be Constant, or random with Normal or Uniform distribution.
Random parameters will be sampled from a given distribution anew for each augmentation.
aug = Gain(gain=Normal(mean=1, std=0.5)); augmented_signal = aug(signal)
Can be configured using a yaml file: ```yaml Gain: # Name of the augmentation class
- gain: # arg for the augmentation class
- Uniform: # Param type
lower: 0.5 # param args upper: 2 # param args
- MaskNoise:
- std:
- Normal:
mean: 0 std: 0.05
- mean:
- Constant:
value: 0
- NotchFilter:
- freq: # Param-type arg
- Uniform:
lower: 100 upper: 600
Q: 30 # standard arg samplerate_Hz: 10_000 # standard arg
``` Caution: You need to add a suffix starting with ‘-’ (like “MaskNoise-1”) to the class name
if you want to use a class multiple times
augs = Augmentations.from_yaml(filename)
Classes
|
Base class for all augmentations. |
|
Bundles several augmentations. |
|
Circularly shift input along the first axis. |
|
Constant parameter. |
|
Multiply signal with gain factor. |
|
Horizontally flip signal. |
|
Replaces stretch of |
|
Add noise or replace signal by noise for the full duration or a part of it. |
|
Normally distributed parameter. |
|
Multiply signal with gain factor. |
|
Multiply signal with gain factor. |
|
Multiply signal with gain factor. |
|
Notch filter. |
|
Add horizontal offset. |
|
Base class for all parameters. |
|
Uniformly distributed parameter. |
|
Upsample signal. |