xkoo115 commited on
Commit
7dedc96
·
verified ·
1 Parent(s): c962002

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +45 -1
README.md CHANGED
@@ -69,4 +69,48 @@ git clone [https://github.com/xkoo115/UnifiedNeuroGen](https://github.com/xkoo11
69
  cd UnifiedNeuroGen
70
 
71
  # Install the required packages
72
- pip install -r requirements.txt
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
69
  cd UnifiedNeuroGen
70
 
71
  # Install the required packages
72
+ pip install -r requirements.txt
73
+
74
+ ### Step 2: Download the Model
75
+
76
+ You can download the model checkpoint file from this repository's "Files" tab, or programmatically using huggingface_hub:
77
+
78
+ ```bash
79
+ from huggingface_hub import hf_hub_download
80
+
81
+ model_path = hf_hub_download(
82
+ repo_id="xkoo115/unifiedneurogen-eeg2fmri-nat-view-within-subject-demo",
83
+ filename="unifiedneurogen-eeg2fmri-nat-view-within-subject-demo.pt",
84
+ local_dir="./checkpoints" # Download to a local 'checkpoints' folder
85
+ )
86
+ print(f"Model downloaded to: {model_path}")
87
+
88
+ ### Step 3: Run Inference
89
+
90
+ Use the sample.py script from the cloned repository to generate fMRI data from EEG inputs. You will need a test set of EEG encodings. You can find sample data in the UnifiedNeuroGen-Demo-Dataset repository.
91
+
92
+ ```bash
93
+ python sample.py \
94
+ --model DiT_fMRI \
95
+ --ckpt ./checkpoints/unifiedneurogen-eeg2fmri-nat-view-within-subject-demo.pt \
96
+ --eeg-path /path/to/your/test/eeg/encodings \
97
+ --save-path /path/to/save/generated/data
98
+
99
+ --ckpt: The path to the model checkpoint you downloaded in Step 2.
100
+
101
+ --eeg-path: The path to the input EEG data you wish to translate.
102
+
103
+ --save-path: The directory where the generated fMRI data will be saved.
104
+
105
+ 📜 Citation
106
+ If you use this model or the UnifiedNeuroGen framework in your research, please cite the original paper:
107
+ ```bash
108
+ @misc{yao2025empoweringfunctionalneuroimagingpretrained,
109
+ title={Empowering Functional Neuroimaging: A Pre-trained Generative Framework for Unified Representation of Neural Signals},
110
+ author={Weiheng Yao and Xuhang Chen and Shuqiang Wang},
111
+ year={2025},
112
+ eprint={2506.02433},
113
+ archivePrefix={arXiv},
114
+ primaryClass={cs.CV},
115
+ url={[https://arxiv.org/abs/2506.02433](https://arxiv.org/abs/2506.02433)},
116
+ }