Skip to content

Commit

Permalink
add colab demo
Browse files Browse the repository at this point in the history
  • Loading branch information
weihaox committed Apr 16, 2024
1 parent 911c8f8 commit b5a34f4
Show file tree
Hide file tree
Showing 5 changed files with 1,336 additions and 4 deletions.
7 changes: 5 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,8 @@
<p>UMBRAE decodes multimodal explanations from brain signals. (1) We introduce a <b>universal brain encoder</b> for multimodal-brain alignment and recover conceptual and spatial details by using multimodal large language models. (2) We introduce <b>cross-subject training</b> to overcome unique brain patterns of different individuals. This allows brain signals from multiple subjects to be trained within the same model This allows brain signals from multiple subjects to be trained within the same model. (3) Our method supports <b>weakly-supervised subject adaptation</b>, enabling the training of a model for a new subject in a data-efficient manner. (4) For evaluation, we introduce <b>BrainHub</b>, a brain understanding benchmark, based on NSD and COCO.

## News :triangular_flag_on_post:
- [2024/04/16] Provide a [Colab](https://colab.research.google.com/drive/1VKd1gAB-6AIdMzBCG0J-U7h9vwsiKnHp) Demo for inference.
- [2024/04/13] Update scripts for single-subject, cross-subject training, and new subject adaptation.
- [2024/04/12] Inference and pretrained model available. Training code coming up soon.
- [2024/04/11] <a href="https://github.com/weihaox/BrainHub">BrainHub</a> is available.
- [2024/03/15] Both <a href="https://weihaox.github.io/UMBRAE">project</a> and <a href="https://arxiv.org/pdf/2404.07202">arXiv</a> are available.
Expand Down Expand Up @@ -145,11 +147,12 @@ do
done
```

We also provide baseline results associated with BrainHub, including the captioning results from [SDRecon](https://github.com/yu-takagi/StableDiffusionReconstruction), [BrainCap](https://arxiv.org/abs/2305.11560), and [OneLLM](https://onellm.csuhan.com/), as well as the captioning and grounding results from [UMBRAE](https://weihaox.github.io/UMBRAE/).
We also provide baseline results associated with [BrainHub](https://github.com/weihaox/BrainHub/tree/main/caption/comparison), including the captioning results from [SDRecon](https://github.com/yu-takagi/StableDiffusionReconstruction), [BrainCap](https://arxiv.org/abs/2305.11560), and [OneLLM](https://onellm.csuhan.com/), as well as the captioning and grounding results from [UMBRAE](https://weihaox.github.io/UMBRAE/).

## TODO
- [x] Release inference scripts and pretrained checkpoints.
- [x] Update training scripts
- [x] Update training scripts.
- [x] Provide online demo.
- [ ] Train on all 8 subjects in NSD.
- [ ] Support other MLLMs such as NExT-Chat, CogVLM, Genixer

Expand Down
2 changes: 1 addition & 1 deletion umbrae/download_checkpoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,4 @@
# @Desc : download Checkpoints from Hugging Face
# ------------------------------------------------------------------

python -c 'from huggingface_hub import snapshot_download; snapshot_download(repo_id="weihaox/brainx", repo_type="dataset", local_dir="./", , ignore_patterns=["all_images.pt", ".gitattributes"])'
python -c 'from huggingface_hub import snapshot_download; snapshot_download(repo_id="weihaox/brainx", repo_type="dataset", local_dir="./", ignore_patterns=["all_images.pt", ".gitattributes"])'
21 changes: 21 additions & 0 deletions umbrae/environment.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
name: brainx
channels:
- pytorch
- nvidia
- conda-forge
- fvcore
- iopath
- bottler
- defaults
dependencies:
- python=3.8
- pytorch-cuda=11.6
- pytorch=1.13.0
- nvidiacub
- torchvision
- fvcore
- iopath
- pyembree
- cupy
- cython
- pip
Loading

0 comments on commit b5a34f4

Please sign in to comment.