Zum Inhalt springen
ModelAufgelistetExtern
Herunterladen

Lapvqa Pretrain Contrastive

Part of the LAPVQA collection.

ArtOtherVersionEncoder finalCBewertung

Modellquelle

Art
Other
Dateigröße
1,13–1,30 GB
Version
vEncoder final
Aktualisiert
9. Okt. 2026
Quelle
Hugging Face

Quellenbeschreibung

LAPVQA — Pretrain (Contrastive)

Part of the LAPVQA collection.

Description

A ViT-L/14 vision encoder trained from scratch on MIMIC-CXR chest X-ray / report pairs using InfoNCE contrastive learning (image encoder vs. 6-layer bidirectional text encoder). The encoder is intended to be used as a frozen feature extractor for downstream CXR tasks.

Architecture

ComponentDetail
Vision backboneViT-L/14, 24-layer, 1024-dim, 16-head, patch 14, 384 px
Text encoder6-layer, 512-dim bidirectional transformer, GPT-2 vocab (50 257)
ProjectionLinear → 512-dim shared embedding space
LossInfoNCE (symmetric softmax cross-entropy)
Training dataMIMIC-CXR (physionet.org/content/mimic-cxr)
Epochs50

Downstream Evaluation (frozen encoder + linear probe)

DatasetMean AUC
NIH CXR-14 (14-class)0.653
CheXpert-5 (5-class)0.759

Files

FileDescription
encoder_final.ptVision encoder weights at the end of training
model_best.ptFull model (encoder + text encoder) at best val loss

Usage

import torch
from lapvqa.pretrain.model import ContrastiveModel

ckpt = torch.load("encoder_final.pt", map_location="cpu")
model = ContrastiveModel()
model.vision_encoder.load_state_dict(ckpt)
model.eval()

Citation

If you use these weights please cite MIMIC-CXR:

@article{johnson2019mimic,
  title   = {MIMIC-CXR, a de-identified publicly available database of chest radiographs with free-text reports},
  author  = {Johnson, Alistair EW and others},
  journal = {Scientific data},
  volume  = {6}, pages = {317}, year = {2019}
}

Quellen

1 Quelle
Hugging FacePrimärVersion cb2cc6a66bebf580ef05f16d297dfb4a879bcafd
huggingface.co/dmusingu/lapvqa-pretrain-contrastive/tree/cb2cc6a66bebf580ef05f16d297dfb4a879bcafd

Verifiziert 9. Okt.

Modellartefakte

7 Artefakte

encoder_final.pt

pt · 1,13 GB · SHA-256 4de81ab6ae0c…8cdb · Hugging Face

Herunterladen

model_best.pt

pt · 1,30 GB · SHA-256 be31dd99c7d1…3a54 · Hugging Face

Herunterladen

model_epoch010.pt

pt · 1,30 GB · SHA-256 16fb3c581604…01df · Hugging Face

Herunterladen

model_epoch020.pt

pt · 1,30 GB · SHA-256 374da8865a2d…a28c · Hugging Face

Herunterladen

model_epoch030.pt

pt · 1,30 GB · SHA-256 46692a13b9a3…a4b3 · Hugging Face

Herunterladen

model_epoch040.pt

pt · 1,30 GB · SHA-256 6f76543213fc…9114 · Hugging Face

Herunterladen

model_epoch050.pt

pt · 1,30 GB · SHA-256 c2e745fae4f0…007a · Hugging Face

Herunterladen

Quellenauszüge

2 Auszüge

--- tags: - chest-xray - radiology - contrastive-learning - mimic-cxr - vision-encoder license: apache-2.0 --- # LAPVQA — Pretrain (Contrastive) Part of the [LAPVQA collection](https://huggingface.co/collections/dmusingu/lapvqa). ## Description A **ViT-L/14** vision encoder trained from scratch on [MIMIC-CXR](https://physionet.org/content/mimic-cxr) chest X-ray / report pairs using **InfoNCE contrastive learning** (image encoder vs. 6-layer bidirectional text encoder). The encoder is intended to be used as a frozen feature extractor for downstream CXR tasks. ## Architecture | Component | Detail | |---|---| | Vision backbone | ViT-L/14, 24-layer, 1024-dim, 16-head, patch 14, 384 px | | Text encoder | 6-layer, 512-dim bidirectional transformer, GPT-2 vocab (50 257) | | Projection | Linear → 512-dim shared embedding space | | Loss | InfoNCE (symmetric softmax cross-entropy) | | Training data | MIMIC-CXR (physionet.org/content/mimic-cxr) | | Epochs | 50 | ## Downstream Evaluation (frozen encoder + linear probe) | Dataset | Mean AUC | |---|---| | NIH CXR-14 (14-class) | 0.653 | | CheXpert-5 (5-class) | 0.759 | ## Files | File | Description | |---|---| | `encoder_final.pt` | Vision encoder weights at the end of training | | `model_best.pt` | Full model (encoder + text encoder) at best val loss | ## Usage ```python import torch from lapvqa.pretrain.model import ContrastiveModel ckpt = torch.load("encoder_final.pt", map_location="cpu") model = ContrastiveModel() model.vision_encoder.load_state_dict(ckpt) model.eval() ``` ## Citation If you use these weights please cite MIMIC-CXR: ```bibtex @article{johnson2019mimic, title = {MIMIC-CXR, a de-identified publicly available database of chest radiographs with free-text reports}, author = {Johnson, Alistair EW and others}, journal = {Scientific data}, volume = {6}, pages = {317}, year = {2019} } ```

Source context: 0 downloads · 0 likes · Repo dmusingu/lapvqa-pretrain-contrastive