/ Модель

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

Лицензия
CC BY-NC-ND 4.0
Библиотека
timm
Опубликована
26 фев 2025

H0-mini

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

Компактный Vision Transformer для извлечения признаков из гистологических изображений и последующей классификации тканей и слайдов.

7 646скачиваний за 30 дней43лайкавеса обновлены26 ноя 2026

Бенчмарки

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

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

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

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

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

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

H0-mini — компактная базовая модель для гистологических изображений, разработанная Owkin и Bioptimus. Это Vision Transformer Base/14, дистиллированный из H-optimus-0 (ViT-g/14) методом самообучения DINOv2 на наборе PanCancer40M: 43 миллионах фрагментов тканей из 6 093 гистологических слайдов TCGA.

Модель извлекает векторные признаки из изображений гистологических фрагментов. Их можно использовать для классификации областей интереса линейным классификатором или методом k-ближайших соседей, классификации целых слайдов с помощью алгоритмов multiple-instance learning, а также для сегментации. Разработчики сообщают о сопоставимом с другими базовыми моделями для гистологии качестве при меньших затратах на инференс и устойчивости к вариациям окрашивания и сканирования. Bioptimus SDK поддерживает обработку whole-slide изображений и выдаёт 1536-мерные признаки фрагментов с координатами.

Модель принимает изображения тканей и выдаёт эмбеддинги; она не предназначена для самостоятельной постановки диагноза. Лицензия CC BY-NC-ND 4.0 разрешает использование и распространение только для некоммерческих исследований с атрибуцией и запрещает распространение производных версий. Для загрузки требуется регистрация на Hugging Face. Модель не сертифицирована как медицинское изделие; применение в медицинских или биомедицинских сценариях требует независимой проверки и соблюдения применимых требований.

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

  • извлечение признаков из фрагментов гистологических слайдов
  • классификация областей интереса в гистологических изображениях
  • классификация целых слайдов с помощью multiple-instance learning
  • подготовка признаков для сегментации тканей
  • поиск похожих гистологических фрагментов методом k-ближайших соседей

Ограничения

Модель не сертифицирована для медицинского применения и не заменяет диагностику; результаты в медицинских сценариях требуют независимой валидации. Лицензия ограничивает использование некоммерческими исследованиями и запрещает распространение производных версий.

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

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

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

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

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

Открыть на Hugging Face

Model card for H0-mini

H0-mini is a lightweight foundation model for histology developed by Owkin and Bioptimus.

The model is a Vision Transformer Base/14 distilled from H-optimus-0 [1] (ViT-g/14) with DINOv2 [2] self-supervised distillation method on PanCancer40M, a set of 43 million histology tiles extracted from 6,093 histology slides of TCGA.

H0-mini achieves comparable performance to current histology foundation models at a significantly reduced inference cost. It also demonstrates strong robustness to variations in staining and scanning protocols. Please refer to the ArXiv preprint for additional details.

Figure: Assessment of model robustness to staining and scanning conditions in PLISM dataset [3] - Median top-10 accuracy vs. mean cosine similarity was computed for each extractor over 4,095 slide pairs. For both axes, higher values indicate more robust models.

How to use it to extract features

H0-mini can be used with or without fine-tuning on different downstream applications, such as slide-level classification using multiple-instance learning algorithms (e.g. using ABMIL [4]).

The recommended way to run H0-mini is the Bioptimus SDK, which handles whole-slide reading, tiling at 0.5 µm/pixel, preprocessing, and batching.

# pip install "bioptimus-sdk[huggingface]"
from huggingface_hub import login
from bioptimus.inference import Inference
from bioptimus.models import Backend, Models

login()  # https://huggingface.co/settings/tokens

infer = Inference(Models.H0_MINI, backend=Backend.HUGGINGFACE, tissue=False)
output = infer.embed("slide.svs")  # Zarr store with 1536-d tile features and coordinates

The SDK returns concatenated_features: the CLS token concatenated with the average of patch tokens.

Use timm to load the model as a plain PyTorch module, for example for fine-tuning or to use the CLS token alone.

We recommend to use the CLS token (cls_features) as input features for downstream tasks. The concatenation of the CLS token features with the average of patch token features may bring some improvements on some tasks (concatenated_features).

from huggingface_hub import login
import torch
import timm
from timm.data import resolve_data_config
from timm.data.transforms_factory import create_transform
from torchvision import transforms


# Login to the Hugging Face hub, using your user access token that can be found here:
# https://huggingface.co/settings/tokens.
login()

model = timm.create_model(
    "hf-hub:bioptimus/H0-mini",
    pretrained=True,
    mlp_layer=timm.layers.SwiGLUPacked,
    act_layer=torch.nn.SiLU,
)
model.to("cuda")
model.eval()

transform = create_transform(**resolve_data_config(model.pretrained_cfg, model=model))

input = torch.rand(3, 224, 224)
input = transforms.ToPILImage()(input)

# We recommend using mixed precision for faster inference.
with torch.autocast(device_type="cuda", dtype=torch.float16):
    with torch.inference_mode():
        output = model(transform(input).unsqueeze(0).to("cuda"))  # (1, 261, 768)
        # CLS token features (1, 768):
        cls_features = output[:, 0]
        # Patch token features (1, 256, 768):
        patch_token_features = output[:, model.num_prefix_tokens :]
        # Concatenate the CLS token features with the mean of the patch token
        # features (1, 1536):
        concatenated_features = torch.cat(
            [cls_features, patch_token_features.mean(1)], dim=-1
        )

assert cls_features.shape == (1, 768)
assert patch_token_features.shape == (1, 256, 768)
assert concatenated_features.shape == (1, 1536)

These features can then be used for downstream applications such as ROI classification (via linear or k-NN probing), slide classification (via multiple instance learning), segmentation (via ViT-Adapter for instance), etc.

Pre-training dataset tiles coordinates

Tiles coordinates of the pre-training dataset are available here as one .txt file per indication. For a given .txt file, the structure is the following:

cohort_1/slide_id_1.svs:
tile_z_x1_y1_slide_id_1.svs.png
tile_z_x2_y2_slide_id_1.svs.png
…
cohort_N/slide_id_S.svs:
tile_z_x1_y1_slide_id_2.svs.png
tile_z_x2_y2_slide_id_2.svs.png

Where z, x, y represent the deepzoom level, x coordinate at z-level and y coordinate at z-level of the tile, respectively.

For example:

TCGA_COAD/TCGA-3L-AA1B-01Z-00-DX1.8923A151-A690-40B7-9E5A-FCBEDFC2394F.svs:
tile_16_100_105_TCGA-3L-AA1B-01Z-00-DX1.8923A151-A690-40B7-9E5A-FCBEDFC2394F.svs.png
tile_16_100_106_TCGA-3L-AA1B-01Z-00-DX1.8923A151-A690-40B7-9E5A-FCBEDFC2394F.svs.png
…

Software Dependencies

Citation

If you are using this model, please cite our work:

@misc{filiot2025distillingfoundationmodelsrobust,
      title={Distilling foundation models for robust and efficient models in digital pathology}, 
      author={Alexandre Filiot and Nicolas Dop and Oussama Tchita and Auriane Riou and Thomas Peeters and Daria Valter and Marin Scalbert and Charlie Saillard and Geneviève Robin and Antoine Olivier},
      year={2025},
      eprint={2501.16239},
      archivePrefix={arXiv},
      primaryClass={cs.CV},
      url={https://arxiv.org/abs/2501.16239}, 
}

Acknowledgements

Computing resources

This work was granted access to the High-Performance Computing (HPC) resources of IDRIS under the allocations 2023-A0141012519, 2024-A0161012519 and 2024-GC011015442 made by GENCI.

Code

H0-mini was built upon DINOv2 repository (Apache License 2.0).

Datasets

The results published here are partly based upon data generated by the TCGA Research Network: https://www.cancer.gov/tcga.

References

  1. Saillard, C., Jenatton, R., Llinares-López, F., Mariet, Z., Cahané, D., Durand, E., Vert, J.-P., 2024. H-optimus-0.
  2. Oquab, M., Darcet, T., Moutakanni, T., Vo, H., Szafraniec, M., Khalidov, V., ... & Bojanowski, P. (2023). Dinov2: Learning robust visual features without supervision. arXiv preprint arXiv:2304.07193.
  3. Ochi, M., Komura, D., Onoyama, T., Shinbo, K., Endo, H., Odaka, H., ... & Ishikawa, S. (2024). Registered multi-device/staining histology image dataset for domain-agnostic machine learning models. Scientific Data, 11(1), 330.
  4. Ilse, M., Tomczak, J., & Welling, M. (2018, July). Attention-based deep multiple instance learning. In International conference on machine learning (pp. 2127-2136). PMLR.

Legal information

  • No commercial use: The H0-mini model and associated code/weights may be reproduced and shared solely for non-commercial research, including academic research purposes, subject to the terms of the CC BY-NC-ND 4.0 license. Any commercial use, sale or other monetization of this model, or any part of it, is prohibited and requires a separate license. For commercial licensing options, please contact hello@bioptimus.com.

  • Attribution: Any sharing or permitted use of H0-mini model must include (i) appropriate credits and attribution, (ii) a notice mentioning applicability of CC BY-NC-ND 4.0 license with an URL link, and (iii) our copyright notice and disclaimer of warranty notice (including on privacy) reproduced herein. This information must be provided by any reasonable means, without suggesting that we support user's organization or use of the model.

  • No derivatives: Derivative versions involving a modification to or from H0-mini model, may not be shared nor made available. Derivative versions include, without limitation, models developed, based or trained through distillation of H0-mini model.

  • No additional restrictions: No additional legal terms or technological restrictions may be imposed on the rights granted under the CC BY-NC-ND 4.0 license. This summary is provided for information only and does not amend, limit or otherwise affect the scope or terms of the CC BY-NC-ND 4.0 license, which shall prevail in the event of any inconsistency.

  • Disclaimer of warranties / Limitation of liability: H0-mini model is provided "as-is" without warranties of any kind, express or implied. This includes, without limitation, no warranty of fitness for a particular purpose. This model has not been reviewed, certified, or approved by any regulatory body, including but not limited to the FDA (U.S.), EMA (Europe), MHRA (UK), or other medical device authorities. Any application of this model in healthcare or biomedical settings must comply with relevant regulatory requirements and undergo independent validation. Users assume full responsibility for how they use this model and any resulting consequences. The licensors, as well as authors, contributors and distributors disclaim any liability for damages, direct or indirect, resulting from model use.

  • Privacy: When using H0-mini model, users undertake to and are solely responsible for ensuring their compliance with applicable local privacy regulations, including the GDPR in the EU and/or HIPAA in the US. Users shall not attempt to re-identify anonymized or pseudonymized data used to develop H0-mini model.

  • Registration and download: Downloading the model requires prior registration on Hugging Face and agreeing to the terms of use. The primary email used to sign up for your Hugging Face account must match your institutional email to receive approval. By downloading the model, you attest that all information (affiliation, research use) is correct and up-to-date. If another user within your organization wishes to use the H0-mini model, they must register as an individual user and agree to comply with the terms of use.

Copyright 2026 Bioptimus. All rights reserved. This model and its accompanying documentation are protected by copyright and are the sole and exclusive property of Bioptimus.

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

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

GPU в ailist

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

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

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

Ревизия весов
0a469f8

0 моделей