NeuroCBIR: A Fast and Accurate Image Retrieval System for Whole-Brain and Region-Specific MRI
Abstract
Content-based image retrieval (CBIR) in neuroimaging enables the identification of structurally similar brain scans, supporting diagnosis, prognosis, and treatment planning; however, existing methods are often limited to small datasets, single brain regions, or coarse class labels, thereby restricting their clinical utility and generalizability. Here, we present NeuroCBIR, a framework for fast and flexible retrieval of both whole-brain and region-specific 3D T1w MRI scans. A total of 103 cortical and subcortical regions are extracted to enable both whole-brain and region-level queries. NeuroCBIR leverages latent representations learned by a variational autoencoder (VAE) combined with contrastive learning, producing scan-specific embeddings that capture anatomical patterns. These embeddings were evaluated for subject re-identification, zero-shot age prediction, and zero-shot multi-class pathology stratification. Re-identification performance was high across both whole-brain and brain-region levels (mean average precision across the top-5 retrieved images (mAP@5) >= 98.4%), with robust generalization across datasets and acquisition conditions. While NeuroCBIR is not trained for age prediction or pathology stratification, zero-shot evaluations for these two tasks demonstrate that the embeddings encode meaningful information for downstream tasks. Embedding extraction on a 4-core CPU required approximately 18.7 s per scan, whereas similarity search was effectively instantaneous (less than 0.01 s). NeuroCBIR is publicly available for brain MRI with more than 26,000 precomputed T1w MRI embeddings. It supports reproducible research, region-specific flexibility, and clinically meaningful personalized diagnostic support. The software is available at https://github.com/minnelab/NeuroCBIR.
Figures & tables
| Reference | Dataset / Task | Method | Evaluation | Performance |
| Huang et al. (2012) | 2D T1w MRI (glioma, meningioma, pituitary) | Bag-of-visual-words + metric learning | Compared tumor types Hit = retrieved same tumor class. | Prec@10 mAP |
| Onga et al. (2019) | 3D T1w MRI ADNI2 AD / EMCI / LMCI / SMCI / CN | CAE + metric learning | Clustering and classification across diagnostic groups | Compression = 4096:1 Acc |
| Deepak and Ameer (2020) | 2D T1 MRI Figshare (brain tumor dataset) | GoogLeNet CNN + Siamese network | Retrieval Hit = retrieved same tumor class | Compression = :1 Prec@10 mAP@10 |
| Nishimaki et al. (2022) | 3D T1w MRI ADNI2 (AD vs. CN) | Localized -VAE | Classification across diagnostic groups | Compression = 4096:1 AUC |
| Puglisi et al. (2024) | 2D T1w MRI ADNI | DeepBrainPrint | Retrieval Hit = scans from same subject | mAP@3 |
| Muraki et al. (2024) | 3D T1w MRI ADNI (AD vs. CN) | Isometric VAE | Classification across diagnostic groups | Compression = 512:1 Acc |
| Dataset | Age | Class | Field strength | Manufacturer | |||||||||
| CN | MCI | AD | 1.5T | 3T | SH | GE | PH | ||||||
| ADNI | 75 ± 7 | ||||||||||||
| OASIS3 | 71 ± 9 | ||||||||||||
| AIBL | 74 ± 7 | ||||||||||||
| MIRIAD | 70 ± 7 | ||||||||||||
| SLIM | 21 ± 1 | ||||||||||||
| mAP@5 | |||||||
| Metric | All | Train | Val | Test | ADNI | OASIS3 | AIBL | MIRIAD | SLIM 1 |
| mAP@5 ( ) | - | ||||||||
| mS@1 ( ) | |||||||||
| mS@5 ( ) | - | ||||||||
| ( ) |
| Metric | Structure | All | Train | Val | Test | ADNI | OASIS3 | AIBL | MIRIAD | SLIM 1 |
| mAP@5 ( ) | Left-Hippocampus | - | ||||||||
| Left-Thalamus | - | |||||||||
| Left-Amygdala | - | |||||||||
| Left-Lateral-Ventricle | - | |||||||||
| mS@1 ( ) | Left-Hippocampus | |||||||||
| Left-Thalamus |
| Comparison | p -value | ssd | Cliff’s | Magnitude |
| Test vs. Train | negligible | |||
| CN vs. MCI | negligible | |||
| CN vs. AD | negligible | |||
| MCI vs. AD | negligible | |||
| ADNI vs. AIBL | negligible | |||
| ADNI vs. MIRIAD | negligible |
| Method | Comp. | mAP@5 | mS@5 | ||
| ResNet-10 | :1 | 512 | |||
| ResNet-50 | :1 | 2048 | |||
| ResNet-101 | :1 | 2048 | |||
| CNN-AD | :1 | 256 | |||
| VoComni-L | :1 | 1536 | |||
| BrainIAC | :1 | 768 |
| Step | RAM (MB) | Time (s) | ||
| baseline | peak | 1 core | 4 cores | |
| Whole-brain | ||||
| Load Q2E | ||||
| Run Q2E | ||||
| Top 5 retrieval | - | - | <0.01 | <0.01 |
| Brain-regions | ||||
| Region | MAE | Slope | |
| Whole-brain | |||
| Random baseline | 5.2 ± 3.5 | 0.00 | 0.00 |
| ResNet-10 | 4.5 ± 3.5 | 0.46 | 0.32 |
| ResNet-50 | 4.8 ± 3.6 | 0.35 | 0.16 |
| ResNet-101 | 5.0 ± 3.6 | 0.27 | 0.13 |
| CNN-AD | 5.8 ± 4.0 | 0.00 | 0.00 |
| Method | CN/MCI/AD | CN/AD | ||
| BAcc | MF1 | BAcc | MF1 | |
| Whole-brain | ||||
| Random baseline | 33.3 | 33.3 | 50.0 | 50.0 |
| ResNet-10 | 49.8 | 48.1 | 69.5 | 59.9 |
| ResNet-50 | 50.2 | 48.0 | 67.8 | 60.2 |
| ResNet-101 | 47.4 | 44.7 | 65.0 | 56.4 |
Appendix figures & tables1 asset
Supplementary material from the paper’s appendix.
Appendix
| Structure | mAP@5 | mS@1 | mS@5 | Structure | mAP@5 | mS@1 | mS@5 |
| Right-Cerebral-White-Matter | 99.6 | 99.4 | 100.0 | Left-Cerebellum-White-Matter | 98.3 | 96.8 | 99.9 |
| Left-Cerebral-White-Matter | 99.5 | 99.4 | 99.9 | ctx-lh-lateralorbitofrontal | 98.2 | 98.3 | 99.6 |
| Right-Cerebellum-Cortex | 99.5 | 98.6 | 99.9 | ctx-lh-pericalcarine | 98.2 | 97.8 | 99.4 |
| ctx-lh-superiortemporal | 99.5 | 99.3 | 99.9 | ctx-rh-parstriangularis | 98.1 | 98.0 | 99.6 |
| ctx-rh-fusiform | 99.5 | 99.0 | 99.9 | ctx-lh-bankssts | 98.1 | 99.0 | 99.6 |
| ctx-lh-fusiform | 99.5 | 98.8 | 99.9 | ctx-rh-bankssts | 98.0 | 99.2 | 99.7 |