Instructions to use Deepnoid/GLINT-CT with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use Deepnoid/GLINT-CT with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("feature-extraction", model="Deepnoid/GLINT-CT", trust_remote_code=True)# pip install -U transformers accelerate # Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("Deepnoid/GLINT-CT", trust_remote_code=True, device_map="auto") - Notebooks
- Google Colab
- Kaggle
GLINT-CT
📝 Paper • 💻 Code • 🌐 Project page • 🤗 GLINT-CXR
GLINT-CT is the chest CT model of GLINT (GLINT: Sparsely Gated Vision-Language Alignment for Fine-Grained Radiology Representations, NeurIPS 2026).
- Vision encoder: V-JEPA 2.1 ViT-L/16, 384×384, 80 frames / 240 slices
- Text encoder:
sentence-transformers/all-mpnet-base-v2(fine-tuned) - Alignment: linear projection (1024→768) + LayerNorm, mean-pooled text + LayerNorm, SGA similarity head
- Training: CT-RATE, with Sparsely Gated Alignment (SGA) and Dense Feature Regularization (DFR) from a frozen V-JEPA 2.1 ViT-G teacher
⚠️ GLINT is released for research purposes only and is not intended for clinical use, including the diagnosis or treatment of any medical condition.
Usage
Both examples use the bundled inference.py / utils.py; run them from the downloaded repo.
Full pipeline
hf download Deepnoid/GLINT-CT --local-dir glint-ct && cd glint-ct
python inference.py --volume volume.nii.gz --text "There is a lung nodule."
# prints the sentence probability and the 18 CT-RATE findings,
# saves similarity_map.nii.gz and ct_preprocessed.nii.gz
Both files share one affine, so the map overlays the CT in ITK-SNAP / 3D Slicer.
AutoModel
import torch
from transformers import AutoModel, AutoTokenizer
from utils import load_ct_volume, model_inference, save_similarity_map, similarity_scores_to_volume # bundled helpers
repo = "Deepnoid/GLINT-CT"
device = "cuda" if torch.cuda.is_available() else "cpu"
model = AutoModel.from_pretrained(repo, trust_remote_code=True, dtype=torch.float32).to(device).eval()
tokenizer = AutoTokenizer.from_pretrained(repo)
pixel_values, affine = load_ct_volume("volume.nii.gz", return_affine=True) # [1, 80, 3, 384, 384]
prob, scores = model_inference(pixel_values, "There is a lung nodule.", model=model, tokenizer=tokenizer)
volume = similarity_scores_to_volume(scores, model) # (240, 384, 384)
save_similarity_map(volume, affine, "similarity_map.nii.gz", pixel_values, "ct_preprocessed.nii.gz")
- Outputs:
probis the sentence probability (sigmoid);scoresis the per-token similarity in [0, 1] (40 × 24 × 24 tokens). - Inputs:
utils.load_ct_volumeapplies the training preprocessing (IPL, HU [-1000, 1000] → [-1, 1], 1.5 × 0.75 × 0.75 mm, crop/pad to 240×480×480, resize to 240×384×384) and returns[1, 80, 3, 384, 384]. - Unreliable NIfTI affine: pass
raw_spacing=(sx, sy, sz)toload_ct_volume(--raw_spacingin the script). - Underlying call:
model.compute_logits(pixel_values, [encoded_text])returnslogitsandsimilarity_scores.
Vision encoder only (vision_only=True):
import torch
from transformers import AutoModel
from utils import load_ct_volume # bundled helper
repo = "Deepnoid/GLINT-CT"
vision = AutoModel.from_pretrained(repo, trust_remote_code=True, vision_only=True, dtype=torch.float32).eval()
pixel_values = load_ct_volume("volume.nii.gz") # [1, 80, 3, 384, 384]
with torch.no_grad():
out = vision(pixel_values)
print(out.last_hidden_state.shape) # (1, 23040, 1024)
Requirements
transformers==4.56.1, torch, entmax, monai, nibabel.
⚠️ Keep
transformers==4.56.1, the version the bundled code was validated with.
Notes
- Training and fine-tuning code: GitHub; split ID lists:
data/. dfr.pyand its projector weights are used only in training; the V-JEPA 2.1 ViT-G teacher is not included.vision_only=Truestill downloads the full checkpoint;save_pretrainedon the loaded model keeps a vision-only copy.
Acknowledgments
This work was supported by the Technology Innovation Program (RS-2025-02221011, Development of Medical-Specialized Multimodal Hyperscale Generative AI Technology for Global Integration) funded by the Ministry of Trade, Industry & Energy (MOTIE, South Korea), and by the Advanced GPU Utilization Support Program funded by the Korean government (Ministry of Science and ICT) (Project No. 02-26-91-0330).
License
- Weights and code: CC BY-NC 4.0.
- Vision encoder: fine-tuned from V-JEPA 2.1 ViT-L (© Meta Platforms, Inc., MIT);
vjepa21_encoder.pyadapts facebookresearch/vjepa2 (MIT,LICENSES/MIT.txt). - Text encoder: fine-tuned from
sentence-transformers/all-mpnet-base-v2
(Apache-2.0, modified;
LICENSES/Apache-2.0.txt).
Citation
@inproceedings{park2026glint,
title = {{GLINT}: Sparsely Gated Vision-Language Alignment for Fine-Grained Radiology Representations},
author = {Park, Jonggwon and Lee, Seongeun and Park, Junhyun and
Yun, Hannah and Kim, Hyunwoong and Jeong, Sohyun and
Kang, Hyewon and Yoon, Byungmu and Choi, Kyoyun},
booktitle = {The Fortieth Annual Conference on Neural Information Processing Systems},
year = {2026},
url = {https://arxiv.org/abs/2606.03180}
}
- Downloads last month
- 79