mindgrab / README.md
spikedoanz's picture
added backref to mindgrab paper
c5b4ed5
---
language:
- en
tags:
- image-segmentation
- medical-imaging
- brain-mri
- tinygrad
- skull-stripping
license: mit
pipeline_tag: image-segmentation
---
# MindGrab (BrainChop MeshNet)
MindGrab is a MeshNet-based skull-stripping model from the
[BrainChop](https://github.com/neuroneural/brainchop) project. It takes 256^3
conformed T1 volumes and produces a binary brain mask. The checkpoint runs
entirely in [tinygrad](https://github.com/tinygrad/tinygrad) and powers the
in-browser BrainChop demos (WebGPU/WebGL).
## Reference
If you use MindGrab in academic work, please cite the Hugging Face Papers entry
[2506.11860](https://huggingface.co/papers/2506.11860), which documents this
release and its evaluation context.
## Files
| File | Description |
|------ |-------------|
| `model.json` | MeshNet architecture definition (in/out channels, kernel sizes, bias, dropout flags). |
| `layers.json` | Optional Layer configs |
| `model.pth` | FP32 PyTorch checkpoint |
Optionally, you can also run the model through the official frontend at
[brainchop.org](https://brainchop.org/) under the name "🪓🧠 omnimodal Skull
Stripping"
## Usage
```sh
uv pip install hf brainchop
```
```python
from pathlib import Path
from huggingface_hub import hf_hub_download
from brainchop import load, save, api
model_dir = Path(hf_hub_download("neuroneural/mindgrab", "model.json")).parent
hf_hub_download(repo_id, "model.pth")
vol = load("t1_crop.nii.gz")
mask = api.segment(vol, str(model_dir))
save(mask, "mindgrab_mask.nii.gz")
```