Alex Rudaev commited on
Commit
ddeab2a
Β·
verified Β·
1 Parent(s): e48a7b2

Upload trained artifacts for CheXVision-DenseNet_best

Browse files
CheXVision-DenseNet_best.pth CHANGED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:210af571ca3547a291d223bd7d7db69bb47fd9f86776e5953d43c944002705d1
3
  size 90799934
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:2f1eeba89970750eb60ddde6f632cdc118387bc2dae24851237f5ddd5edae552
3
  size 90799934
CheXVision-DenseNet_history.json CHANGED
@@ -1,193 +1,178 @@
1
  {
2
  "train_combined_loss": [
3
- 1.6672315075840674,
4
- 1.5855173580852941,
5
- 1.5592198361614762,
6
- 1.5487742443822377,
7
- 1.533348664671953,
8
- 1.4505101817281314,
9
- 1.3638684952117206,
10
- 1.316138303984273,
11
- 1.2747185356704045,
12
- 1.2536927706695355,
13
- 1.2161953345301897,
14
- 1.1947136731435395,
15
- 1.1737130679064811,
16
- 1.1437108072042954,
17
- 1.1315052007425501,
18
- 1.0931171274693912,
19
- 1.0797928709645324,
20
- 1.0535829408666761,
21
- 1.0339203987348555,
22
- 1.0123691707543776,
23
- 0.9922952853023982,
24
- 0.9697442016838318,
25
- 0.9479500066319303,
26
- 0.929807168565718,
27
- 0.9069501622367894,
28
- 0.8852634037622038,
29
- 0.8630635451722644,
30
- 0.8424824115116674,
31
- 0.8241272588880717,
32
- 0.8091002300008673,
33
- 0.7876492881192797,
34
- 0.7686443214270733,
35
- 0.7624713006961722,
36
- 0.7363042086179402,
37
- 0.7175544890459317,
38
- 0.7050837610019344
39
  ],
40
  "val_multilabel_loss": [
41
- 1.391814619525155,
42
- 1.283202405963371,
43
- 1.2938397450011168,
44
- 1.2598822928631483,
45
- 1.3111022481722618,
46
- 1.120403200276752,
47
- 1.0895566791296005,
48
- 1.0482562256615553,
49
- 1.0301720525012976,
50
- 1.0071450451861566,
51
- 1.0157255721625997,
52
- 1.0664474278021214,
53
- 1.0315355224840677,
54
- 1.0951378871478252,
55
- 1.0552206663831847,
56
- 1.12130986259722,
57
- 1.1844406880215923,
58
- 1.1695454004429169,
59
- 1.1427133676609886,
60
- 1.3337842680291454,
61
- 1.2761257038966043,
62
- 1.3477276124393762,
63
- 1.4940743329587267,
64
- 1.432857816510681,
65
- 1.478143415455498,
66
- 1.6065110461925394,
67
- 1.6522386216961626,
68
- 1.6714662681542225,
69
- 1.7583297681786232,
70
- 1.7841808852086316,
71
- 1.9259776598426388,
72
- 2.022275798523159,
73
- 1.8677154017139728,
74
- 2.1781055077966025,
75
- 2.192373887399462,
76
- 2.322838868278621
77
  ],
78
  "auc_roc_macro": [
79
- 0.6635553597144401,
80
- 0.690126818990662,
81
- 0.7026300567030394,
82
- 0.7077785989256415,
83
- 0.711531048074537,
84
- 0.7884057869255211,
85
- 0.8021787817203794,
86
- 0.814737617673185,
87
- 0.8232630495706772,
88
- 0.8266807519355579,
89
- 0.8319172216627019,
90
- 0.8329888755089002,
91
- 0.8364486455486551,
92
- 0.8358844517172852,
93
- 0.8353378578162786,
94
- 0.837478089176452,
95
- 0.8371722614661935,
96
- 0.8366371728390217,
97
- 0.8363548498608308,
98
- 0.8309555435736067,
99
- 0.8379018091976481,
100
- 0.8353094618382422,
101
- 0.8346713502632593,
102
- 0.8333661694942792,
103
- 0.8270327159929527,
104
- 0.8285016427003444,
105
- 0.8328671362178695,
106
- 0.8247545045846307,
107
- 0.8253445609203451,
108
- 0.8222061501407109,
109
- 0.8264586846654272,
110
- 0.8211011657453662,
111
- 0.8227619132716918,
112
- 0.819875838158984,
113
- 0.822493469671855,
114
- 0.8206557370930729
115
  ],
116
  "binary_auc_roc": [
117
- 0.6870642716723607,
118
- 0.692933835525465,
119
- 0.6967256315448201,
120
- 0.6980588299501597,
121
- 0.7025153760759218,
122
- 0.7504576233083851,
123
- 0.7631432081349477,
124
- 0.7672587640999193,
125
- 0.7734587558518294,
126
- 0.7727159514698523,
127
- 0.7748166929238337,
128
- 0.777404054877591,
129
- 0.7794176086411293,
130
- 0.7776481636008651,
131
- 0.7791180830631972,
132
- 0.7818484137779861,
133
- 0.7831136719039797,
134
- 0.778543994706878,
135
- 0.7813867280611452,
136
- 0.779365441713236,
137
- 0.7822723331044937,
138
- 0.7826895004279817,
139
- 0.7803191271189803,
140
- 0.7789640197245901,
141
- 0.7763517510045076,
142
- 0.7759058946723391,
143
- 0.7802235064289155,
144
- 0.7681305849711283,
145
- 0.7718824573211773,
146
- 0.7659790213865354,
147
- 0.7707724952646325,
148
- 0.7657138441725115,
149
- 0.7636363284882528,
150
- 0.7678690779330196,
151
- 0.7652841534243358,
152
- 0.7590750002409428
153
  ],
154
  "binary_f1": [
155
- 0.566632608378339,
156
- 0.46118233618233617,
157
- 0.5472200469851214,
158
- 0.5780633854242734,
159
- 0.5602102334209306,
160
- 0.6342440280360463,
161
- 0.6325553560742071,
162
- 0.6478433598183881,
163
- 0.6447831184056272,
164
- 0.6640504555010511,
165
- 0.6568115942028986,
166
- 0.6500074371560315,
167
- 0.6337423312883436,
168
- 0.659067955561968,
169
- 0.6592718998862344,
170
- 0.6584266395230478,
171
- 0.6588473790906458,
172
- 0.6467065868263473,
173
- 0.6542443064182195,
174
- 0.6474195961106955,
175
- 0.6527531083481349,
176
- 0.6677178899082569,
177
- 0.6450067375355593,
178
- 0.6477442485808187,
179
- 0.6679819616685456,
180
- 0.655732903792649,
181
- 0.6640904536997281,
182
- 0.6571672841265318,
183
- 0.6612788884162768,
184
- 0.6417780360255665,
185
- 0.6576781152426909,
186
- 0.647710702828813,
187
- 0.6529738981600343,
188
- 0.6508858553586988,
189
- 0.6578947368421053,
190
- 0.6380883417813179
191
  ],
192
  "learning_rate": [
193
  9.99314767377287e-05,
@@ -222,9 +207,6 @@
222
  5.0866619006049974e-05,
223
  4.820446585952285e-05,
224
  4.5549609489726355e-05,
225
- 4.29093266734333e-05,
226
- 4.029085424231934e-05,
227
- 3.7701369247310385e-05,
228
- 3.514796928678483e-05
229
  ]
230
  }
 
1
  {
2
  "train_combined_loss": [
3
+ 1.6598473385907424,
4
+ 1.5830327354236249,
5
+ 1.5553311379405674,
6
+ 1.5415173049852202,
7
+ 1.5357806354935406,
8
+ 1.4412867880006979,
9
+ 1.355397817885997,
10
+ 1.2959734734185624,
11
+ 1.2534208430367715,
12
+ 1.2243307756438333,
13
+ 1.1978191353607706,
14
+ 1.174424354536198,
15
+ 1.1507222607305285,
16
+ 1.1218578077786223,
17
+ 1.0995111339970638,
18
+ 1.0757077404740187,
19
+ 1.0526542515892658,
20
+ 1.027616428151135,
21
+ 0.9989768041394681,
22
+ 0.9858670768351803,
23
+ 0.9625730427935439,
24
+ 0.9357865687589273,
25
+ 0.9066939661872684,
26
+ 0.8850516295682543,
27
+ 0.86539619569413,
28
+ 0.8415834151641814,
29
+ 0.8196068031672662,
30
+ 0.7928312671811957,
31
+ 0.7708154530589784,
32
+ 0.7589645949775676,
33
+ 0.7333919059940396,
34
+ 0.7248045627099986,
35
+ 0.7015012232624006
 
 
 
36
  ],
37
  "val_multilabel_loss": [
38
+ 1.3684325010335745,
39
+ 1.273744741574723,
40
+ 1.2722729785936553,
41
+ 1.2508044130995828,
42
+ 1.2824201090496128,
43
+ 1.1325552607116913,
44
+ 1.0886743135896384,
45
+ 1.0846356999556892,
46
+ 1.0255855882869047,
47
+ 1.0074244260120124,
48
+ 1.0599090279567809,
49
+ 1.028928539749621,
50
+ 1.0678984710231882,
51
+ 1.0938552342960481,
52
+ 1.0641108942048556,
53
+ 1.1280811198201834,
54
+ 1.188532403787645,
55
+ 1.1011257420818346,
56
+ 1.261020954792239,
57
+ 1.25418298025759,
58
+ 1.3895246052399737,
59
+ 1.4935915688423216,
60
+ 1.5813781504287105,
61
+ 1.5221532097801107,
62
+ 1.5584234548550027,
63
+ 1.7118924613885518,
64
+ 1.7202977810253282,
65
+ 1.7771419114341922,
66
+ 1.8976082765087694,
67
+ 2.086397220106686,
68
+ 2.090599572499927,
69
+ 2.2298203323777317,
70
+ 2.2470968332277295
 
 
 
71
  ],
72
  "auc_roc_macro": [
73
+ 0.6748690781254583,
74
+ 0.6963303048898386,
75
+ 0.7041644252113736,
76
+ 0.7115742873720903,
77
+ 0.7172102566996948,
78
+ 0.7905994114174624,
79
+ 0.810920922006727,
80
+ 0.8211061947914529,
81
+ 0.83170534782002,
82
+ 0.8353719186085854,
83
+ 0.836936856831387,
84
+ 0.8415721432417781,
85
+ 0.8417229334900547,
86
+ 0.8437255116407735,
87
+ 0.8441203725443387,
88
+ 0.8446463492148011,
89
+ 0.8439425516705368,
90
+ 0.8458609069545974,
91
+ 0.8328883076496458,
92
+ 0.8378938406822314,
93
+ 0.8377455127591313,
94
+ 0.8353224748952416,
95
+ 0.8336654948819363,
96
+ 0.836216788026232,
97
+ 0.8317317809998471,
98
+ 0.8307567269501813,
99
+ 0.8338350893281437,
100
+ 0.8257617060309652,
101
+ 0.8323103592175635,
102
+ 0.823613606896898,
103
+ 0.8277971314431126,
104
+ 0.8235523396677928,
105
+ 0.8248399844979165
 
 
 
106
  ],
107
  "binary_auc_roc": [
108
+ 0.6852069105097925,
109
+ 0.6944432584079528,
110
+ 0.6968134916339042,
111
+ 0.6981791893068893,
112
+ 0.7028733162857863,
113
+ 0.7519753951406647,
114
+ 0.7657410202842497,
115
+ 0.7688664972670358,
116
+ 0.7775251986994017,
117
+ 0.7699077625957635,
118
+ 0.775582414892823,
119
+ 0.7818246556926725,
120
+ 0.7813333003857998,
121
+ 0.7800880741359846,
122
+ 0.7846549776886924,
123
+ 0.7852866121620329,
124
+ 0.7859527630989419,
125
+ 0.7835151499258456,
126
+ 0.7817557348319755,
127
+ 0.7844497280035431,
128
+ 0.7867184010181012,
129
+ 0.7859603836168727,
130
+ 0.7794227917139867,
131
+ 0.7823948497401964,
132
+ 0.7756213019475579,
133
+ 0.7772615623989301,
134
+ 0.7810689916866874,
135
+ 0.7711492626364437,
136
+ 0.7740274370024111,
137
+ 0.7714149161328382,
138
+ 0.7731241254615177,
139
+ 0.7678977949583101,
140
+ 0.7626616866581988
 
 
 
141
  ],
142
  "binary_f1": [
143
+ 0.5229180116204003,
144
+ 0.48600377812124335,
145
+ 0.5525170913610938,
146
+ 0.5639213275968039,
147
+ 0.5333333333333333,
148
+ 0.6038617253192152,
149
+ 0.6256488549618321,
150
+ 0.6293939393939394,
151
+ 0.6291238299831211,
152
+ 0.6580948430803263,
153
+ 0.6537348002316156,
154
+ 0.6726382085374387,
155
+ 0.6544555894752144,
156
+ 0.6570020295737895,
157
+ 0.6666666666666666,
158
+ 0.6583592938733126,
159
+ 0.6644670778941328,
160
+ 0.6583053813621117,
161
+ 0.6550308008213552,
162
+ 0.6466686765149231,
163
+ 0.6628041714947857,
164
+ 0.6636588560617086,
165
+ 0.6411729141475212,
166
+ 0.663972286374134,
167
+ 0.6735582154515778,
168
+ 0.6535260621988611,
169
+ 0.6587392550143266,
170
+ 0.6628342245989305,
171
+ 0.6581698410425318,
172
+ 0.6386006522383635,
173
+ 0.6629619338705196,
174
+ 0.6505338078291815,
175
+ 0.6378552593026663
 
 
 
176
  ],
177
  "learning_rate": [
178
  9.99314767377287e-05,
 
207
  5.0866619006049974e-05,
208
  4.820446585952285e-05,
209
  4.5549609489726355e-05,
210
+ 4.29093266734333e-05
 
 
 
211
  ]
212
  }
README.md CHANGED
@@ -1,111 +1,167 @@
1
- ---
2
- license: mit
3
- language:
4
- - en
5
- library_name: pytorch
6
- pipeline_tag: image-classification
7
- tags:
8
- - chexvision
9
- - medical-imaging
10
- - chest-xray
11
- - radiology
12
- - pytorch
13
- - multi-label-classification
14
- datasets:
15
- - HlexNC/chest-xray-14
16
- ---
17
-
18
- # CheXVision-DenseNet
19
-
20
- > **CheXVision** β€” Deep Learning & Big Data university project.
21
- > 14-class chest X-ray pathology detection + binary normal/abnormal classification
22
- > on the NIH Chest X-ray14 dataset (112,120 images).
23
-
24
- ## Architecture
25
-
26
- <p align="center">
27
- <img src="https://huggingface.co/HlexNC/chexvision-densenet/resolve/main/arch_densenet.png" width="88%" alt="DenseNet Architecture"/>
28
- </p>
29
-
30
- ## Fine-Tuning Strategy
31
-
32
- <p align="center">
33
- <img src="https://huggingface.co/HlexNC/chexvision-densenet/resolve/main/finetuning_densenet.png" width="62%" alt="Fine-Tuning Strategy"/>
34
- </p>
35
-
36
- ## Training Pipeline
37
-
38
- <p align="center">
39
- <img src="https://huggingface.co/HlexNC/chexvision-densenet/resolve/main/pipeline_training.png" width="42%" alt="Training Pipeline"/>
40
- </p>
41
-
42
- ## Training Metrics
43
-
44
- - Best validation macro AUC-ROC: `0.8379`
45
- - Best validation binary AUC-ROC: `0.7831`
46
- - Best validation binary F1: `0.6680`
47
- - Best checkpoint epoch: `21`
48
-
49
-
50
- ## Per-Class AUC-ROC at Best Epoch
51
-
52
- | Pathology | AUC-ROC | Visual |
53
- |----------------------|----------|---------------|
54
- | Atelectasis | `0.8178` | `β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–‘β–‘` |
55
- | Cardiomegaly | `0.8996` | `β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–‘` |
56
- | Effusion | `0.8888` | `β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–‘` |
57
- | Infiltration | `0.7083` | `β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–‘β–‘β–‘` |
58
- | Mass | `0.8910` | `β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–‘` |
59
- | Nodule | `0.7837` | `β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–‘β–‘` |
60
- | Pneumonia | `0.7181` | `β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–‘β–‘β–‘` |
61
- | Pneumothorax | `0.8731` | `β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–‘` |
62
- | Consolidation | `0.8128` | `β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–‘β–‘` |
63
- | Edema | `0.8993` | `β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–‘` |
64
- | Emphysema | `0.8907` | `β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–‘` |
65
- | Fibrosis | `0.7994` | `β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–‘β–‘` |
66
- | Pleural_Thickening | `0.8311` | `β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–‘β–‘` |
67
- | Hernia | `0.9171` | `β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–‘` |
68
-
69
- ## Training Configuration
70
-
71
- - Repository: `HlexNC/chexvision-densenet`
72
- - Dataset: [HlexNC/chest-xray-14](https://huggingface.co/datasets/HlexNC/chest-xray-14) Β· revision `c4e9a86b`
73
- - Architecture: DenseNet-121 transfer learning with a shared feature layer and dual classification heads.
74
- - Platform: Kaggle GPU kernel (NVIDIA T4 / P100)
75
- - Batch size: `32` Γ— grad_accum `4` = **effective batch `128`**
76
- - AMP (fp16): `enabled`
77
- - Optimizer: AdamW Β· Scheduler: CosineAnnealingLR
78
- - Epochs configured: `60` Β· Early stop patience: `15`
79
-
80
- ## Intended Use
81
-
82
- This model is intended for research and educational work on automated chest X-ray pathology detection.
83
- It outputs two predictions per image:
84
- 1. **Multi-label scores** β€” independent sigmoid probability for each of 14 NIH pathologies
85
- 2. **Binary score** β€” sigmoid probability of any abnormality (Normal vs. Abnormal)
86
-
87
- ## Limitations
88
-
89
- - Not validated for clinical use. Predictions must not substitute professional medical judgment.
90
- - Trained on NIH Chest X-ray14, which contains noisy radiologist annotations (patient-level labels, not lesion-level).
91
- - Performance degrades on images from equipment, patient populations, or preprocessing pipelines
92
- that differ from the NIH training distribution.
93
- - Reported AUC metrics are on the validation split, not the held-out test set.
94
-
95
- ## CheXNet Benchmark Context
96
-
97
- CheXNet (Rajpurkar et al., 2017) β€” the seminal paper establishing DenseNet-121 for chest X-ray
98
- classification β€” reported **0.841 macro AUC-ROC** on a comparable split of this dataset.
99
- CheXVision-DenseNet matches this benchmark. See the
100
- [CheXVision demo](https://huggingface.co/spaces/HlexNC/chexvision-demo) for live inference.
101
-
102
- ## Citation
103
-
104
- ```bibtex
105
- @misc{chexvision2026,
106
- title={CheXVision: Dual-Task Chest X-ray Classification with Custom CNN and DenseNet-121},
107
- author={BIG D(ATA) Team},
108
- year={2026},
109
- howpublished={\url{https://huggingface.co/HlexNC/chexvision-densenet}}
110
- }
111
- ```
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ license: mit
3
+ language:
4
+ - en
5
+ library_name: pytorch
6
+ pipeline_tag: image-classification
7
+ tags:
8
+ - chexvision
9
+ - medical-imaging
10
+ - chest-xray
11
+ - radiology
12
+ - pytorch
13
+ - multi-label-classification
14
+ datasets:
15
+ - HlexNC/chest-xray-14-320
16
+ ---
17
+
18
+ # CheXVision-DenseNet
19
+
20
+ > **CheXVision** β€” Deep Learning & Big Data university project.
21
+ > 14-class chest X-ray pathology detection + binary normal/abnormal classification
22
+ > on the NIH Chest X-ray14 dataset (112,120 images).
23
+
24
+ ## Architecture
25
+
26
+ ```mermaid
27
+ graph LR
28
+ IN["Input
29
+ 3 Γ— 224 Γ— 224"] --> BB["DenseNet-121 Backbone
30
+ ImageNet pretrained
31
+ Dense connectivity
32
+ 7.9M parameters"]
33
+ BB --> GAP2["Adaptive Avg Pool
34
+ 1024-dim features"]
35
+ GAP2 --> FL["Feature Layer
36
+ Linear 1024β†’512
37
+ ReLU Β· Dropout(0.3)"]
38
+ FL --> MLH["Multilabel Head
39
+ Linear 512β†’14
40
+ sigmoid Β· 14 pathologies"]
41
+ FL --> BH["Binary Head
42
+ Linear 512β†’1
43
+ sigmoid Β· Normal/Abnormal"]
44
+ style MLH fill:#2e7d32,color:#fff
45
+ style BH fill:#1565c0,color:#fff
46
+ style IN fill:#37474f,color:#fff
47
+ style BB fill:#6a1b9a,color:#fff
48
+ ```
49
+
50
+ ## Fine-Tuning Strategy
51
+
52
+ ```mermaid
53
+ graph LR
54
+ P1["πŸ”’ Phase 1
55
+ Epochs 1–5
56
+ Backbone frozen
57
+ Train heads only
58
+ lr = 0.001"] -->|"Epoch 6
59
+ unfreeze_backbone()"| P2["πŸ”“ Phase 2
60
+ Epochs 6–60
61
+ End-to-end fine-tuning
62
+ All layers trainable
63
+ lr = 0.0001"]
64
+ style P1 fill:#e65100,color:#fff
65
+ style P2 fill:#6a1b9a,color:#fff
66
+ ```
67
+
68
+ ## Training Pipeline
69
+
70
+ ```mermaid
71
+ flowchart TD
72
+ DS[("πŸ—„οΈ HlexNC/chest-xray-14
73
+ 112,120 images Β· 36 shards Β· ~4.7 GB")]
74
+ DS -->|snapshot_download| PREP["πŸ“‚ data/images Β· data/labels.csv
75
+ train 78,468 Β· val 11,210 Β· test 22,442"]
76
+ PREP --> AUG["Augmentation Pipeline
77
+ HFlip Β· RotateΒ±15Β° Β· RandomAffine
78
+ ColorJitter Β· GaussianBlur Β· RandomErasing"]
79
+ AUG --> FWD["⚑ Model Forward Pass
80
+ torch.cuda.amp.autocast Β· fp16"]
81
+ FWD --> ML["multilabel_logits BΓ—14
82
+ WeightedBCE + pos_weight Β· 14 classes"]
83
+ FWD --> BIN["binary_logits BΓ—1
84
+ BCE Β· Normal vs. Abnormal"]
85
+ ML --> LOSS["Combined Loss
86
+ 1.0 Γ— multilabel + 0.5 Γ— binary"]
87
+ BIN --> LOSS
88
+ LOSS --> BACK["Backward Β· Grad Clip 1.0
89
+ Gradient Accumulation Γ—4 Β· eff. batch 128"]
90
+ BACK --> OPT["AdamW Β· CosineAnnealingLR
91
+ early stop patience = 15"]
92
+ OPT -->|"↑ best val AUC-ROC"| BEST["πŸ’Ύ Best Checkpoint
93
+ model_state Β· best_val_metrics Β· config"]
94
+ BEST -->|upload_model_artifacts| HUB["πŸ€— HF Hub
95
+ checkpoint Β· history.json Β· model card"]
96
+ ```
97
+
98
+ ## Training Metrics
99
+
100
+ - Best validation macro AUC-ROC: `0.8459`
101
+ - Best validation binary AUC-ROC: `0.7867`
102
+ - Best validation binary F1: `0.6736`
103
+ - Best checkpoint epoch: `18`
104
+
105
+
106
+ ## Per-Class AUC-ROC at Best Epoch
107
+
108
+ | Pathology | AUC-ROC | Visual |
109
+ |----------------------|----------|---------------|
110
+ | Atelectasis | `0.8334` | `β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–‘β–‘` |
111
+ | Cardiomegaly | `0.9010` | `β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–‘` |
112
+ | Effusion | `0.8873` | `β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–‘` |
113
+ | Infiltration | `0.7133` | `β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–‘β–‘β–‘` |
114
+ | Mass | `0.8756` | `β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–‘` |
115
+ | Nodule | `0.8084` | `β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–‘β–‘` |
116
+ | Pneumonia | `0.7397` | `β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–‘β–‘β–‘` |
117
+ | Pneumothorax | `0.8705` | `β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–‘` |
118
+ | Consolidation | `0.8063` | `β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–‘β–‘` |
119
+ | Edema | `0.9255` | `β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–‘` |
120
+ | Emphysema | `0.9107` | `β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–‘` |
121
+ | Fibrosis | `0.8085` | `β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–‘β–‘` |
122
+ | Pleural_Thickening | `0.8377` | `β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–‘β–‘` |
123
+ | Hernia | `0.9242` | `β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–‘` |
124
+
125
+ ## Training Configuration
126
+
127
+ - Repository: `HlexNC/chexvision-densenet`
128
+ - Dataset: [HlexNC/chest-xray-14-320](https://huggingface.co/datasets/HlexNC/chest-xray-14-320) Β· revision `44443e6ee968b3c6094b63f14a27698c40b50680`
129
+ - Architecture: DenseNet-121 transfer learning with a shared feature layer and dual classification heads.
130
+ - Platform: Kaggle GPU kernel (NVIDIA T4 / P100)
131
+ - Batch size: `24` Γ— grad_accum `4` = **effective batch `96`**
132
+ - AMP (fp16): `enabled`
133
+ - Optimizer: AdamW Β· Scheduler: CosineAnnealingLR
134
+ - Epochs configured: `60` Β· Early stop patience: `15`
135
+
136
+ ## Intended Use
137
+
138
+ This model is intended for research and educational work on automated chest X-ray pathology detection.
139
+ It outputs two predictions per image:
140
+ 1. **Multi-label scores** β€” independent sigmoid probability for each of 14 NIH pathologies
141
+ 2. **Binary score** β€” sigmoid probability of any abnormality (Normal vs. Abnormal)
142
+
143
+ ## Limitations
144
+
145
+ - Not validated for clinical use. Predictions must not substitute professional medical judgment.
146
+ - Trained on NIH Chest X-ray14, which contains noisy radiologist annotations (patient-level labels, not lesion-level).
147
+ - Performance degrades on images from equipment, patient populations, or preprocessing pipelines
148
+ that differ from the NIH training distribution.
149
+ - Reported AUC metrics are on the validation split, not the held-out test set.
150
+
151
+ ## CheXNet Benchmark Context
152
+
153
+ CheXNet (Rajpurkar et al., 2017) β€” the seminal paper establishing DenseNet-121 for chest X-ray
154
+ classification β€” reported **0.841 macro AUC-ROC** on a comparable split of this dataset.
155
+ CheXVision-DenseNet matches this benchmark. See the
156
+ [CheXVision demo](https://huggingface.co/spaces/HlexNC/chexvision-demo) for live inference.
157
+
158
+ ## Citation
159
+
160
+ ```bibtex
161
+ @misc{chexvision2026,
162
+ title={CheXVision: Dual-Task Chest X-ray Classification with Custom CNN and DenseNet-121},
163
+ author={BIG D(ATA) Team},
164
+ year={2026},
165
+ howpublished={\url{https://huggingface.co/HlexNC/chexvision-densenet}}
166
+ }
167
+ ```
training_config.json CHANGED
@@ -1,8 +1,8 @@
1
  {
2
  "seed": 42,
3
  "data": {
4
- "dataset_name": "HlexNC/chest-xray-14",
5
- "image_size": 224,
6
  "num_workers": 4,
7
  "pin_memory": true,
8
  "train_split": 0.7,
@@ -38,12 +38,12 @@
38
  "Hernia"
39
  ],
40
  "data_dir": "/kaggle/working/data",
41
- "hf_dataset_repo": "HlexNC/chest-xray-14",
42
- "hf_dataset_revision": "c4e9a86b38de3b1604afa6e9f514d156eb9d20bf"
43
  },
44
  "training": {
45
  "epochs": 60,
46
- "batch_size": 32,
47
  "learning_rate": 0.0001,
48
  "weight_decay": 0.0001,
49
  "optimizer": "adamw",
@@ -67,7 +67,7 @@
67
  "log_every_n_steps": 100
68
  },
69
  "huggingface": {
70
- "dataset_repo": "HlexNC/chest-xray-14",
71
  "scratch_model_repo": "HlexNC/chexvision-scratch",
72
  "transfer_model_repo": "HlexNC/chexvision-densenet",
73
  "space_repo": "HlexNC/chexvision-demo"
 
1
  {
2
  "seed": 42,
3
  "data": {
4
+ "dataset_name": "HlexNC/chest-xray-14-320",
5
+ "image_size": 320,
6
  "num_workers": 4,
7
  "pin_memory": true,
8
  "train_split": 0.7,
 
38
  "Hernia"
39
  ],
40
  "data_dir": "/kaggle/working/data",
41
+ "hf_dataset_repo": "HlexNC/chest-xray-14-320",
42
+ "hf_dataset_revision": "44443e6ee968b3c6094b63f14a27698c40b50680"
43
  },
44
  "training": {
45
  "epochs": 60,
46
+ "batch_size": 24,
47
  "learning_rate": 0.0001,
48
  "weight_decay": 0.0001,
49
  "optimizer": "adamw",
 
67
  "log_every_n_steps": 100
68
  },
69
  "huggingface": {
70
+ "dataset_repo": "HlexNC/chest-xray-14-320",
71
  "scratch_model_repo": "HlexNC/chexvision-scratch",
72
  "transfer_model_repo": "HlexNC/chexvision-densenet",
73
  "space_repo": "HlexNC/chexvision-demo"