/ Модель

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

Лицензия
Своя лицензия
Базовая модель
midnight
Опубликована
11 июн 2026

mascaret

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

Mascaret — дообученный энкодер для извлечения устойчивых признаков из гистологических изображений в исследованиях вычислительной патологии.

10 544скачиваний за 30 дней3лайкавеса обновлены25 авг 2026

Бенчмарки

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

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

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

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

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

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

Mascaret — модель Waiv для извлечения признаков из гистологических изображений в вычислительной патологии. Она создана как версия Midnight-12k, дообученная по рецепту, который повышает устойчивость к различиям в сканерах и лабораториях.

Модель использует энкодер DINOv2 и предназначена для получения визуальных признаков, которые можно применять в последующих задачах анализа патологических изображений и онкологических исследований. Waiv делится моделью для бенчмаркинга и исследовательского использования. Для загрузки весов требуется доступ к gated-репозиторию; лицензия обозначена как other, поэтому условия использования следует уточнить на странице модели.

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

  • извлечение признаков из гистологических изображений
  • сравнение представлений тканей между лабораториями
  • анализ влияния сканера на признаки патологии
  • подготовка признаков для последующих онкологических моделей

Ограничения

Модель предназначена для исследовательского использования и бенчмаркинга; клиническая пригодность не заявлена. Для работы требуется среда с совместимыми версиями Transformers и safetensors, а загрузка gated-модели требует доступа.

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

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

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

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

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

Открыть на Hugging Face

Say hi to Mascaret, the robustified version of Midnight-12k, by Waiv

Waiv, formerly Owkin Dx, builds AI-powered digital pathology to catalyze precision medicine in oncology. This organization hosts pathology foundation models and research artifacts we share with the community for benchmarking and research use. On July 29th, 2026, we released:

  • Phaet — a robustified version of Phikon-v2
  • Mascaret — a robustified version of Midnight-12k

Both come from a model-agnostic fine-tuning recipe that makes pathology foundation models invariant to acquisition factors like scanner and lab, improving robustness and downstream performance together. The names follow a wave theme drawn from the Waiv brand — a mascaret is a tidal bore, a wave that carries its shape forward.

Learn more:

Graphical abstract

Usage

End-to-end example: load the model, load an image, extract features.

import torch
import torchvision.transforms as T
from huggingface_hub import hf_hub_download
from PIL import Image
from transformers import AutoModel

REPO = "wearewaiv/mascaret"

# Load the fine-tuned encoder
model = AutoModel.from_pretrained(REPO, trust_remote_code=True)
model.eval()

# Build the preprocessing transform from the model config
# (pixel_mean / pixel_std are stored in the config, so this stays correct)
transform = T.Compose([
    T.Resize(224),        # shorter side -> 224, aspect ratio preserved
    T.CenterCrop(224),    # ... then crop, so the result really is 224x224
    T.ToTensor(),
    T.Normalize(mean=model.config.pixel_mean, std=model.config.pixel_std),
])

# Load the example image shipped with this repository
image = Image.open(hf_hub_download(REPO, "assets/image.jpg")).convert("RGB")

# Preprocess -> (B, 3, 224, 224)
pixel_values = transform(image).unsqueeze(0)

# L2-normalised CLS embedding — the recommended feature vector
features = model.encode(pixel_values)       # (1, 1536); encode() is already no-grad
print(features.shape)

# Full token sequence when patch-level features are needed
with torch.inference_mode():
    out = model(pixel_values=pixel_values)
out.last_hidden_state                       # (1, 257, 1536) — CLS at index 0
out.pooler_output                           # (1, 1536)      — L2-normalised CLS (== features)

trust_remote_code=True makes transformers fetch this repository's modeling_finetuned_encoder.py, and it prints a warning every time a new version of that file is downloaded. Pass an explicit revision to pin the code you reviewed and silence it:

model = AutoModel.from_pretrained(REPO, trust_remote_code=True, revision="<commit-sha>")

Preprocessing

pixel_mean and pixel_std are stored in the config, so you never need to hardcode them:

model.config.pixel_mean  # [0.500, 0.500, 0.500]
model.config.pixel_std   # [0.500, 0.500, 0.500]

Environment

We recommend an isolated environment — trust_remote_code models are sensitive to the transformers version, and mixing them into a large existing environment tends to surface version conflicts:

uv venv --python 3.11 ~/venvs/waiv
source ~/venvs/waiv/bin/activate
uv pip install torch torchvision "transformers>=5.14,<6" "safetensors>=0.8.0" \
    huggingface-hub pillow

The snippet above is verified end-to-end on this combination:

PackageVersion
Python3.11
torch2.5.1+cu124
torchvision0.20.1+cu124
transformers5.14.1
safetensors0.8.0
huggingface_hub1.25.1

Notes:

  • transformers 5.x requires safetensors >= 0.8.0. An older safetensors pinned by some other dependency makes import transformers fail outright with an ImportError — this is the most common setup problem we see.
  • timm is not needed for this model. It is imported lazily, and only for checkpoints that use the timm loader; this one uses the hf_transformers loader (DINOv2).
  • CPU is fine for a handful of images. For batches, model.to("cuda") and move pixel_values to the same device.

Acknowledgments

Computing resources. This work was granted access to the High-Performance Computing (HPC) resources of IDRIS under the allocation 2026-A0201012519 made by GENCI. Fine-tuning experiments were performed using the EuroHPC supercomputer MareNostrum 5, hosted by the Barcelona Supercomputing Center (BSC). We gratefully acknowledge EuroHPC and BSC for providing access to these resources under the EHPC-AIF-2026PG01-102 allocation.

Data access. The results presented here are in part based upon data generated by the TCGA Research Network: https://www.cancer.gov/tcga.

Example image attribution

assets/image.jpg, used by the snippet above, is not covered by the license that applies to the model weights — it keeps its own terms and is included solely as a runnable example input.

Where our users are

World map of access-request origins

Access-request origins (accepted) as of 2026-08-25. 16 located across 7 countries; 0 of unknown origin. Top: Germany (6), United States (4), Netherlands (2), Switzerland (1), Canada (1).

Inferred from requesters' institutional email domains — Hugging Face does not expose per-download geolocation. For this gated model, granted requesters are the population able to download it.

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

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

GPU в ailist

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

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

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

Ревизия весов
764fa82

0 моделей