Update (2025.01): Please check our RMLR (code) for additional SPD implementations.
This is the official code for our CVPR 2024 publication: Riemannian Multinomial Logistics Regression for SPD Neural Networks.
If you find this project helpful, please consider citing us as follows:
@inproceedings{chen2024spdmlr,
title={Riemannian Multinomial Logistics Regression for {SPD} Neural Networks},
author={Ziheng Chen and Yue Song and Gaowen Liu and Ramana Rao Kompella and Xiaojun Wu and Nicu Sebe},
booktitle={Conference on Computer Vision and Pattern Recognition 2024},
year={2024}
}
And also our ICLR24 paper on Riemannian normalization over Lie groups:
@inproceedings{chen2024liebn,
title={A Lie Group Approach to Riemannian Batch Normalization},
author={Ziheng Chen and Yue Song and Yunmei Liu and Nicu Sebe},
booktitle={The Twelfth International Conference on Learning Representations},
year={2024},
url={https://openreview.net/forum?id=okYdj8Ysru}
}
In case you have any problem, do not hesitate to contact me [email protected].
Install necessary dependencies by conda
:
conda env create --file environment.yaml
Note that the hydra package is used to manage configuration files.
The implementation is based on the official code of
- Riemannian batch normalization for SPD neural networks [Neurips 2019] [code].
- SPD domain-specific batch normalization to crack interpretable unsupervised domain adaptation in EEG [Neurips 2022] [code].
The synthetic Radar dataset is released by SPDNetBN. We further release our preprocessed HDM05 dataset.
The Hinss2021 dataset is publicly available. The moabb and mne packages are used to download and preprocess these datasets. There is no need to manually download and preprocess the datasets. This is done automatically.
Please download the datasets and put them in your personal folder.
If necessary, change the path
accordingly in
conf/SPDNet/dataset/HDM05.yaml
, conf/SPDNet/dataset/RADAR.yaml
, and data_dir
in conf/TSMNet/TSMNetMLR.yaml
.
To run experiments on the SPDNet, run this command:
bash exp_spdnets.sh
To run experiments on the TSMNet, run this command:
bash exp_eeg.sh
These scripts contain the experiments shown in Tabs. 3-5.
Note: You also can change the data_dir
in exp_eeg.sh
or xx_path
in exp_spdnets.sh
, which will override the hydra config.
To reproduce Fig. 1, please run Hyperplane/SPD_hyperplane_3D.m