Giter Club home page Giter Club logo

mind-vis's Introduction

Seeing Beyond the Brain: Masked Modeling Conditioned Diffusion Model for Human Vision Decoding

News

  • May 23, 2023. Our work are featured by The Telegraph!
  • May 20, 2023. Our extension work, video reconstruction from brain activity, are released. See this repo
  • Mar. 28, 2023. Our work are covered by NBC News! Youtube | Website
  • Mar. 1, 2023. Our paper is accpeted at CVPR2023!
  • Nov. 10, 2022. Project release.

MinD-Vis

MinD-Vis is a framework for decoding human visual stimuli from brain recording. This document introduces the precesedures required for replicating the results in Seeing Beyond the Brain: Masked Modeling Conditioned Diffusion Model for Human Vision Decoding

Abstract

Decoding visual stimuli from brain recordings aims to deepen our understanding of the human visual system and build a solid foundation for bridging human and computer vision through the Brain-Computer Interface. However, due to the scarcity of data annotations and the complexity of underlying brain information, it is challenging to decode images with faithful details and meaningful semantics. In this work, we present MinD-Vis: Sparse Masked Brain Modeling with Double-Conditioned Latent Diffusion Model for Human Vision Decoding. Specifically, by boosting the information capacity of feature representations learned from a large-scale resting-state fMRI dataset, we show that our MinD-Vis can reconstruct highly plausible images with semantically matching details from brain recordings with very few paired annotations. We benchmarked our model qualitatively and quantitatively; the experimental results indicate that our method outperformed state-of-the-art in both semantic mapping (100-way semantic classification) and generation quality (FID) by 66% and 41% respectively.

Overview

flowchar-img Our framework consists of two main stages:

  • Stage A: Sparse-Coded Masked Brain Modeling (SC-MBM)
  • Stage B: Double-Conditioned Latent Diffusion Model (DC-LDM)

The data folder and pretrains folder are not included in this repository. Please download them from FigShare and put them in the root directory of this repository as shown below.

File path | Description


/data
โ”ฃ ๐Ÿ“‚ HCP
โ”ƒ   โ”ฃ ๐Ÿ“‚ npz
โ”ƒ   โ”ƒ   โ”ฃ ๐Ÿ“‚ dummy_sub_01
โ”ƒ   โ”ƒ   โ”ƒ   โ”— HCP_visual_voxel.npz
โ”ƒ   โ”ƒ   โ”ฃ ๐Ÿ“‚ dummy_sub_02
โ”ƒ   โ”ƒ   โ”ƒ   โ”— ...

โ”ฃ ๐Ÿ“‚ Kamitani
โ”ƒ   โ”ฃ ๐Ÿ“‚ npz
โ”ƒ   โ”ƒ   โ”— ๐Ÿ“œ sbj_1.npz
โ”ƒ   โ”ƒ   โ”— ๐Ÿ“œ sbj_2.npz
โ”ƒ   โ”ƒ   โ”— ๐Ÿ“œ sbj_3.npz
โ”ƒ   โ”ƒ   โ”— ๐Ÿ“œ sbj_4.npz
โ”ƒ   โ”ƒ   โ”— ๐Ÿ“œ sbj_5.npz
โ”ƒ   โ”ƒ   โ”— ๐Ÿ“œ images_256.npz
โ”ƒ   โ”ƒ   โ”— ๐Ÿ“œ imagenet_class_index.json
โ”ƒ   โ”ƒ   โ”— ๐Ÿ“œ imagenet_training_label.csv
โ”ƒ   โ”ƒ   โ”— ๐Ÿ“œ imagenet_testing_label.csv

โ”ฃ ๐Ÿ“‚ BOLD5000
โ”ƒ   โ”ฃ ๐Ÿ“‚ BOLD5000_GLMsingle_ROI_betas
โ”ƒ   โ”ƒ   โ”ฃ ๐Ÿ“‚ py
โ”ƒ   โ”ƒ   โ”ƒ   โ”— CSI1_GLMbetas-TYPED-FITHRF-GLMDENOISE-RR_allses_LHEarlyVis.npy
โ”ƒ   โ”ƒ   โ”ƒ   โ”— ...
โ”ƒ   โ”ƒ   โ”ƒ   โ”— CSIx_GLMbetas-TYPED-FITHRF-GLMDENOISE-RR_allses_xx.npy
โ”ƒ   โ”ฃ ๐Ÿ“‚ BOLD5000_Stimuli
โ”ƒ   โ”ƒ   โ”ฃ ๐Ÿ“‚ Image_Labels
โ”ƒ   โ”ƒ   โ”ฃ ๐Ÿ“‚ Scene_Stimuli
โ”ƒ   โ”ƒ   โ”ฃ ๐Ÿ“‚ Stimuli_Presentation_Lists


/pretrains
โ”ฃ ๐Ÿ“‚ ldm
โ”ƒ   โ”ฃ ๐Ÿ“‚ label2img  ๏ผˆImageNet pre-trained label-conditioned LDM)
โ”ƒ   โ”ƒ   โ”— ๐Ÿ“œ config.yaml
โ”ƒ   โ”ƒ   โ”— ๐Ÿ“œ model.ckpt

โ”ฃ ๐Ÿ“‚ GOD  
โ”ƒ   โ”— ๐Ÿ“œ fmri_encoder.pth  (SC-MBM pre-trained fMRI encoder)
โ”ƒ   โ”— ๐Ÿ“œ finetuned.pth     (finetuned fMRI encoder + finetuned LDM)

โ”ฃ ๐Ÿ“‚ BOLD5000
โ”ƒ   โ”— ๐Ÿ“œ fmri_encoder.pth  (SC-MBM pre-trained fMRI encoder)
โ”ƒ   โ”— ๐Ÿ“œ finetuned.pth     (finetuned fMRI encoder + finetuned LDM)


/code
โ”ฃ ๐Ÿ“‚ sc_mbm
โ”ƒ   โ”— ๐Ÿ“œ mae_for_fmri.py
โ”ƒ   โ”— ๐Ÿ“œ trainer.py
โ”ƒ   โ”— ๐Ÿ“œ utils.py

โ”ฃ ๐Ÿ“‚ dc_ldm
โ”ƒ   โ”— ๐Ÿ“œ ldm_for_fmri.py
โ”ƒ   โ”— ๐Ÿ“œ utils.py
โ”ƒ   โ”ฃ ๐Ÿ“‚ models
โ”ƒ   โ”ƒ   โ”— (adopted from LDM)
โ”ƒ   โ”ฃ ๐Ÿ“‚ modules
โ”ƒ   โ”ƒ   โ”— (adopted from LDM)

โ”—  ๐Ÿ“œ stageA1_mbm_pretrain.py   (main script for pre-training for SC-MBM)
โ”—  ๐Ÿ“œ stageA2_mbm_finetune.py   (main script for tuning SC-MBM on fMRI only from test sets)
โ”—  ๐Ÿ“œ stageB_ldm_finetune.py    (main script for fine-tuning DC-LDM)
โ”—  ๐Ÿ“œ gen_eval.py               (main script for generating decoded images)

โ”—  ๐Ÿ“œ dataset.py                (functions for loading datasets)
โ”—  ๐Ÿ“œ eval_metrics.py           (functions for evaluation metrics)
โ”—  ๐Ÿ“œ config.py                 (configurations for the main scripts)

Environment setup

Create and activate conda environment named mind-vis from our env.yaml

conda env create -f env.yaml
conda activate mind-vis

Download data and checkpoints

Due to size limit and license issue, the full fMRI pre-training dataset (required to replicate Stage A) needs to be downloaded from the Human Connectome Projects (HCP) offical website. The pre-processing scripts are also included in this repo.

We also provide checkpoints and finetuning data at FigShare to run the finetuing and decoding directly. Due to the size limit, we only release the checkpoints for Subject 3 and CSI1 in the GOD and BOLD5000 respectively. Checkpoints for other subjects are also available upon request. After downloading, extract the data/ and pretrains/ to the project directory.

SC-MBM Pre-training on fMRI (Stage A)

mbm-fig The fMRI pre-training is performed with masked brain modeling in the fMRI dataset containing around 136,000 fMRI samples from 1205 subjects (HCP + GOD). To perform the pre-training from scratch with defaults parameters, run

python code/stageA1_mbm_pretrain.py

Hyper-parameters can be changed with command line arguments,

python code/stageA1_mbm_pretrain.py --mask_ratio 0.65 --num_epoch 800 --batch_size 200

Or the parameters can also be changed in code/config.py

Multiple-GPU (DDP) training is supported, run with

python -m torch.distributed.launch --nproc_per_node=NUM_GPUS code/stageA1_mbm_pretrain.py

The pre-training results will be saved locally at results/fmri_pretrain and remotely at wandb.

After pre-training on the large-scale fMRI dataset, we need to finetune the autoencoder with fMRI data from the testing set. Run the following,

python code/stageA2_mbm_finetune.py --dataset GOD --pretrain_mbm_path results/fmri_pretrain/RUN_FOLDER_NAME/checkpoints/checkpoint.pth

--dataset can be either GOD or BOLD5000. And RUN_FOLDER_NAME is the folder name generated for the pre-training. For example

python code/stageA2_mbm_finetune.py --dataset GOD --pretrain_mbm_path results/fmri_pretrain/01-08-2022-11:37:22/checkpoints/checkpoint.pth

The fMRI finetuning results will be saved locally at results/fmri_finetune and remotely at wandb.

Finetune the Double-Conditional LDM with Pre-trained fMRI Encoder (Stage B)

In this stage, the cross-attention heads and pre-trained fMRI encoder will be jointly optimized with fMRI-image pairs. Decoded images will be generated in this stage. This stage can be run without downloading HCP. Only finetuning datasets and pre-trained fMRI encoder shared in our FigShare link are required. Run this stage with our provided pre-trained fMRI encoder and default parameters:

python code/stageB_ldm_finetune.py --dataset GOD

--dataset can be either GOD or BOLD5000. The results and generated samples will be saved locally at results/generation and remotely at wandb.

Run with custom-pre-trained fMRI encoder and parameters:

python code/stageB_ldm_finetune.py --dataset GOD --pretrain_mbm_path results/fmri_fintune/RUN_FOLDER_NAME/checkpoints/checkpoint.pth --num_epoch 500 --batch_size 5

Run fMRI Decoding and Generate Images with Trained Checkpoints

Only finetuning datasets and trained checkpoints in our FigShare link are required. Notice that images generated by the provided checkpoins gives the same evaluation reuslts as in the paper, but may not produce the exact same images as in the paper due to sampling variance. Run this stage with our provided checkpoints:

python code/gen_eval.py --dataset GOD

--dataset can be either GOD or BOLD5000. The results and generated samples will be saved locally at results/eval and remotely at wandb.

bold5000

Acknowledgement

We thank Kamitani Lab, Weizmann Vision Lab and BOLD5000 team for making their raw and pre-processed data public. Our Masked Brain Modeling implementation is based on the Masked Autoencoders by Facebook Research. Our Conditional Latent Diffusion Model implementation is based on the Latent Diffusion Model implementation from CompVis. We thank these authors for making their codes and checkpoints publicly available!

Citation

@InProceedings{Chen_2023_CVPR,
    author    = {Chen, Zijiao and Qing, Jiaxin and Xiang, Tiange and Yue, Wan Lin and Zhou, Juan Helen},
    title     = {Seeing Beyond the Brain: Masked Modeling Conditioned Diffusion Model for Human Vision Decoding},
    booktitle = {Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR)},
    year      = {2023}
}

mind-vis's People

Contributors

jqin4749 avatar patrick-finley avatar zjc062 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

mind-vis's Issues

Pretraining on resting-state data

Is it reasonable to pretrain a vision decoder from rest-state data when subjects viewing only a cross? What if we pretrain on task data with more vision activities?

How can I get the "HCP_visual_voxel.npz" for pre-training๏ผŸ

Hi

I'm reproducing this very interesting project. However, I don't know how to get the HCP dataset with the "HCP_visual_voxel.npz" to implement stageA1_mbm_pretrain.py. In fact, I was able to download the fMRI data in โ€œnii.gzโ€ format of the HCP 1200 dataset containing 1113 subjects. But I can't extract the ROI of the visual cortex from the nii file in 4-D and save it as HCP_visual_voxel.npz for each subject.

Can you provide more detailed implementation steps about HCP_visual_voxel.npz๏ผŸ

Thanks

Save half training?

Hii there, I am trying to run the model on Google colab but after 200 epoch in A1 stage, GPU gets disconnected and the entire training of 200 epoch get lost.
Can any one tell me how to train 200 epochs and save model and next day, start with 201 epoch to finish my training for 500 epoch.

One question for the Sparse-Coded

Congratulations that your impressive work has been published on CVPR2023.

Your paper supplementary file wrote: "Data locality is included in the representations by dividing the fMRI time series into patches and transforming patches into embeddings." But both Bold5000 and GOD datasets don't have the time series. Your work seems to be more likely dividing voxels into different patches.

This question really troubles me, could you explain it to me which can help me have a better understanding of this?

Pre-trained model

Hey there!! I loved your work, amazing.

I'm trying to use this model to reconstruct images from a different fMRI data that I have but I have a time restriction so to do all the pre-training from scratch will result in a lot of time loss for me. I was wondering if you can share the corresponding files with me so that I can continue with the pre-trained model and skip the stage A. That would be crazy helpful.

Thank you

Use of Test Set for Fine-Tuning

Hello authers

I was going through the codebase and noticed that in the main function, the test set is used for fine-tuning the model. I think this could introduce data leakage and lead to overly optimistic performance evaluations, right? Below is the section of code I'm referring to:

# create dataset and dataloader
if config.dataset == "GOD":
    _, test_set = create_Kamitani_dataset(
        ...
    )
elif config.dataset == "BOLD5000":
    _, test_set = create_BOLD5000_dataset(
        ...
    )
else:
    raise NotImplementedError

# ... later in the code
print("Finetuning MAE on test fMRI ... ...")
for ep in range(config.num_epoch):
    ...
    cor = train_one_epoch(
        model, dataloader_hcp, optimizer, device, ep, loss_scaler, logger, config, start_time, model_without_ddp
    )

https://github.com/zjc062/mind-vis/blob/main/code/stageA2_mbm_finetune.py#L125

Question about experimental result

Hi, thanks for the cool paper.

I try to reproduce your result through finetuning ldm of StageB by myself. I directly use your code and fmri_encoder checkpoint without any modifications.
When I compare the performance between the model you provide (finetune.pth) and the model finetuned by myself, there is a gap in both the generated image results and the numerical metrics. For example, the "summary/top-1-class(max)" of your checkpoint is 0.226 while my checkpoint is only 0.1916.
I wonder if you could kindly provide any insights on what may have caused this discrepancy.

Thanks for your time!

Bugs when running 'StageB_ldm_finetune.py'

Thank you for your excellent work. Could you please help me with questions below?
It is weird that when I first ran this file it worked well. However, when I repeated my operation, it threws out error info like:
Traceback (most recent call last):
File "code/stageB_ldm_finetune.py", line 245, in
main(config)
File "code/stageB_ldm_finetune.py", line 163, in main
generative_model.finetune(trainer, fmri_latents_dataset_train, fmri_latents_dataset_test,
File "/public1/home/ungradu/home/gra02/lyh_test/mind-vis/mind-vis-main/code/dc_ldm/ldm_for_fmri.py", line 103, in finetune
trainers.fit(self.model, dataloader, val_dataloaders=test_loader)
File "/public1/home/ungradu/home/gra02/anaconda3/envs/mind-vis/lib/python3.8/site-packages/pytorch_lightning/trainer/trainer.py", line 770, in fit
self._call_and_handle_interrupt(
File "/public1/home/ungradu/home/gra02/anaconda3/envs/mind-vis/lib/python3.8/site-packages/pytorch_lightning/trainer/trainer.py", line 721, in _call_and_handle_interrupt
return self.strategy.launcher.launch(trainer_fn, *args, trainer=self, **kwargs)
File "/public1/home/ungradu/home/gra02/anaconda3/envs/mind-vis/lib/python3.8/site-packages/pytorch_lightning/strategies/launchers/spawn.py", line 78, in launch
mp.spawn(
File "/public1/home/ungradu/home/gra02/anaconda3/envs/mind-vis/lib/python3.8/site-packages/torch/multiprocessing/spawn.py", line 240, in spawn
return start_processes(fn, args, nprocs, join, daemon, start_method='spawn')
File "/public1/home/ungradu/home/gra02/anaconda3/envs/mind-vis/lib/python3.8/site-packages/torch/multiprocessing/spawn.py", line 189, in start_processes
process.start()
File "/public1/home/ungradu/home/gra02/anaconda3/envs/mind-vis/lib/python3.8/multiprocessing/process.py", line 121, in start
self._popen = self._Popen(self)
File "/public1/home/ungradu/home/gra02/anaconda3/envs/mind-vis/lib/python3.8/multiprocessing/context.py", line 284, in _Popen
return Popen(process_obj)
File "/public1/home/ungradu/home/gra02/anaconda3/envs/mind-vis/lib/python3.8/multiprocessing/popen_spawn_posix.py", line 32, in init
super().init(process_obj)
File "/public1/home/ungradu/home/gra02/anaconda3/envs/mind-vis/lib/python3.8/multiprocessing/popen_fork.py", line 19, in init
self._launch(process_obj)
File "/public1/home/ungradu/home/gra02/anaconda3/envs/mind-vis/lib/python3.8/multiprocessing/popen_spawn_posix.py", line 47, in _launch
reduction.dump(process_obj, fp)
File "/public1/home/ungradu/home/gra02/anaconda3/envs/mind-vis/lib/python3.8/multiprocessing/reduction.py", line 60, in dump
ForkingPickler(file, protocol).dump(obj)
AttributeError: Can't pickle local object 'TorchHistory.add_log_parameters_hook..'

p.s.
before the error info there is also a userwarning about wandb, but I guess it is not the cause of this problem.

finetuning on test set?

In stageA2_mbm_finetune.py, I found finetuning seemed to happen on test set. Am I mistaken?

_, test_set = create_Kamitani_dataset(path=config.kam_path, patch_size=config_pretrain.patch_size,

dataloader_hcp = DataLoader(test_set, batch_size=config.batch_size, sampler=sampler)

cor = train_one_epoch(model, dataloader_hcp, optimizer, device, ep, loss_scaler, logger, config, start_time, model_without_ddp)

A Question about Low Correlations in the "stageA2_mbm_finetune" Execution on the GOD Dataset

Thanks for all your efforts!

When running "stageA2_mbm_finetune" with the GOD dataset, the obtained correlations are very small (approximately 0.02). When I execute "stageA2_mbm_finetune" using the following command, the correlations obtained on the GOD test dataset are extremely low, as shown in the figure below, reaching a maximum of only around 0.02. Is this a normal result?

python code/stageA2_mbm_finetune.py --dataset GOD --pretrain_mbm_path results/pretrains/GOD/fmri_encoder.pth

image

Weights and biases for SC-MBM

Greetings,

First of all I am really fascinated by the work Your team has done. Thank you!
I am excited to run and test your code, but unfortunately I do not have the resources to train the SC-MBM part in a reasonable amount of time.
Is it possible for You to share the weights and biases that You've acquired during Your training? I would appreciate it a lot.

Regards, Alexander.

Preprocessing scripts to generate the Kamitani .npz files from FigShare

Hi, thanks for the very cool paper!

I'm trying to reproduce your results, and I noticed that your FigShare link stores the Kamitani dataset as /data/.../.npz files, which differs from the format that the original GOD repository uses (.h5 files in their FigShare). How did you perform the conversion from their .h5 files to your .npz files? Is the code available?

Thanks!

Visualize the stimuli

Congratulations! Thank you for your nice work!
Can you tell me how to visualize the stimuli like Figure 2 in the main paper of MinD-Vis?
Thank you for your nice work so much

[not issue, only questions] Is this tech "one neural nets for all" or one neural nets for capita?

This is only questions.
I'm not professional on deep learning. I didnt read the paper.
I have 2 questions.
1, is this technologe "one neural nets for all" or one neural nets for capita?
If this is a one for all tech, it means, if I buy some gear to read my brain no matter it's an inplant(like Neuralink) or helmet(a lot prototypes we can find on youtube), all I need to do is download this neural nets. Then everything is good to go.
If this is a per capita tech, it means, I have to train a neural nets for my self, and I have to fine tune it periodically. If I change to another gear, I probably need to do all the jobs again.

2, have you test this with some artists who work on photo-realistic digital painting?
I've trained on this area for like 2,3 years. I believe this hard training change the way my brain handle vision stimuli a lot. General people can't handle the rotation in vision, this is because our brain prefer to handle tokens to shapes. Tokens don't have directions, or even precise length or ratio. You can find some training tool in my github which helps with such trainings, I had a hard time training on these, really hard.

Let me provide a suggestion. You can test with some basic geometry shapes. This could probably provide the idea how brain deal with simple images, and basic elements. Shape, count, color, texture, ratio, relative pos.

Training correlations when applied MBM model to another dataset

HI! I really appreciate your work and plan to follow it in our area. By the way, may I ask a question about the training correlations calculated by torch.corrcoef?

I have applied the MBM model to another dataset and made several changes. However, I have recently found that the model may not perform well under the correlation metric. Could you please tell me the training correlations in your settings, and what is your opinion on this phenomenon?
image

The attached image shows the models that we have trained recently, with the red and grey lines representing the models.

Encountered problem while running Stage B

Thank you for your contribution to the project. We encountered the following issue while running the code: in code/eval_metrics.py, line 119, in n_way_top_k_acc, acc = accuracy(pred_picked.unsqueeze(0), torch.tensor([0], device=pred.device), top_k=top_k) TypeError: accuracy() missing 1 required positional argument: 'task'. Could you please advise on how to fix this?

Does the amount of training data in MBM_pretrain_stage matter a lot?

Hi! Thank you for your EXCELLENT job! It really helps a lot!
I have a quesiont about SC_MBM. I see you've used a very large dataset and got very good results. However training on such a large dataset is not realistic for me. So I am wondering if I only use 6360 fMRI samples provided in your project, can I get acceptable results, like 80% of yours?
I'll really appreciate it if you answer my questions. Thanks a log!
Have a nice day!

Because my English writing is not so good, I will translate into Chinese to avoid misunderstanding:
ไฝœ่€…ๆ‚จๅฅฝ๏ผŒ้žๅธธๆ„Ÿ่ฐขๆ‚จๅฆ‚ๆญคๅ‡บ่‰ฒ็š„ๅทฅไฝœ๏ผๆˆ‘ๆœ‰ไธ€ไธชๅ…ณไบŽSC_MBM็š„้—ฎ้ข˜ๆƒณ่ฏทๆ•™ใ€‚
ๆˆ‘็œ‹ๅˆฐไฝ ไปฌๅœจไธ€ไธช็›ธๅฝ“ๅบžๅคง็š„ๆ•ฐๆฎ้›†ไธŠ่ฟ›่กŒไบ†SC_MBM็š„pretrain๏ผŒไฝ†ๆ˜ฏๅฆ‚ๆญคๅบžๅคง็š„ๆ•ฐๆฎ้‡ๅฏนไบŽๆˆ‘ๆฅ่ฏดๆ˜ฏไธๅฏ่ƒฝๅฎŒๆˆ่ฎญ็ปƒ็š„ใ€‚ๆ‰€ไปฅๆˆ‘ๆƒณ่ฏท้—ฎๅฆ‚ๆžœๆˆ‘ๅชไฝฟ็”จๅทฅ็จ‹ๅ†…ๆไพ›็š„6360ไธชfMRIๆ•ฐๆฎ๏ผŒๅฏไปฅๅพ—ๅˆฐๅฏๆŽฅๅ—็š„็ป“ๆžœๅ—๏ผŒไพ‹ๅฆ‚ๆ‚จ็›ฎๅ‰็ป“ๆžœ็š„80%๏ผŸ
ๆœŸๅพ…ๆ‚จ็š„ๅ›žๅค๏ผŒๅๅˆ†ๆ„Ÿ่ฐข๏ผ
็ฅๅฅฝ๏ผ

How to get the HCP_visual_voxel.npz file?

Hi,

We are currently replicating your work, but encountered some issues.
How to get files indicating visual cortex area information in the HCP dataset, like the "HCP_visual_voxel.npz" file in your code dataset.py. Did you regenerate the parcellation using software like Freesurfer, or something else?

Thanks for your reply !

Questions about the design of the experimental task

After reading the paper, my understanding is that the pre-training task in this paper is designed to predict the signal at the same time point of the region that is masked out from the BOLD signal of the neighboring region. My question is why not design the task to recover the signal at the masked time point from the signal in the same region before and after the time point๏ผŸBecause of the high spatial correlation of the BOLD signal, recovering the signal at the same time point based on neighboring regions seems to be a relatively easy task.

The link is inaccessible

The file you shared on FigShare has turned into a private link, making the data and model inaccessible, can you please check this?

Elaboration on Sampler code

I noticed that there are two files with the code for sampling. (DDIM.py and PLMS.py). Can you explain the code a bit more or give me a reference so that I can understand the code better?

Understanding the code and architecture

Hello!

I am trying to visualize the architecture of mind-vis down to the layer for better understanding but I have trouble finding a description of the architecture.
In the paper it is written that the encoder depth is 24. Does it mean that it has 24 layers? If so where can I look up the input and output size for each layer?
Do you have any general recommendations on comprehending the exact architecture of mind-vis?

With regards, Alexander.

Does the amount of training data in MBM_pretrain_stage matter a lot?

Hi! Thank you for your EXCELLENT job! It really helps a lot!
I have a quesiont about SC_MBM. I see you've used a very large dataset and got very good results. However training on such a large dataset is not realistic for me. So I am wondering if I only use 6360 fMRI samples provided in your project, can I get acceptable results, like 80% of yours?
I'll really appreciate it if you answer my questions. Thanks a log!
Have a nice day!

Because my English writing is not so good, I will translate into Chinese to avoid misunderstanding:
ไฝœ่€…ๆ‚จๅฅฝ๏ผŒ้žๅธธๆ„Ÿ่ฐขๆ‚จๅฆ‚ๆญคๅ‡บ่‰ฒ็š„ๅทฅไฝœ๏ผๆˆ‘ๆœ‰ไธ€ไธชๅ…ณไบŽSC_MBM็š„้—ฎ้ข˜ๆƒณ่ฏทๆ•™ใ€‚
ๆˆ‘็œ‹ๅˆฐไฝ ไปฌๅœจไธ€ไธช็›ธๅฝ“ๅบžๅคง็š„ๆ•ฐๆฎ้›†ไธŠ่ฟ›่กŒไบ†SC_MBM็š„pretrain๏ผŒไฝ†ๆ˜ฏๅฆ‚ๆญคๅบžๅคง็š„ๆ•ฐๆฎ้‡ๅฏนไบŽๆˆ‘ๆฅ่ฏดๆ˜ฏไธๅฏ่ƒฝๅฎŒๆˆ่ฎญ็ปƒ็š„ใ€‚ๆ‰€ไปฅๆˆ‘ๆƒณ่ฏท้—ฎๅฆ‚ๆžœๆˆ‘ๅชไฝฟ็”จๅทฅ็จ‹ๅ†…ๆไพ›็š„6360ไธชfMRIๆ•ฐๆฎ๏ผŒๅฏไปฅๅพ—ๅˆฐๅฏๆŽฅๅ—็š„็ป“ๆžœๅ—๏ผŒไพ‹ๅฆ‚ๆ‚จ็›ฎๅ‰็ป“ๆžœ็š„80%๏ผŸ
ๆœŸๅพ…ๆ‚จ็š„ๅ›žๅค๏ผŒๅๅˆ†ๆ„Ÿ่ฐข๏ผ
็ฅๅฅฝ๏ผ

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.