Shortcuts

torcheeg.datasets

Emotion Recognition Datasets

DEAPDataset

A multimodal dataset for the analysis of human affective states.

DREAMERDataset

A multi-modal database consisting of electroencephalogram and electrocardiogram signals recorded during affect elicitation by means of audio-visual stimuli.

SEEDDataset

The SJTU Emotion EEG Dataset (SEED), is a collection of EEG datasets provided by the BCMI laboratory, which is led by Prof.

SEEDFeatureDataset

The SJTU Emotion EEG Dataset (SEED), is a collection of EEG datasets provided by the BCMI laboratory, which is led by Prof.

SEEDIVDataset

The SEED-IV dataset provided by the BCMI laboratory, which is led by Prof.

SEEDIVFeatureDataset

The SEED-IV dataset provided by the BCMI laboratory, which is led by Prof.

AMIGOSDataset

A dataset for Multimodal research of affect, personality traits and mood on Individuals and GrOupS (AMIGOS).

MAHNOBDataset

MAHNOB-HCI is a multimodal database recorded in response to affective stimuli with the goal of emotion recognition and implicit tagging research.

BCI2022Dataset

The 2022 EMOTION_BCI competition aims at tackling the cross-subject emotion recognition challenge and provides participants with a batch of EEG data from 80 participants with known emotional state information.

MPEDFeatureDataset

The Multi-Modal Physiological Emotion Database for Discrete Emotion (MPED), a multi-modal physiological emotion database, which collects four modal physiological signals, i.e., electroencephalogram (EEG), galvanic skin response, respiration, and electrocardiogram (ECG).

Personal Identification Datasets

M3CVDataset

A reliable EEG-based biometric system should be able to withstand changes in an individual's mental state (cross-task test) and still be able to successfully identify an individual after several days (cross-session test).

Mother of all BCI Benchmarks

moabb.MOABBDataset

Mother of all BCI Benchmarks (MoABB) aims at building a comprehensive benchmark of popular Brain-Computer Interface (BCI) algorithms applied on an extensive list of freely available EEG datasets.

Steady-state Visual Evoked Potential Datasets

TSUBenckmarkDataset

The benchmark dataset for SSVEP-Based brain-computer interfaces (TSUBenckmark) is provided by the Tsinghua BCI Lab.

Customized Datasets

FolderDataset

Read EEG samples and their corresponding labels from a fixed folder structure.

CSVFolderDataset

Read meta information from CSV file and read EEG data from folder according to the meta information.

Hooks

torcheeg.datasets.before_trial_normalize(data: ndarray, eps: float = 1e-06, axis=0)[source][source]

A common hook function used to normalize the signal of the whole trial before dividing it into chunks.

It is used as follows:

from functools import partial
dataset = DEAPDataset(
        ...
        before_trial=before_trial_normalize,
        num_worker=4)

If you want to pass in parameters, use partial to generate a new function:

from functools import partial
dataset = DEAPDataset(
        ...
        before_trial=partial(before_trial_normalize, eps=1e-5),
        num_worker=4)
Parameters:
  • data (np.ndarray) – The input EEG signals or features of a trial.

  • eps (float) – The term added to the denominator to improve numerical stability (default: 1e-6)

Returns:

The normalized results of a trial.

Return type:

np.ndarray

torcheeg.datasets.after_trial_normalize(data: ndarray, eps: float = 1e-06)[source][source]

A common hook function used to normalize the signal of the whole trial after dividing it into chunks and transforming the divided chunks.

It is used as follows:

from functools import partial
dataset = DEAPDataset(
        ...
        after_trial=after_trial_normalize,
        num_worker=4)

If you want to pass in parameters, use partial to generate a new function:

from functools import partial
dataset = DEAPDataset(
        ...
        after_trial=partial(after_trial_normalize, eps=1e-5),
        num_worker=4)
Parameters:
  • data (np.ndarray) – The input EEG signals or features of a trial.

  • eps (float) – The term added to the denominator to improve numerical stability (default: 1e-6)

Returns:

The normalized results of a trial.

Return type:

np.ndarray

torcheeg.datasets.after_trial_moving_avg(data: list, window_size: int = 4)[source][source]

A common hook function for smoothing the signal of each chunk in a trial after pre-processing.

It is used as follows:

from functools import partial
dataset = DEAPDataset(
        ...
        after_trial=after_trial_moving_avg,
        num_worker=4)

If you want to pass in parameters, use partial to generate a new function:

from functools import partial
dataset = DEAPDataset(
        ...
        after_trial=partial(after_trial_moving_avg, eps=1e-5),
        num_worker=4)
Parameters:
  • data (np.ndarray) – A list of dictionaries, one of which corresponds to an EEG signal in trial. Each dictionary consists of two key-value paris, eeg and key. The value of eeg is the representation of the EEG signal and the value of key is its ID in the IO.

  • window_size (int) – The window size of moving average. (default: 4)

Returns:

The smoothing results of a trial. It is a list of dictionaries, one of which corresponds to an EEG signal in trial. Each dictionary consists of two key-value paris, eeg and key. The value of eeg is the representation of the EEG signal and the value of key is its ID in the IO.

Return type:

list

Read the Docs v: v1.1.0
Versions
latest
stable
v1.1.0
v1.0.11
v1.0.10
v1.0.9
v1.0.8.post1
v1.0.8
v1.0.7
v1.0.6
v1.0.4
v1.0.3
v1.0.2
v1.0.1
Downloads
On Read the Docs
Project Home
Builds

Free document hosting provided by Read the Docs.

Docs

Access comprehensive developer documentation for PyTorch

View Docs

Tutorials

Get in-depth tutorials for beginners and advanced developers

View Tutorials

Resources

Find development resources and get your questions answered

View Resources