moxeeeem commited on
Commit
b87f3c4
·
verified ·
1 Parent(s): 44982e0

Upload README.md with huggingface_hub

Browse files
Files changed (1) hide show
  1. README.md +23 -14
README.md CHANGED
@@ -5,6 +5,7 @@ tags:
5
  - CLIP
6
  - GPT-2
7
  - dermatology
 
8
  library_name: transformers
9
  license: other
10
  language:
@@ -12,20 +13,22 @@ language:
12
  pipeline_tag: image-to-text
13
  ---
14
 
15
- # moxeeeem/pubmedclip-gpt2-captioner
16
 
17
- **Dermatology image captioner**: CLIP encoder (DermLIP or PubMed-CLIP) learnable prefix GPT-2 (`gpt2-medium`).
 
 
18
  Trained in two stages: Stage A (META) for generalization and Stage B (SkinCAP) for style/terminology.
19
 
20
 
21
  ## Metrics
22
  **Stage A (META)**
23
- val_loss=1.0899 • PPL=2.97
24
- BLEU=36.7 • ROUGE-L=0.524 • CIDEr-D=0.13 • CLIP=25.3 • BERT_F1=0.531
25
 
26
  **Stage B (SKINCAP)**
27
- val_loss=1.2094 • PPL=3.35
28
- BLEU=8.9 • ROUGE-L=0.257 • CIDEr-D=0.10 • CLIP=28.6 • BERT_F1=0.346
29
 
30
  ## Inference
31
 
@@ -53,16 +56,22 @@ for c in caps:
53
  ## Files
54
  | File | Size | Check |
55
  |---|---:|---|
56
- | `best_stageA.pt` | 2 GB | sha256[:12]=9b49360b7643 |
57
- | `best_stageB.pt` | 2 GB | sha256[:12]=7f4e6a05fc14 |
58
- | `final_captioner_gpt2-medium_CLIPModel.json` | 868 B | sha256[:12]=7cabfec71541 |
59
- | `final_captioner_gpt2-medium_CLIPModel.pt` | 2 GB | sha256[:12]=b29fa622b77e |
60
- | `loss_pubmed_clip_b32.png` | 84 KB | sha256[:12]=7e1cabd2ad24 |
61
 
62
  ## Details
63
 
64
- - **Backbones**: GPT-2 (`gpt2-medium`), CLIP weights: `flaviagiammarino/pubmed-clip-vit-base-patch32`.
 
 
65
  - **Prefix tokens**: 32
66
- - **Prompt** (used at inference): `Describe the skin lesion concisely (morphology, color, scale, border, location) in one sentence.Conclude with the most likely diagnosis (1–3 words).`
 
 
 
 
67
 
68
- _Auto-generated on 2025-08-29 20:58 UTC._
 
5
  - CLIP
6
  - GPT-2
7
  - dermatology
8
+ - pubmedclip
9
  library_name: transformers
10
  license: other
11
  language:
 
13
  pipeline_tag: image-to-text
14
  ---
15
 
16
+ # PubMedCLIP + GPT-2 Dermatology Captioner
17
 
18
+ A dermatology image captioning model combining PubMedCLIP vision encoder with gpt2-medium language model. Trained on dermatological images for generating clinical descriptions of skin lesions.
19
+
20
+ **Architecture**: PubMedCLIP (ViT-B/32) → learnable prefix → GPT-2 (`gpt2-medium`).
21
  Trained in two stages: Stage A (META) for generalization and Stage B (SkinCAP) for style/terminology.
22
 
23
 
24
  ## Metrics
25
  **Stage A (META)**
26
+ val_loss=1.1222 • PPL=3.07
27
+ BLEU=36.6 • ROUGE-L=0.521 • CIDEr-D=0.10 • CLIP=34.7 • BERT_F1=0.526
28
 
29
  **Stage B (SKINCAP)**
30
+ val_loss=1.1997 • PPL=3.32
31
+ BLEU=9.3 • ROUGE-L=0.267 • CIDEr-D=0.12 • CLIP=40.5 • BERT_F1=0.348
32
 
33
  ## Inference
34
 
 
56
  ## Files
57
  | File | Size | Check |
58
  |---|---:|---|
59
+ | `best_stageA.pt` | 2 GB | sha256[:12]=4c3f773c92f9 |
60
+ | `best_stageB.pt` | 2 GB | sha256[:12]=2b1b7e6aaa8f |
61
+ | `final_captioner_gpt2-medium_TimmModel.json` | 899 B | sha256[:12]=40f3fb250eab |
62
+ | `final_captioner_gpt2-medium_TimmModel.pt` | 2 GB | sha256[:12]=799a4d1b831d |
63
+ | `loss_biomedclip_pubmedbert.png` | 112 KB | sha256[:12]=92c3b8dfdf7f |
64
 
65
  ## Details
66
 
67
+ - **Vision Encoder**: PubMedCLIP (ViT-B/32)
68
+ - **Language Model**: GPT-2 (`gpt2-medium`)
69
+ - **CLIP weights**: `hf-hub:microsoft/BiomedCLIP-PubMedBERT_256-vit_base_patch16_224`
70
  - **Prefix tokens**: 32
71
+ - **Training prompt**: `Describe the skin lesion concisely (morphology, color, scale, border, location) in one sentence.Conclude with the most likely diagnosis (1–3 words).`
72
+
73
+ ### Model Type Detection
74
+ - Detected as: `pubmedclip`
75
+ - Repository: `moxeeeem/pubmedclip-gpt2-captioner`
76
 
77
+ _Auto-generated on 2025-08-30 06:06 UTC._