/ Модель

Характеристики

Лицензия
Apache 2.0
Библиотека
transformers
Опубликована
20 окт 2026

TinyPath

Эмбеддинги изображенийИзображение → embedding3 профессии

Компактный визуальный энкодер для извлечения признаков из тайлов гистопатологических изображений H&E.

0скачиваний за 30 дней1лайквеса обновлены24 окт 2026

Бенчмарки

Как модель справилась с задачами пользователей ailist и что о ней публикуют открытые лидерборды

Публичные оценки

Из открытых лидербордов. Сравнивайте результаты одного теста при одинаковых условиях — отсутствие оценки не значит, что модель хуже.

В подключённых источниках результатов для этой модели пока нет.

Что умеет модель

Описание составлено по карточке модели и метаданным Hugging Face

TinyPath — визуальный энкодер на базе Vision Transformer для анализа тайлов гистопатологических изображений H&E. Модель разработана как компактная версия Prov-GigaPath: её веса сначала проредили, затем обучили методом дистилляции от Prov-GigaPath. Размер модели — 103,6 млн параметров; архитектура включает 33 блока, ширину 640, 10 голов внимания, патчи 16 × 16 и MLP-блоки SwiGLU.

На вход подаются RGB-тайлы размером 224 × 224 пикселя. Модель выдаёт CLS-эмбеддинг размерности 640 и 196 токенов патчей, которые можно использовать в последующих задачах анализа тканей. В README приведены результаты оценки на HEST, EVA и PLISM; на этих тестах показатели TinyPath близки к результатам учительской модели Prov-GigaPath при существенно меньшем размере. Для загрузки описана поддержка Transformers и timm. Лицензия — Apache-2.0.

Сценарии применения

  • извлечение эмбеддингов из тайлов H&E
  • подготовка признаков для классификации патологических изображений
  • построение представлений патчей для анализа тканей
  • оценка сходства гистологических тайлов
  • использование в качестве визуального энкодера в последующем анализе патологии

Ограничения

Модель предназначена для тайлов H&E размером 224 × 224 и сама по себе выдаёт признаки, а не готовые клинические диагнозы или метки классов. Обучение проводилось без меток на срезах TCGA, включая пациентов, представленных в тестовой выборке MoNuSAC, что следует учитывать при интерпретации оценки на этом бенчмарке.

Для каких профессий подходит3

Разделы каталога профессий, в задачах которых используется эта модель

Все профессии

Карточка модели

README от автора на Hugging Face, как он его опубликовал

Открыть на Hugging Face

TinyPath

TinyPath is a 103.6M-parameter Vision Transformer for H&E histopathology tiles. It was pruned from Prov-GigaPath (1.13B parameters) and then distilled from it.

  • Architecture: ViT with 33 blocks, width 640, 10 heads, patch size 16 and a SwiGLU MLP
  • Input: 224 × 224 RGB tiles
  • Output: a 640-d CLS embedding and 196 patch tokens
  • Teacher: Prov-GigaPath

Evaluation

TinyPath and Prov-GigaPath were run through the same pipeline on three official benchmarks, HEST, EVA and PLISM, and the other three models' scores are published. H0-mini's come from the HEST and PLISM leaderboards and, for EVA, from its paper. H-optimus-0's come from the HEST, EVA 0.4.5 and PLISM leaderboards, and DistillPath-KS16-HOpt0's from its paper. Error bars are ±1 SD over repeated runs; the published scores have none.

Official benchmarks, representative scores

BenchmarkMetricBetterTinyPathProv-GigaPathH0-mini (published)H-optimus-0 (published)DistillPath-KS16-HOpt0 (published)
Parameters103.6M1.13B86M1.1B22M
HESTMean Pearson r, 9 tasksHigher0.38220.38750.39580.41500.376
EVA, 5 patch tasksMean balanced accuracyHigher0.83710.8425—0.8460.810
EVA Camelyon16-smallBalanced accuracy (test)Higher0.8368 ± 0.02210.8036 ± 0.03080.8420.827—
EVA MoNuSACDice (release test split)Higher0.6443 ± 0.00650.6834 ± 0.00660.6430.6850.634
PLISMLeaderboard score, 224 pxHigher0.5300.3330.5410.4800.480

Official benchmarks, every task

HEST Pearson r per task

PLISM at 224 px

Teacher retention per benchmark

Mean teacher retention

  • Higher is better on every benchmark: Pearson r for HEST, balanced accuracy for the EVA classification tasks, Dice for EVA MoNuSAC, and the leaderboard score and its components for PLISM.
  • A missing bar or a dash means that model has no published score on that benchmark.
  • EVA's representative score is the mean balanced accuracy of its five patch-classification tasks (BACH, BreakHis, CRC, Gleason and PatchCamelyon), with its slide task (Camelyon16-small) and segmentation task (MoNuSAC) kept separate; the mean has no error bar. It is not EVA's leaderboard average, which leaves out BACH and needs MHIST, PANDA-small and CoNSeP, none of which were run. H0-mini's paper has no BreakHis or Gleason score, so H0-mini has no five-task mean.
  • PLISM measures robustness to scanner and stain changes rather than accuracy. It is run two ways: on its 224 px tiles unresized, the setting of its public leaderboard and of H0-mini's own preprocessing, and with tiles resized to 256 px and center-cropped to 224, as PLISM's code now does for Prov-GigaPath. The representative score and the PLISM figure use 224 px, the only setting with scores for every model.
  • H0-mini is Bioptimus's 86M-parameter ViT-B, distilled from H-optimus-0 (1.1B parameters) on the same 6,093 TCGA slides as TinyPath. All its scores here use the class token, like TinyPath's. Its EVA scores come from its paper's table, which has no BreakHis or Gleason. The paper's HEST score (0.4044) concatenates the class token with the mean patch token, so the HEST leaderboard's class-token score is used instead.
  • Teacher retention divides each student's score by its own teacher's: TinyPath by Prov-GigaPath, both run here, and H0-mini by H-optimus-0, both taken from the same source. For HEST and PLISM that source is the two leaderboards. For EVA it is H0-mini's paper, whose H-optimus-0 scores differ slightly from the EVA leaderboard's in the table above. The means cover only scores both students have, so they leave out Gleason and BreakHis: over HEST and the five shared EVA tasks, TinyPath keeps 99.6% of its teacher and H0-mini 99.2%. Adding PLISM, where both students are more robust than their teachers, raises them to 108.1% and 101.1%.
  • On HEST, H0-mini scores higher than TinyPath but keeps less of its teacher: 95.4% of H-optimus-0's score, where TinyPath keeps 98.6% of Prov-GigaPath's. Under its paper's protocol it keeps 95.7% (0.4044 against H-optimus-0's 0.4224). The two students differ in more than their teachers, though: H0-mini is a ViT-B with 14 px patches and four register tokens, does not start from its teacher's weights, distills through its teacher's pretrained projection heads, which Prov-GigaPath does not ship, and saw about 215M tiles, 2.7 times TinyPath's 78.9M. Retention alone cannot say which of these differences matters.
  • DistillPath-KS16-HOpt0 is kaiko's 22M-parameter ViT-S/16, further distilled from H-optimus-0's class and patch tokens on 6,000 TCGA slides. Its paper uses the same EVA, HEST and PLISM protocols but reports PLISM retrieval at top-5 rather than top-10, so only its PLISM score and median cosine are listed.
  • TinyPath and H0-mini were trained without labels on the same 6,093 TCGA slides, which include slides from 18 of MoNuSAC's 25 test patients. Prov-GigaPath never saw TCGA.
BenchmarkMetric (split)BetterTinyPathProv-GigaPathH0-mini (published)H-optimus-0 (published)DistillPath-KS16-HOpt0 (published)
HEST, mean of 9 tasksPearson rHigher0.38220.38750.39580.41500.376
EVA PatchCamelyonBalanced accuracy (test), 5 runsHigher0.9462 ± 0.00100.9436 ± 0.00150.9420.9430.921
EVA CRCBalanced accuracy (val), 5 runsHigher0.9571 ± 0.00060.9519 ± 0.00140.9610.9550.943
EVA BACHBalanced accuracy (val), 5 runsHigher0.7601 ± 0.01350.7637 ± 0.00250.7740.7590.742
EVA Gleason (Arvaniti)Balanced accuracy (val), 5 runsHigher0.7346 ± 0.00920.7246 ± 0.0100—0.7700.756
EVA BreakHisBalanced accuracy (val), 5 runsHigher0.7875 ± 0.00980.8288 ± 0.0084—0.8010.690
EVA Camelyon16-smallBalanced accuracy (test), 20 runsHigher0.8368 ± 0.02210.8036 ± 0.03080.8420.827—
EVA MoNuSACDice (release test split), 5 runsHigher0.6443 ± 0.00650.6834 ± 0.00660.6430.6850.634
PLISMLeaderboard score (8,139 positions, 256 px)Higher0.5200.320———
PLISMLeaderboard score (8,139 positions, 224 px)Higher0.5300.3330.5410.4800.480

HEST, Pearson r per task (higher is better):

EncoderIDCPRADPAADSKCMCOADREADCCRCCLUNGLYMPH_IDCMean
TinyPath0.56790.37590.47220.54740.26880.16720.23950.54540.25530.3822
Prov-GigaPath0.55150.36980.47460.56180.29920.19600.24290.54110.25000.3875
H0-mini (published)0.58620.36870.49190.60120.24940.18630.26700.54820.26290.3958
H-optimus-0 (published)0.59760.38480.49110.64540.30860.22160.26760.55900.25910.4150
DistillPath-KS16-HOpt0 (published)0.5540.3490.4580.5540.2610.1770.2280.5460.2560.376

PLISM by component over 8,139 positions (higher is better in every column). TinyPath and Prov-GigaPath ran in float16:

EncoderInputMedian cosine, all pairsTop-10, scanner onlyTop-10, staining onlyTop-10, both differLeaderboardMean cosine
TinyPath256 px0.74600.90820.26810.15810.5200.7192
Prov-GigaPath256 px0.55330.56590.10980.04890.3200.5388
TinyPath224 px0.75560.92180.27370.16860.5300.7283
Prov-GigaPath224 px0.57040.59200.11780.05390.3330.5547
H0-mini (published)224 px0.8000.8640.3180.1830.541—
H-optimus-0 (published)224 px0.6850.7440.3270.1660.480—
DistillPath-KS16-HOpt0 (published)224 px0.656———0.480—

Teacher retention, each student's score as a percentage of its teacher's (higher is better). H0-mini's EVA scores and the H-optimus-0 scores they are divided by both come from Table 1 of H0-mini's paper:

BenchmarkTinyPathProv-GigaPathTinyPath retentionH0-miniH-optimus-0H0-mini retention
HEST, mean of 9 tasks0.38220.387598.6%0.39580.415095.4%
EVA PatchCamelyon0.94620.9436100.3%0.9420.942100.0%
EVA CRC0.95710.9519100.5%0.9610.958100.3%
EVA BACH0.76010.763799.5%0.7740.758102.1%
EVA Gleason (Arvaniti)0.73460.7246101.4%———
EVA BreakHis0.78750.828895.0%———
EVA Camelyon16-small0.83680.8036104.1%0.8420.820102.7%
EVA MoNuSAC0.64430.683494.3%0.6430.67994.7%
PLISM, 224 px0.5300.333159.2%0.5410.480112.7%
Mean, HEST and 5 shared EVA tasks99.6%99.2%
Mean, adding PLISM108.1%101.1%

Usage

pip install -r requirements.txt

Tiles are resized to 256 px on the shorter side (bicubic), center-cropped to 224 and normalized with ImageNet statistics. AutoImageProcessor and the timm transform do this for you.

transformers

import torch
from PIL import Image
from transformers import AutoImageProcessor, AutoModel

processor = AutoImageProcessor.from_pretrained("<org>/tinypath")
model = AutoModel.from_pretrained("<org>/tinypath", trust_remote_code=True).eval()

image = Image.open("patch.png").convert("RGB")
with torch.no_grad():
    outputs = model(processor(image, return_tensors="pt")["pixel_values"], pool_mode="cls")
embedding = outputs.pooler_output   # [1, 640]
tokens = outputs.last_hidden_state  # [1, 197, 640]

Without trust_remote_code, the same weights load into transformers' built-in TimmWrapperModel.

timm

import timm

model = timm.create_model("hf-hub:<org>/tinypath", pretrained=True).eval()
transform = timm.data.create_transform(**timm.data.resolve_data_config({}, model=model))
with torch.no_grad():
    embedding = model(transform(image).unsqueeze(0))  # [1, 640]

uint8 encoder

From a local copy of this repository:

from modeling_tinypath import build_encoder, eval_transform

encoder = build_encoder(".")
with torch.no_grad():
    embedding = encoder(eval_transform()(image).unsqueeze(0))  # [1, 640]

python run_inference.py checks that every interface loads all weights and returns identical outputs.

Как запустить

На своей GPU в ailist. Цена — по текущим предложениям провайдеров

GPU в ailist

Универсальный рантайм · transformers · image-feature-extraction

Нельзя запустить

Доступ к модели ограничен автором; у платформы нет доступа к весам.

Ревизия весов
bc9ceab

0 моделей