HistAgent is a visual-omics foundation model that generates ranked molecular readouts from routine H&E images. It combines a spot-centred image with surrounding tissue context and autoregressively predicts the top 50 genes for each location.
The repository contains only the trained LoRA parameters and HistAgent-specific modules. The frozen GigaPath base weights are loaded separately from the official gated repository.
The model was trained on 2.23 million paired H&E–ST locations from 936 human and mouse 10x Visium slides spanning 32 tissue categories. The release checkpoint corresponds to epoch 30 of the GigaPath training run.
1git clone https://github.com/zipging/HistAgent.git
2cd HistAgent
3pip install -e .
1from histagent import load_pretrained
2
3model, tokenizer, config = load_pretrained("wli13/HistAgent", device="cuda")
See the
GitHub repository for image preprocessing and ranked-gene inference examples.
This model is intended for research on computational pathology and spatial molecular biology. It predicts rank-based molecular readouts rather than transcript counts. Performance can vary with tissue type, staining, scanner characteristics, image resolution and preprocessing. Predictions require independent biological validation and are not intended for clinical diagnosis or treatment decisions.
The HistAgent manuscript and citation will be added when publicly available.