Skip to content
/ KnIFE Public

The repository contains the implementation of "Domain Generalization for Zero-calibration BCIs with Knowledge Distillation-based Phase Invariant Feature Extraction", which is currently under review.

License

Notifications You must be signed in to change notification settings

ZilinL/KnIFE

Repository files navigation

KnIFE:Knowledge Distillation-based Phase Invariant Feature Extraction

Introduction

The repository contains the implementation of "Domain Generalization for Zero-calibration BCIs with Knowledge Distillation-based Phase Invariant Feature Extraction".

This is a demo of the proposed Knife.

alg/algs/Knife.py contains the core code of the proposed method, which includes the realization of knowledge distillation framework, Correlation alignment, and spectrum transfer. The graphical abstract is shown below:

GA

Environments

    Python: 3.7.11
    PyTorch: 1.10.0
    Torchvision: 0.11.1
    CUDA: 10.2
    CUDNN: 7605
    NumPy: 1.21.2
    PIL: 6.2.1
pip install -r requirements.txt

Run the code

python train_OpenBMI.py

A demo to run Knife on OpenBMI dataset.

Datasets

  1. BCI competition IV-2a
  2. BCI competition IV-2b
  3. OpenBMI

Please request data from the above link.

An example dataset used for train_OpenBMI.py: OpenBMI_GoogleDrive

Put the downloaded OpenBMI data into the data/OpenBMI/filterdMat/.

Note: This dataset is for demo purposes only. For further use of the data, please request for authorization from the original source.

Acknowledge

Great thanks to deepDG. We extend our method based on this toolkit and have compared and validated our method on it.

To be continued...

About

The repository contains the implementation of "Domain Generalization for Zero-calibration BCIs with Knowledge Distillation-based Phase Invariant Feature Extraction", which is currently under review.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages