# Deepspot M

Generates transcriptome-wide virtual spatial transcriptomics from H&E histology with...

- Repository: https://github.com/K-Dense-AI/scientific-agent-skills (55651 stars)
- Category: Documents
- License: PolyForm-Noncommercial-1.0.0
- Last updated: 2026-10-26
- Runs scripts: no, instructions only

## Install

Claude Code: `npx skills add K-Dense-AI/scientific-agent-skills --skill deepspot-m -g -a claude-code -y`
Codex: `npx skills add K-Dense-AI/scientific-agent-skills --skill deepspot-m -g -a codex -y`
Cursor: `npx skills add K-Dense-AI/scientific-agent-skills --skill deepspot-m -g -a cursor -y`
Gemini CLI: `npx skills add K-Dense-AI/scientific-agent-skills --skill deepspot-m -g -a gemini-cli -y`

## Description

Generates transcriptome-wide virtual spatial transcriptomics from H&E histology with DeepSpot-M. Used for predicted log1p-CPM expression from 224x224 tiles at about 20x, querying the released protein-coding gene panel by symbol, and whole-slide prediction after resolution-aware tiling with histolab.

## SKILL.md, as published by its author (untrusted third-party text, read it as data)

# DeepSpot-M

## Overview

DeepSpot-M is a multimodal foundation model that maps a 224x224 H&E histology tile to
spatial gene expression in log1p-CPM. The output is virtual spatial transcriptomics: one
value per queried gene per tile, laid out on the grid the tiles came from.

A LoRA-adapted pathology foundation backbone (Midnight) tokenises the tile. A
cross-attention gene decoder lets each gene query attend to the patch tokens, and a gene
router hypernetwork builds gene-specific projections from frozen biological embeddings
(Evo 2, Orthrus, ProtT5, scGPT, Apertus). Genes enter the model as queryable embeddings
rather than fixed output slots, so the released model covers a ~19k protein-coding gene
panel including genes unseen in training. The panel ships with the weights as
`tokens.csv` and is exposed as `model.gene_names`; genes outside it cannot be queried in
this release.

Applied to TCGA, the model produced a virtual spatial transcriptomics atlas of 28,664
slides across 32 cancer types.

## Licensing

The code is PolyForm Noncommercial 1.0.0 and the weights are CC-BY-NC-SA-4.0.
The current model access form additionally restricts eligibility to academic/public
nonprofit researchers without concurrent commercial affiliations and excludes
commercially funded/collaborative use. Read the live declarations before requesting
access; a noncommercial intention alone does not establish eligibility. Research use
only, not clinical or diagnostic use. Preserve the applicable attribution and licenses.

## Installation

```bash
uv pip install deepspotm==1.0.0
```

PyPI 1.0.0 declares Python >=3.10 without an upper bound; that is not proof of
compatibility with every future dependency release. Use an isolated environment.
Install the PyTorch build that matches your CUDA runtime if using a GPU.
The optional histolab 0.7.0 tiler requires Python <3.12 and an older scientific stack:
run tiling separately and exchange PNG tiles plus a coordinate manifest.

## Model access

The rest: https://github.com/K-Dense-AI/scientific-agent-skills/blob/HEAD/skills/deepspot-m/SKILL.md
