Alex Rudaev commited on
Upload trained artifacts for CheXVision-DenseNet_best
Browse files- CheXVision-DenseNet_best.pth +1 -1
- CheXVision-DenseNet_history.json +166 -184
- README.md +167 -111
- training_config.json +6 -6
CheXVision-DenseNet_best.pth
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 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.
|
| 4 |
-
1.
|
| 5 |
-
1.
|
| 6 |
-
1.
|
| 7 |
-
1.
|
| 8 |
-
1.
|
| 9 |
-
1.
|
| 10 |
-
1.
|
| 11 |
-
1.
|
| 12 |
-
1.
|
| 13 |
-
1.
|
| 14 |
-
1.
|
| 15 |
-
1.
|
| 16 |
-
1.
|
| 17 |
-
1.
|
| 18 |
-
1.
|
| 19 |
-
1.
|
| 20 |
-
1.
|
| 21 |
-
|
| 22 |
-
|
| 23 |
-
0.
|
| 24 |
-
0.
|
| 25 |
-
0.
|
| 26 |
-
0.
|
| 27 |
-
0.
|
| 28 |
-
0.
|
| 29 |
-
0.
|
| 30 |
-
0.
|
| 31 |
-
0.
|
| 32 |
-
0.
|
| 33 |
-
0.
|
| 34 |
-
0.
|
| 35 |
-
0.
|
| 36 |
-
0.7363042086179402,
|
| 37 |
-
0.7175544890459317,
|
| 38 |
-
0.7050837610019344
|
| 39 |
],
|
| 40 |
"val_multilabel_loss": [
|
| 41 |
-
1.
|
| 42 |
-
1.
|
| 43 |
-
1.
|
| 44 |
-
1.
|
| 45 |
-
1.
|
| 46 |
-
1.
|
| 47 |
-
1.
|
| 48 |
-
1.
|
| 49 |
-
1.
|
| 50 |
-
1.
|
| 51 |
-
1.
|
| 52 |
-
1.
|
| 53 |
-
1.
|
| 54 |
-
1.
|
| 55 |
-
1.
|
| 56 |
-
1.
|
| 57 |
-
1.
|
| 58 |
-
1.
|
| 59 |
-
1.
|
| 60 |
-
1.
|
| 61 |
-
1.
|
| 62 |
-
1.
|
| 63 |
-
1.
|
| 64 |
-
1.
|
| 65 |
-
1.
|
| 66 |
-
1.
|
| 67 |
-
1.
|
| 68 |
-
1.
|
| 69 |
-
1.
|
| 70 |
-
|
| 71 |
-
|
| 72 |
-
2.
|
| 73 |
-
|
| 74 |
-
2.1781055077966025,
|
| 75 |
-
2.192373887399462,
|
| 76 |
-
2.322838868278621
|
| 77 |
],
|
| 78 |
"auc_roc_macro": [
|
| 79 |
-
0.
|
| 80 |
-
0.
|
| 81 |
-
0.
|
| 82 |
-
0.
|
| 83 |
-
0.
|
| 84 |
-
0.
|
| 85 |
-
0.
|
| 86 |
-
0.
|
| 87 |
-
0.
|
| 88 |
-
0.
|
| 89 |
-
0.
|
| 90 |
-
0.
|
| 91 |
-
0.
|
| 92 |
-
0.
|
| 93 |
-
0.
|
| 94 |
-
0.
|
| 95 |
-
0.
|
| 96 |
-
0.
|
| 97 |
-
0.
|
| 98 |
-
0.
|
| 99 |
-
0.
|
| 100 |
-
0.
|
| 101 |
-
0.
|
| 102 |
-
0.
|
| 103 |
-
0.
|
| 104 |
-
0.
|
| 105 |
-
0.
|
| 106 |
-
0.
|
| 107 |
-
0.
|
| 108 |
-
0.
|
| 109 |
-
0.
|
| 110 |
-
0.
|
| 111 |
-
0.
|
| 112 |
-
0.819875838158984,
|
| 113 |
-
0.822493469671855,
|
| 114 |
-
0.8206557370930729
|
| 115 |
],
|
| 116 |
"binary_auc_roc": [
|
| 117 |
-
0.
|
| 118 |
-
0.
|
| 119 |
-
0.
|
| 120 |
-
0.
|
| 121 |
-
0.
|
| 122 |
-
0.
|
| 123 |
-
0.
|
| 124 |
-
0.
|
| 125 |
-
0.
|
| 126 |
-
0.
|
| 127 |
-
0.
|
| 128 |
-
0.
|
| 129 |
-
0.
|
| 130 |
-
0.
|
| 131 |
-
0.
|
| 132 |
-
0.
|
| 133 |
-
0.
|
| 134 |
-
0.
|
| 135 |
-
0.
|
| 136 |
-
0.
|
| 137 |
-
0.
|
| 138 |
-
0.
|
| 139 |
-
0.
|
| 140 |
-
0.
|
| 141 |
-
0.
|
| 142 |
-
0.
|
| 143 |
-
0.
|
| 144 |
-
0.
|
| 145 |
-
0.
|
| 146 |
-
0.
|
| 147 |
-
0.
|
| 148 |
-
0.
|
| 149 |
-
0.
|
| 150 |
-
0.7678690779330196,
|
| 151 |
-
0.7652841534243358,
|
| 152 |
-
0.7590750002409428
|
| 153 |
],
|
| 154 |
"binary_f1": [
|
| 155 |
-
0.
|
| 156 |
-
0.
|
| 157 |
-
0.
|
| 158 |
-
0.
|
| 159 |
-
0.
|
| 160 |
-
0.
|
| 161 |
-
0.
|
| 162 |
-
0.
|
| 163 |
-
0.
|
| 164 |
-
0.
|
| 165 |
-
0.
|
| 166 |
-
0.
|
| 167 |
-
0.
|
| 168 |
-
0.
|
| 169 |
-
0.
|
| 170 |
-
0.
|
| 171 |
-
0.
|
| 172 |
-
0.
|
| 173 |
-
0.
|
| 174 |
-
0.
|
| 175 |
-
0.
|
| 176 |
-
0.
|
| 177 |
-
0.
|
| 178 |
-
0.
|
| 179 |
-
0.
|
| 180 |
-
0.
|
| 181 |
-
0.
|
| 182 |
-
0.
|
| 183 |
-
0.
|
| 184 |
-
0.
|
| 185 |
-
0.
|
| 186 |
-
0.
|
| 187 |
-
0.
|
| 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 |
-
|
| 27 |
-
|
| 28 |
-
|
| 29 |
-
|
| 30 |
-
|
| 31 |
-
|
| 32 |
-
|
| 33 |
-
|
| 34 |
-
|
| 35 |
-
|
| 36 |
-
|
| 37 |
-
|
| 38 |
-
|
| 39 |
-
|
| 40 |
-
|
| 41 |
-
|
| 42 |
-
|
| 43 |
-
|
| 44 |
-
|
| 45 |
-
|
| 46 |
-
|
| 47 |
-
|
| 48 |
-
|
| 49 |
-
|
| 50 |
-
##
|
| 51 |
-
|
| 52 |
-
|
| 53 |
-
|
| 54 |
-
|
| 55 |
-
|
| 56 |
-
|
| 57 |
-
|
| 58 |
-
|
| 59 |
-
|
|
| 60 |
-
|
| 61 |
-
|
| 62 |
-
|
| 63 |
-
|
| 64 |
-
|
| 65 |
-
|
| 66 |
-
|
| 67 |
-
|
| 68 |
-
|
| 69 |
-
|
| 70 |
-
|
| 71 |
-
|
| 72 |
-
|
| 73 |
-
|
| 74 |
-
-
|
| 75 |
-
|
| 76 |
-
-
|
| 77 |
-
|
| 78 |
-
|
| 79 |
-
|
| 80 |
-
|
| 81 |
-
|
| 82 |
-
|
| 83 |
-
|
| 84 |
-
|
| 85 |
-
|
| 86 |
-
|
| 87 |
-
|
| 88 |
-
|
| 89 |
-
|
| 90 |
-
|
| 91 |
-
|
| 92 |
-
|
| 93 |
-
|
| 94 |
-
|
| 95 |
-
|
| 96 |
-
|
| 97 |
-
|
| 98 |
-
|
| 99 |
-
|
| 100 |
-
|
| 101 |
-
|
| 102 |
-
|
| 103 |
-
|
| 104 |
-
|
| 105 |
-
|
| 106 |
-
|
| 107 |
-
|
| 108 |
-
|
| 109 |
-
|
| 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":
|
| 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": "
|
| 43 |
},
|
| 44 |
"training": {
|
| 45 |
"epochs": 60,
|
| 46 |
-
"batch_size":
|
| 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"
|