dmusingu commited on
Commit
d55f16f
·
verified ·
1 Parent(s): 8b5790b

Add classification AUC results (NIH 0.686, CheXpert 0.808)

Browse files
Files changed (1) hide show
  1. README.md +27 -8
README.md CHANGED
@@ -16,9 +16,10 @@ Part of the [LAPVQA collection](https://huggingface.co/collections/dmusingu/lapv
16
 
17
  A **ViT-L/14 encoder + 6-layer causal decoder** trained from scratch on [MIMIC-CXR](https://physionet.org/content/mimic-cxr)
18
  to generate full radiology reports from chest X-ray images.
19
- Unlike the contrastive pretrain variants, this model uses a generative objective, forcing the encoder
20
  to retain fine-grained spatial information sufficient for region-level text generation.
21
- The encoder weights from this model serve as the strongest feature extractor in the LAPVQA downstream tasks.
 
22
 
23
  ## Architecture
24
 
@@ -29,22 +30,22 @@ The encoder weights from this model serve as the strongest feature extractor in
29
  | Loss | Cross-entropy over report tokens |
30
  | Training data | MIMIC-CXR (physionet.org/content/mimic-cxr) |
31
 
32
- ## Downstream Evaluation (frozen encoder)
33
 
34
  | Dataset | Mean AUC |
35
  |---|---|
36
- | NIH CXR-14 (14-class, linear probe) | — |
37
- | CheXpert-5 (5-class, linear probe) | — |
38
 
39
- The `encoder_final.pt` is used as a drop-in replacement for off-the-shelf encoders in the
40
- VQA, DiffVQA, and RRG downstream repos in this collection.
41
 
42
  ## Files
43
 
44
  | File | Description |
45
  |---|---|
46
  | `encoder_final.pt` | Vision encoder weights (used as frozen feature extractor downstream) |
47
- | `model_best.pt` | Full encoder + decoder at best validation CIDEr |
48
 
49
  ## Usage
50
 
@@ -56,4 +57,22 @@ ckpt = torch.load("model_best.pt", map_location="cpu")
56
  model = CaptioningModel()
57
  model.load_state_dict(ckpt)
58
  model.eval()
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
59
  ```
 
16
 
17
  A **ViT-L/14 encoder + 6-layer causal decoder** trained from scratch on [MIMIC-CXR](https://physionet.org/content/mimic-cxr)
18
  to generate full radiology reports from chest X-ray images.
19
+ Unlike the contrastive pretrain variants, the generative objective forces the encoder
20
  to retain fine-grained spatial information sufficient for region-level text generation.
21
+ The encoder weights (`encoder_final.pt`) serve as the strongest feature extractor
22
+ in the LAPVQA downstream tasks.
23
 
24
  ## Architecture
25
 
 
30
  | Loss | Cross-entropy over report tokens |
31
  | Training data | MIMIC-CXR (physionet.org/content/mimic-cxr) |
32
 
33
+ ## Downstream Evaluation (frozen encoder + linear probe)
34
 
35
  | Dataset | Mean AUC |
36
  |---|---|
37
+ | NIH CXR-14 (14-class) | 0.686 |
38
+ | CheXpert-5 (5-class) | 0.808 |
39
 
40
+ The captioning-pretrained encoder matches or exceeds the contrastive variants on both
41
+ classification benchmarks, and is the best-performing encoder on DiffVQA when used downstream.
42
 
43
  ## Files
44
 
45
  | File | Description |
46
  |---|---|
47
  | `encoder_final.pt` | Vision encoder weights (used as frozen feature extractor downstream) |
48
+ | `model_best.pt` | Full encoder + decoder at best validation loss |
49
 
50
  ## Usage
51
 
 
57
  model = CaptioningModel()
58
  model.load_state_dict(ckpt)
59
  model.eval()
60
+
61
+ # To use only the encoder as a feature extractor:
62
+ enc_weights = torch.load("encoder_final.pt", map_location="cpu")
63
+ model.vision_encoder.load_state_dict(enc_weights)
64
+ # vis_tokens = model.vision_encoder(images) # [B, 256, 1024]
65
+ ```
66
+
67
+ ## Citation
68
+
69
+ If you use these weights please cite MIMIC-CXR:
70
+
71
+ ```bibtex
72
+ @article{johnson2019mimic,
73
+ title = {MIMIC-CXR, a de-identified publicly available database of chest radiographs with free-text reports},
74
+ author = {Johnson, Alistair EW and others},
75
+ journal = {Scientific data},
76
+ volume = {6}, pages = {317}, year = {2019}
77
+ }
78
  ```