CRISP / README.md
FTZhou's picture
Update README.md
7202426 verified
---
license: mit
---
**CRISP** (Clinical-grade Robust Intraoperative Support for Pathology) is a universal foundation model designed for intraoperative frozen section analysis. Developed on over 100,000 frozen sections from eight medical centers, CRISP provides robust and generalizable diagnostic support across a wide range of tumor types, anatomical sites, and clinical scenarios.
[![arXiv](https://img.shields.io/badge/arXiv-Paper-b31b1b)](https://arxiv.org/abs/2510.04861) [![GitHub](https://img.shields.io/badge/GitHub-Code-181717?logo=github)](https://github.com/FT-ZHOU-ZZZ/CRISP) [![Cite](https://img.shields.io/badge/Cite-Our%20Work-blue)](#reference)
## Quick Start
CRISP require following dependencies:
- Python >= 3.13.5
- PyTorch >= 2.8.0
- timm >= 1.0.16
- torchvision >= 0.22.1
- peft >= 0.15.2
- numpy >= 2.2.6
- pillow >= 11.3.0
Then, the generalizable features for intraoperative pathology can be extracted as follows:
```python
import numpy as np
from PIL import Image
from crisp import get_trans, get_model
# build model and transforms
device = torch.device("cuda" if torch.cuda.is_available() else "cpu")
ckpt_path = "CRISP.pth" # please download the model weights first
trans = get_trans()
model = get_model(device, ckpt_path)
# dummy input
img = Image.fromarray((np.random.rand(224, 224, 3) * 255).astype(np.uint8))
img = img.convert("RGB")
# feature extraction
img = trans(img).unsqueeze(0).to(device)
print('input image shape:', img.shape)
feature = model(img)
print('output feature shape:', feature.shape)
```
```shell
>>> input image shape: torch.Size([1, 3, 224, 224])
>>> output feature shape: torch.Size([1, 2560])
```
## <a id="reference"></a> Citation
```
@article{zhao2025clinical,
title={A Clinical-grade Universal Foundation Model for Intraoperative Pathology},
author={Zhao, Zihan and Zhou, Fengtao and Li, Ronggang and Chu, Bing and Zhang, Xinke and Zheng, Xueyi and Zheng, Ke and Wen, Xiaobo and Ma, Jiabo and Wang, Yihui and others},
journal={arXiv preprint arXiv:2510.04861},
year={2025}
}