This repository provides the framework and scripts for processing, training, and evaluating models related to the VR Cybersickness EEG dataset. The codebase is designed to handle different input modalities, train neural networks, and evaluate performance for classification or regression tasks.
- Modular Design: Supports various input types (e.g., kinematic, power-spectral-difference).
- Flexible Task Selection: Allows for both classification and regression tasks.
- Customizable Training: Integrated with options for early stopping, learning rate scheduling, and performance logging.
- Reproducibility: Seed setting ensures reproducible results across experiments.
The repository is built with Python and requires the following dependencies:
torch
(PyTorch)torchvision
numpy
argparse
torchutils
(for training utilities)
Install the required dependencies using:
pip install -r requirements.txt
Clone the repository and navigate to the project directory:
git clone https://github.com/eth-siplab/VR_Cybersickness_EEG_Dataset-Beyond_Subjectivity
cd VR_Cybersickness_EEG_Dataset-Beyond_Subjectivity
The main entry point is the main.py
script, which can be executed with the following options:
python main.py --patient <PATIENT_ID> \
--seed <SEED_VALUE> \
--task <TASK_TYPE> \
[--wandb] \
[--input-type <INPUT_TYPE>] \
[--logprefix <LOG_DIRECTORY>] \
[--output] \
[--no-cuda] \
[--no-save-model] \
[--no-load-model]
--patient
: Patient ID (required).--seed
: Random seed for reproducibility (required).--num-epochs
: Number of training epochs (default: 200).--batch-size
: Batch size for training (default: 8).--task
: Task type (classification
orregression
) (required).--wandb
: Enable Weights & Biases logging (optional).--input-type
: Input data type (default:multi-segment
).- Options:
kinematic
,power-spectral-difference
,power-spectral-no-eeg
,power-spectral-no-kinematic
.
- Options:
--logprefix
: Prefix for log and checkpoint files.--output
: Enable output logging to console.--no-cuda
: Use CPU instead of GPU.--no-save-model
: Skip saving the model checkpoint.--no-load-model
: Skip loading pre-trained model checkpoints.
python main.py --patient 0012 --seed 42 --task classification --input-type kinematic --logprefix ./logs --output
Handles loading of training, validation, and test datasets. Supports multiple data types and formats.
Defines the architecture and configurations for training neural networks based on the selected task and input type.
Integrates model training, validation, and testing workflows. Includes:
- Early Stopping: Monitors validation loss to prevent overfitting.
- Average Score Logger: Tracks performance metrics during training.
Utility to ensure reproducibility by setting seeds for Python, NumPy, and PyTorch.
Logs are written to both console and files (if --logprefix
is specified). Log files include model checkpoints and detailed training/validation/testing performance.
This project is licensed under the MIT License.
This repository is part of ongoing research at ETH SIPLab. Special thanks to the contributors and developers of torchutils
and related libraries.