📢 June 3, 2026: FlexiCT ranked 2nd on the CVPR 2026 Foundation Models for General CT Image Diagnosis Challenge.
- Codabench leaderboard under name
ricklisz
📢 June 1, 2026: The FlexiCT pretraining code is now released on the
pretraining branch.
FlexiCT is a CT foundation model family trained through agglomerative continual pretraining, progressing from 2D slice-level anatomy to 3D volumetric reasoning and report-aligned vision-language understanding.
The released model family includes FlexiCT-2D, FlexiCT-3D, and
FlexiCT-3D-VLM. The models were trained on 266,227 CT volumes from 56 public
datasets and evaluated across segmentation, registration, classification,
clinical retrieval, and vision-language tasks.
| Notebook | What it shows |
|---|---|
inference_demo.ipynb |
Minimal inference for FlexiCT-2D, FlexiCT-3D, and FlexiCT-3D-VLM, including synthetic smoke inputs and optional user CT paths. |
visualization.ipynb |
Feature visualization, PCA maps, and similarity maps using the sample CT assets in assets/. |
Launch either notebook from the repository root:
jupyter lab inference_demo.ipynb
jupyter lab visualization.ipynbDownload the checkpoint you need and pass its local path explicitly or through the environment variables documented below.
| Model | Model size | PyTorch checkpoint |
|---|---|---|
FlexiCT-2D |
144M parameters | Download |
FlexiCT-3D |
144M parameters | Download |
FlexiCT-3D-VLM |
741M parameters | Download |
Use Python 3.11 and run commands from the repository root.
conda create -n flexict python=3.11 -y
conda activate flexict
cd /path/to/FlexiCT
python -m pip install --upgrade pip
python -m pip install -r requirements.txtPass a checkpoint path when constructing a model:
from flexi_ct import Flexi_CT_3D
model = Flexi_CT_3D(checkpoint_path="/path/to/ct_3d_teacher.pth")You can also set environment variables once per shell session:
export FLEXICT_2D_CHECKPOINT=/path/to/ct_2d_teacher.pth
export FLEXICT_3D_CHECKPOINT=/path/to/ct_3d_teacher.pth
export FLEXICT_VLM_CHECKPOINT=/path/to/ct_3d_vlm.pthFlexi_CT_VLM uses the Qwen3 embedding text tower, so its tokenizer and config
files are loaded from Hugging Face unless already cached. For offline or shared
systems, point HF_HOME to the cache location:
export HF_HOME=/path/to/huggingface_cacheAfter installation, run a quick import check:
python -c "import torch; from flexi_ct import Flexi_CT_2D, Flexi_CT_3D, Flexi_CT_VLM; print(torch.cuda.is_available(), 'OK')"Constructing a model loads the selected checkpoint.
Downstream examples are provided under downstream/ for
segmentation, registration, retrieval, classification, and VLM evaluation.
For segmentation experiments, see
downstream/segmentation/README.md for the
nnU-Net setup and dataset directory conventions.
For retrieval reproduction commands, see
downstream/retrieval/README.md.
Please cite the arXiv preprint:
@article{li2026universal,
title={Universal CT Representations from Anatomy to Disease Phenotype through Agglomerative Pretraining},
author={Li, Yuheng and Gao, Yuan and Dong, Haoyu and Lai, Yuxiang and Wang, Shansong and Safari, Mojtaba and Baciak, James E and Yang, Xiaofeng},
journal={arXiv preprint arXiv:2605.21906},
year={2026}
}Code in this repository is released under the MIT License.
The released checkpoints are made available under the Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International License. The pretrained weights may also be subject to the licenses and usage terms of the original datasets used for training. Users intending to use FlexiCT in commercial settings should verify dataset and model licensing and obtain any required permissions.
FlexiCT is provided for research use. It is not a medical device and is not a substitute for professional medical judgment.
