/ Модель

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

Лицензия
Своя лицензия
Базовая модель
dinov3-convnext-tiny-pretrain-lvd1689m
Библиотека
pytorch
Опубликована
24 окт 2026

compact-rcgf-3-class

Классификация изображенийИзображение → label3 профессии
0скачиваний за 30 дней0лайковвеса обновлены27 окт 2026

Описание модели

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

Компактная исследовательская модель классифицирует пациентов по фотографиям глазного дна и девяти клиническим факторам на классы Normal, DM и DM_CKD.

MM-RetFund Compact — компактная исследовательская модель для классификации пациентов по фотографиям глазного дна и клиническим факторам. Она принимает от 1 до 20 RGB-снимков одного пациента и ровно девять клинических факторов, а затем предсказывает один из трёх классов: Normal, DM или DM_CKD; последняя группа включает DM_CKD_V. Визуальная часть использует замороженный backbone DINOv3 ConvNeXt-Tiny, а для объединения визуальных признаков с табличными данными применяется голова TabM.

Выпуск ориентирован на компактный размер: доступны варианты PyTorch FP32, FP16 и BF16, а также LiteRT INT8 с входами и выходами FP32. Изображения приводятся к размеру 672×672 после ресайза и центральной обрезки; пропущенные клинические значения заменяются средними значениями обучения. Репозиторий закрытый, доступ предоставляется владельцем. Указана лицензия other; конкретные условия лицензии в предоставленных данных не раскрыты.

Модель предназначена для исследовательской классификации по данным офтальмологических снимков и клиническим признакам. Представленные метрики получены при внутренней оценке, а отдельный чекпойнт — это модель одного фолда и одного seed, поэтому метрики ансамбля нельзя считать её результатами. Авторы не сообщают о внешней валидации или регуляторном разрешении и прямо запрещают использовать модель для диагностики, скрининга, лечения или принятия решений о помощи пациентам. Вероятности классов не являются калиброванными клиническими оценками риска.

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

  • исследовательская классификация снимков глазного дна по трём группам состояния
  • сопоставление фотографий глазного дна с девятью клиническими факторами пациента
  • оценка выходных вероятностей классов в исследовательском анализе офтальмологических данных

Ограничения

Модель предназначена только для исследований: внешняя валидация и регуляторное разрешение не заявлены, а использовать её для диагностики, скрининга, лечения или решений о помощи пациентам нельзя. Вероятности не калиброваны как клинические оценки риска; показанная оценка относится к внутренним данным и не гарантирует качество на других пациентах или устройствах.

Публичные бенчмарки

Результаты из открытых лидербордов в сравнении с лидерами каталога

Публичных оценок пока нет

В подключённых источниках результатов этой модели не нашлось. Отсутствие оценки не значит, что модель хуже: её могли просто не проверять.

Источники: Hugging Face Leaderboards, Hugging Face Eval Results, Open LLM v2, MTEB, timm, Open ASR, EvalPlus, LLM Stats

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

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

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

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

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

Открыть на Hugging Face

MM-RetFund Compact: three-class research model

Start here for the size-first compact release. This private model combines 1–20 fundus photographs and nine clinical factors to predict Normal, DM, or DM_CKD (including the advanced DM_CKD_V group). It is not the separate binary six-feature model.

Research only. Not a medical device; do not use for diagnosis, screening, treatment, or patient-care decisions. No external validation or regulatory clearance is reported.

Choose a format

FormatFilesModel sizeStart here when
PyTorch FP32fp32/117.24 MBYou want a CPU-compatible starting point
PyTorch FP16fp16/58.63 MBYou have a GPU supporting FP16
PyTorch BF16bf16/58.63 MBYour device and PyTorch support BF16
LiteRT INT8litert/int8/30.46 MBYou want the smallest bundle; CPU interpreter tested
LiteRT FP16litert/fp16/59.16 MBYou want FP16 weights with FP32 activations
ONNX / OpenVINO FP32onnx/, openvino/about 117 MB eachYou use another inference runtime

Sizes refer to model files, not dependencies or memory. LiteRT INT8 uses dynamic INT8 weights and FP32 input/output. The bundled LiteRT backend was tested on CPU; Android/iOS delegates and other devices need target-specific validation. TensorRT engines are hardware/software-specific, not portable defaults.

For a larger accuracy reference, the private three-seed ensemble uses three backbones (175.89 MB FP16). The big quantized RCGF is a separate, larger model. This compact model is the size-first choice, not a claim that its single seed has the best accuracy.

Install and predict

Ask the owner for access to this private Hugging Face repository. You do not need the research codebase. Use Python 3.10 or newer in a fresh virtual environment:

python -m venv .venv
source .venv/bin/activate  # Windows: .venv\Scripts\activate
python -m pip install -U huggingface_hub
hf auth login
hf download pytholove/compact-rcgf-3-class \
  compact_rcgf_runtime-0.1.0-py3-none-any.whl requirements-torch.txt \
  --local-dir compact-download
cd compact-download
python -m pip install -r requirements-torch.txt

The requirements file installs the local wheel and its declared dependencies: numpy, Pillow, huggingface-hub, torch, torchvision, transformers, and safetensors. Dependencies are resolved by pip, not locked; use a compatible PyTorch build for your device. The wheel contains inference code, not weights. Weights download on first load using your Hugging Face credentials.

For LiteRT INT8 instead, download requirements-litert.txt alongside the same wheel and run python -m pip install -r requirements-litert.txt from compact-download. It installs ai-edge-litert plus the shared dependencies. In the example below change the loader options to backend='litert', precision='int8', device='cpu'.

The example uses synthetic inputs to check installation, not patient data:

from PIL import Image
from compact_rcgf import CompactRCGF

model = CompactRCGF.from_pretrained(
    'pytholove/compact-rcgf-3-class',
    backend='torch', precision='fp32', device='cpu',
)
factors = {
    'age': 58.0, 'sex': 0.0, 'bmi': 25.76, 'waist_circ': 93.72,
    'sbp': 137.29, 'dbp': 80.46, 'hba1c': 7.18,
    'fasting_glucose': 131.21, 'postprandial_glucose': 202.33,
}
image = Image.new('RGB', (672, 672), (128, 128, 128))
result = model.predict([image], factors)
print(result['label'], result['probabilities'])

Replace the synthetic image and factors with appropriate research inputs. The synthetic example is only an installation check: PyTorch FP32 and LiteRT INT8 produced different labels for this artificial image. predict also accepts image file paths and returns class_order and model_version. For reproducibility, pass revision='<Hub commit SHA>' to from_pretrained.

LiteRT and other devices

Install the corresponding extra instead of [torch] and use the same predict call:

ExtraExplicit loading options
[litert]backend='litert', precision='int8', device='cpu'
[litert]backend='litert', precision='fp16', device='cpu'
[torch]backend='torch', precision='fp16', device='cuda'
[torch]backend='torch', precision='bf16', device='cpu' on a BF16-capable device
[onnx]backend='onnx', precision='fp32', device='cpu'
[openvino]backend='openvino', precision='fp32', device='cpu'

The loader defaults to ONNX FP32, so specify the backend and precision explicitly. Hardware and dependency support varies; a file existing does not establish that it runs on every device.

Inference speed

Median time per patient in milliseconds, including preprocessing and prediction for one or four images per patient, not four classes. Linux x86-64, Intel Core i9-12900H CPU or NVIDIA RTX 3070 Ti Laptop GPU (8 GB); four CPU threads. Each cell uses three warmups and 15 timed calls with a synthetic in-memory 672×672 RGB PIL image; model loading, download, disk I/O and concurrent requests are excluded. Times are indicative, not clinical or device guarantees.

FormatDevice1 image (ms)4 images (ms)
LiteRT INT8CPU242994
LiteRT FP16CPU5912367
PyTorch FP32CPU4612215
PyTorch BF16CPU446616501
ONNX FP32CPU5061895
OpenVINO FP32CPU4551880
PyTorch FP32GPU38162
PyTorch FP16GPU32121
PyTorch BF16GPU31121

BF16 was especially slow on this CPU; smaller weights do not guarantee faster inference. GPU and CPU used different PyTorch versions. Results depend on hardware, input dimensions, image counts, runtime and load. Raw measurements, including p95 and software versions, are in benchmarks/published_runtime.json; benchmarks/benchmark_published.py reproduces the protocol.

Input contract

  • Supply 1–20 RGB image paths or PIL images for one patient. The runtime resizes the shorter side to 768, center-crops to 672, normalizes with ImageNet statistics and applies release-evaluation FP16 rounding.
  • Supply exactly the nine factor keys in the example. None or NaN is imputed with the training mean; config.json contains factor order and normalization parameters. Confirm units and sex encoding against the study data dictionary; do not infer them from example values.
  • Output probabilities sum to one in class order Normal, DM, DM_CKD; these are not calibrated clinical risk estimates.
  • Direct LiteRT integrations require matching preprocessing, [1, 3, 672, 672] vision input and head inputs [1, 20, 768] embeddings, [1, 9] factors and [1] image count. Zero-pad shorter bags; the Python runtime handles this.

Evidence and limitations

The released checkpoint is S3 fold 0, seed 42. Its fold-0 canary contains 66 patients. Three-fold pooled OOF figures are from fold-specific models, not a test of this one file on all 196 patients.

Internal evaluationPatientsMacro-F1Macro-AUC
Seed 42 pooled OOF1960.77320.9262
Three-seed recipe mean pooled OOF1960.79340.9283
Three-seed ensemble pooled OOF1960.79310.9314
Released fold-0 seed-42 canary660.78480.9169

The seed 42/43/44 pooled F1 values are 0.7732 / 0.8332 / 0.7737; do not quote the three-seed recipe mean as this checkpoint's score. On the same internal canary, historical LiteRT INT8 testing reported 100% argmax agreement and F1/AUC 0.7848/0.9217, with maximum absolute probability difference 0.10579. This is not proof of equivalence on other patients or hardware. No held-out n=43 scoring or external validation is reported. FP32 SafeTensors were upcast from FP16 exports, not independently saved original FP32 training weights.

The student uses a frozen DINOv3 ConvNeXt-Tiny vision backbone and a TabM clinical/fusion head, trained with nested-OOF TabICL feature distillation and cross-cohort big-RCGF logit distillation. See the detailed model card, eval/, benchmarks/, and checksums.sha256 for lineage and format evidence.

Licenses and upstream terms

This research release uses a DINOv3 backbone and was distilled using a RETFound-based teacher. Review both upstream terms before use or redistribution:

CC BY-NC 4.0 requires attribution and restricts commercial use of licensed material. The exact applicability of upstream terms to this distilled release and your intended use requires review; this card does not grant rights beyond those held by the respective licensors.

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

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

GPU в ailist

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

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

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

Ревизия весов
12b7f60

0 моделей