oaa

OAA Code

High-Quality Reconstruction of fMRI Visual Stimuli Using an Optimized Autoencoder Architecture

Code Repository: GitHub - braindecoding/supl
Code Page: Page - braindecoding/oaa
Supplementary Files Repository: GitHub - braindecoding/supl
Supplementary Files Page: Page - braindecoding/supl

FID calculation must be done separately because it utilizes multi-threading, so it cannot be combined into a single file.

Van Gerven Dataset

To run tests using the Van Gerven dataset, execute:

runvg.sh

This script will run the Python scripts dgmmvangerven.py and fidvg.py.

Miyawaki Dataset

Miyawaki dataset generated by slr code repository.
To perform reconstruction on the Miyawaki dataset, execute:

runmy.sh

This script will run the Python scripts dgmmmiyawaki.py and fid.py.

Installation using uv VirtualEnv

uv python install 3.8
uv venv --python 3.8
source .venv/bin/activate
uv pip install -r requirements.txt

Run on Multiple GPUS

If your server has multiple GPUs, you can specify which GPU to use by setting the environment variable CUDA_VISIBLE_DEVICES.
To do this, edit line 11 in your script:

os.environ["CUDA_VISIBLE_DEVICES"] = "3"  # Change to "2" to use GPU2, or "0" for GPU0

This ensures that only the specified GPU will be visible to TensorFlow.