/ Модель

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

Лицензия
MIT
Библиотека
pytorch
Опубликована
5 авг 2026

chestx6-ssl-checkpoints

Классификация изображенийИзображение → label3 профессии

Набор контрольных точек PyTorch для исследования классификации рентгенограмм грудной клетки и устойчивости моделей при ограниченной разметке.

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

Бенчмарки

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

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

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

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

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

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

Репозиторий Kashif Mahmood и соавторов содержит контрольные точки PyTorch для экспериментов ChestX6-SSL-Benchmark по классификации рентгенограмм грудной клетки на шесть классов: COVID-19, эмфизема, нормальное состояние, бактериальная и вирусная пневмония, туберкулёз. Включены базовые модели, энкодеры SimCLR и MAE-style, а также дообученные варианты для бюджетов разметки 10%, 20% и 100% с несколькими случайными начальными значениями. Контрольные точки предназначены для исследований эффективности разметки, устойчивости, калибровки и выбора моделей.

В репозитории представлены разные архитектуры, включая ResNet50, EfficientNet-B0, MobileViT-XS и ViT-S/16. Важное ограничение MAE-вариантов: предобучен только слой встраивания патчей, а блоки трансформера и ряд других компонентов ViT остались случайно инициализированными. Эксперименты включают проверку на синтетических искажениях и внешнюю оценку на ChestMNIST, но не подтверждают переносимость на данные конкретных клиник.

Модели не являются медицинскими изделиями и не валидированы для клинического применения; их нельзя использовать для постановки диагноза или выбора лечения. Для предобучения SimCLR и MAE использовался один запуск, а сравнение этих методов не является вычислительно сопоставимым. Лицензия репозитория — MIT, однако наборы исходных изображений регулируются отдельными условиями поставщиков.

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

  • классификация рентгенограмм грудной клетки на шесть диагностических категорий в исследовательских экспериментах
  • сравнение моделей при бюджетах разметки 10%, 20% и 100%
  • оценка калибровки классификаторов медицинских изображений
  • исследование устойчивости классификации к синтетическим искажениям рентгенограмм
  • сравнение переноса моделей на внешний набор ChestMNIST

Ограничения

Модели не валидированы для клинического применения и не должны использоваться для диагностики или лечения. Предобучение SimCLR и MAE выполнено по одному разу; MAE-варианты фактически имеют предобученный только слой встраивания патчей, а блоки трансформера случайно инициализированы.

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

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

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

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

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

Открыть на Hugging Face

ChestX6-SSL-Benchmark Checkpoints

This repository hosts the pretrained and fine-tuned model checkpoints accompanying the manuscript:

"A Deployment Risk Score Framework for Self-Supervised Chest X-Ray Classification: Calibrated Multi-Objective Evaluation Under Annotation Scarcity and Distribution Shift"

Authors: Kashif Mahmood, Romana Aziz, Muhammad Ramzan, Mahwish Ilyas, and Ala Saleh Alluhaidan

Research use only. These models are not medical devices, have not been validated for clinical use, and must not be used to inform diagnosis or treatment.

Overview

The checkpoints correspond to the experiments performed on the ChestX6 dataset and include:

  • Five supervised baseline models (including ViT-S/16 trained from scratch, the architecture-matched control for MAE)
  • SimCLR self-supervised pretrained encoder
  • MAE-style pretrained encoder (patch-embedding layer only; see the note below)
  • SimCLR and MAE-style encoders pretrained on the training partition only (ssl_trainonly_data/), used for the evaluation-independence sensitivity analysis
  • Fine-tuned SimCLR models
  • Fine-tuned MAE models

Models are provided for 10%, 20%, and 100% labeled-data settings with three random seeds (42, 123, 456) for each configuration. SimCLR and MAE were each pretrained once; only fine-tuning was repeated across seeds.

ModelPretrainingFolder
ResNet50 (Scratch)Nonesupervised/
ResNet50 (ImageNet)Supervised ImageNetsupervised/
EfficientNet-B0Supervised ImageNetsupervised/
MobileViT-XSSupervised ImageNetsupervised/
ViT-S/16 (Scratch)None (architecture-matched control for MAE)supervised/
SimCLR + ResNet50Contrastive SSL (ChestX6)finetuned/ (encoder in ssl/; training-partition-only encoder in ssl_trainonly_data/)
MAE + ViT-S/16MAE-style SSL (ChestX6); only the patch-embedding layer was pretrainedfinetuned/ (encoder in ssl/; training-partition-only encoder in ssl_trainonly_data/)

What the "MAE" checkpoints contain. In the pretraining code used for the paper the visible patch embeddings were passed directly to the decoder, so the ViT's transformer blocks, class token, positional embedding and final norm were not part of the pretraining forward pass and were not updated. The mae_vits16 checkpoints therefore have a pretrained patch-embedding layer and randomly initialised transformer blocks, as in vit_s16_scratch. They do not represent masked-reconstruction pretraining of a full ViT encoder. A corrected implementation (not used for the paper's results) is in the GitHub repository under scripts/. For SimCLR, the NT-Xent loss was computed inside micro-batches of 64 images (126 negatives per anchor), not over the effective batch of 256.

Repository Structure

supervised/
    ResNet50 (Scratch)
    ResNet50 (ImageNet)
    EfficientNet-B0
    MobileViT-XS
    ViT-S/16 (Scratch)

ssl/
    SimCLR pretrained encoder (.pth)
    MAE-style pretrained encoder (.pth; patch-embedding layer pretrained, see note above)
    SimCLR ResNet50 Encoder (.pth)
    SimCLR log loss (.json)

ssl_trainonly_data/
    MAE-style pretrained encoder - training data only (.pth; patch-embedding layer pretrained, see note above)
    SimCLR pretrained encoder - training data only (.pth)
    SimCLR log loss (.json)

finetuned/
    SimCLR fine-tuned models (.pt)
    MAE fine-tuned models (.pt)

Supervised and fine-tuned checkpoints are named {model_name}_{subset}_seed{seed}_best.pt, where subset identifies the label budget (10%, 20% or 100%) and model_name is one of resnet50_scratch, resnet50_pretrained, efficientnet_b0, mobilevit_xs, vit_s16_scratch, simclr_resnet50 or mae_vits16.

Dataset

The experiments use ChestX6, a six-class chest X-ray benchmark (Covid-19, Emphysema, Normal, Pneumonia-Bacterial, Pneumonia-Viral, Tuberculosis). ChestX6 is a compilation of two independently verified public sources; it is not hosted as a standalone dataset. No images are included in this repository.

A further 0.3% matched the curated dataset of Sait et al. and the COVID-19 Radiography Database. The source datasets remain under their providers' terms; see the licence table in the GitHub repository (data/README.md).

18,036 images were collected. During preprocessing, 48 exact duplicates were removed (MD5 audit), resulting in 17,988 unique images used in all experiments (split 70/10/20, seed 42, stratified).

Cross-dataset evaluation uses ChestMNIST (28×28 release, binary labels, derived from NIH ChestX-ray14) through the MedMNIST package. It is used as an external test set only. NIH ChestX-ray14 was provided by the NIH Clinical Center.

Loading

The checkpoints store PyTorch model weights (torch.load(path)["model_state"] for supervised and fine-tuned models). Use the pinned revision below so you get exactly the files used in the paper:

import torch, timm, torchvision
from huggingface_hub import list_repo_files, hf_hub_download

REPO = "Kashif-Mahmood007/chestx6-ssl-checkpoints"
REV  = "1764b2409e06a91e81eda0f8bfe0c8ae4e199a38"          # the revision cited in the paper

print(list_repo_files(REPO, revision=REV))   # every file at this revision

# Pick a file from the listing (adjust the filter to choose the model, budget and seed)
files = list_repo_files(REPO, revision=REV)
fname = next(f for f in files if "simclr_resnet50" in f and "seed42" in f and f.endswith(".pt"))
path  = hf_hub_download(REPO, filename=fname, revision=REV)


def build(model_name, num_classes=6):
    """Architectures as defined in the repository notebooks (NB2/NB3)."""
    if model_name in ("resnet50_scratch", "resnet50_pretrained"):
        m = torchvision.models.resnet50(weights=None)
        m.fc = torch.nn.Linear(2048, num_classes)
        return m
    if model_name == "efficientnet_b0":
        return timm.create_model("efficientnet_b0", pretrained=False, num_classes=num_classes)
    if model_name == "mobilevit_xs":
        return timm.create_model("mobilevit_xs", pretrained=False, num_classes=num_classes)
    if model_name == "vit_s16_scratch":
        return timm.create_model("vit_small_patch16_224", pretrained=False, num_classes=num_classes)
    if model_name == "simclr_resnet50":
        enc = torchvision.models.resnet50(weights=None)
        enc.fc = torch.nn.Identity()
        return torch.nn.Sequential(enc, torch.nn.Linear(2048, num_classes))
    if model_name == "mae_vits16":
        enc = timm.create_model("vit_small_patch16_224", pretrained=False, num_classes=0)
        return torch.nn.Sequential(enc, torch.nn.Linear(384, num_classes))
    raise ValueError(model_name)


model = build("simclr_resnet50")
model.load_state_dict(torch.load(path, map_location="cpu")["model_state"])
model.eval()

Refer to the accompanying GitHub repository for the complete training pipeline, preprocessing and normalisation, configuration files, and evaluation code.

Intended use and limitations

  • Intended for research on label efficiency, robustness, calibration and model selection. Not a medical device and not validated for clinical use.
  • Retrospective comparison on public datasets; results do not establish performance on any hospital's data.
  • SimCLR and MAE pretraining each ran once, so pretraining-to-pretraining variance is not captured; seed variation reflects fine-tuning only.
  • The SimCLR and MAE pipelines differ in backbone, objective, epochs and updates and are not compute-matched; differences between them are differences between pipelines, not effects of the pretraining objective. The MAE pipeline pretrained only the patch-embedding layer (see the note above).
  • Robustness was tested against eight synthetic image perturbations, and external-dataset transfer against ChestMNIST (28×28 images, upsampled; binary labels). Neither isolates the effect of scanner or acquisition differences.
  • Checkpoints were trained on public datasets whose licences differ from this repository's; check that your intended use is compatible with the source terms.

GitHub Repository

The complete source code, training pipeline, notebooks, configuration files, dataset split definitions, and reproduction instructions are available on GitHub:

Repository: ChestX6-SSL-Benchmark

The archived release used for the paper is available at Zenodo: https://doi.org/10.5281/zenodo.23288310 (release v1.1.0-scirep).

The GitHub repository includes:

  • End-to-end training and evaluation notebooks
  • Fixed train/validation/test split definitions, MD5 checksums and the group-respecting Tuberculosis split
  • Experiment results and manuscript figures
  • Instructions for reproducing all experiments reported in the accompanying manuscript

Persistent identifiers

Citation

If you use these checkpoints, please cite the associated manuscript.

@unpublished{mahmood2026drs,
  title  = {A Deployment Risk Score Framework for Self-Supervised Chest X-Ray Classification: Calibrated Multi-Objective Evaluation Under Annotation Scarcity and Distribution Shift},
  author = {Kashif Mahmood and Romana Aziz and Muhammad Ramzan and Mahwish Ilyas and Ala Saleh Alluhaidan},
  note   = {Manuscript under revision at Scientific Reports},
  year   = {2026}
}

License

MIT License (code and model checkpoints). No image data is included. The datasets used for training remain under their providers' terms, and some of those terms may restrict derivative or commercial use of models trained on the data: check them before any use beyond research on this benchmark.

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

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

GPU в ailist

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

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

В репозитории нет config.json: не понять архитектуру модели.

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

0 моделей