Augmentations¶
- class myoverse.datasets.filters.emg_augmentations.GaussianNoise(target_snr__db=5.0, input_is_chunked=None, is_output=False)[source]¶
Bases:
EMGAugmentation
Adds Gaussian noise to the input EMG data. This augmentation is based on the paper [1]
- Parameters:
- __call__(chunk: numpy.ndarray) numpy.ndarray ¶
Augments the chunk.
Notes
- class myoverse.datasets.filters.emg_augmentations.MagnitudeWarping(nr_of_point_for_spline=6, gaussian_mean=1.0, gaussian_std=0.35, nr_of_grids=None, input_is_chunked=None, is_output=False)[source]¶
Bases:
EMGAugmentation
Magnitude warping augmentation. This augmentation is based on the paper [2]
- Parameters:
nr_of_point_for_spline (int, optional) – The number of points to use for the spline, by default 6.
gaussian_mean (float, optional) – The mean of the Gaussian distribution, by default 1.0.
gaussian_std (float, optional) – The standard deviation of the Gaussian distribution, by default 0.35.
nr_of_grids (int, optional) – The number of grids to use, by default 5.
input_is_chunked (bool) – Whether the input is chunked or not.
is_output (bool) – Whether the filter is an output filter. If True, the resulting signal will be outputted by and dataset pipeline.
- __call__(chunk: numpy.ndarray) numpy.ndarray ¶
Augments the chunk.
Notes
[2] Tsinganos, P., Cornelis, B., Cornelis, J., Jansen, B., Skodras, A., 2020. Data Augmentation of Surface Electromyography for Hand Gesture Recognition. Sensors 20, 4892. https://doi.org/10/grc7ph
- class myoverse.datasets.filters.emg_augmentations.WaveletDecomposition(b=0.25, wavelet='db7', level=5, nr_of_grids=None, input_is_chunked=None, is_output=False)[source]¶
Bases:
EMGAugmentation
Wavelet decomposition augmentation. This augmentation is based on the paper [3]
- Parameters:
b (float, optional) – The scaling factor, by default 0.25.
wavelet (str, optional) – The wavelet to use, by default “db7”.
level (int, optional) – The level of decomposition, by default 5.
nr_of_grids (int, optional) – The number of grids to use, by default 5.
input_is_chunked (bool) – Whether the input is chunked or not.
is_output (bool) – Whether the filter is an output filter. If True, the resulting signal will be outputted by and dataset pipeline.
- __call__(chunk: numpy.ndarray) numpy.ndarray ¶
Augments the chunk.
Notes
[3] Tsinganos, P., Cornelis, B., Cornelis, J., Jansen, B., Skodras, A., 2020. Data Augmentation of Surface Electromyography for Hand Gesture Recognition. Sensors 20, 4892. https://doi.org/10/grc7ph