Update config.json
Browse files- config.json +19 -15
config.json
CHANGED
@@ -1,43 +1,47 @@
|
|
1 |
{
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2 |
"weights_url": "https://github.com/mlmed/torchxrayvision/releases/download/v1/chex-densenet121-d121-tw-lr001-rot45-tr15-sc15-seed0-best.pt",
|
|
|
3 |
"labels": [
|
4 |
"Atelectasis",
|
5 |
"Consolidation",
|
6 |
-
"",
|
7 |
"Pneumothorax",
|
8 |
"Edema",
|
9 |
-
"",
|
10 |
-
"",
|
11 |
"Effusion",
|
12 |
"Pneumonia",
|
13 |
-
"",
|
14 |
"Cardiomegaly",
|
15 |
-
"",
|
16 |
-
"",
|
17 |
-
"",
|
18 |
"Lung Lesion",
|
19 |
"Fracture",
|
20 |
"Lung Opacity",
|
21 |
"Enlarged Cardiomediastinum"
|
22 |
],
|
|
|
23 |
"op_threshs": [
|
24 |
0.1988969,
|
25 |
0.05710573,
|
26 |
-
NaN,
|
27 |
0.0531293,
|
28 |
0.1435217,
|
29 |
-
NaN,
|
30 |
-
NaN,
|
31 |
0.27212676,
|
32 |
0.07749717,
|
33 |
-
NaN,
|
34 |
0.19712369,
|
35 |
-
NaN,
|
36 |
-
NaN,
|
37 |
-
NaN,
|
38 |
0.09932402,
|
39 |
0.09273402,
|
40 |
0.3270967,
|
41 |
0.10888247
|
42 |
]
|
43 |
-
}
|
|
|
1 |
{
|
2 |
+
// ① 告诉 HF 这是个 densenet 模型(model_type 要对应 transformers 里注册的类型)
|
3 |
+
"model_type": "densenet",
|
4 |
+
// ② 指定用哪个 class 来加载(这个类必须在 transformers 或者自定义库里可 import)
|
5 |
+
"architectures": ["DenseNetForImageClassification"],
|
6 |
+
// ③ 可选:声明你开发时依赖的 transformers 最低版本
|
7 |
+
"transformers_version": "4.30.0",
|
8 |
+
// ④ 通常要给出输入尺寸
|
9 |
+
"image_size": [224, 224],
|
10 |
+
// ⑤ 如果需要,可以给出标准化参数
|
11 |
+
"normalize": {
|
12 |
+
"mean": [0.485, 0.456, 0.406],
|
13 |
+
"std": [0.229, 0.224, 0.225]
|
14 |
+
},
|
15 |
+
|
16 |
+
// —— 以下保持原来的权重、标签和阈值 ——
|
17 |
+
|
18 |
"weights_url": "https://github.com/mlmed/torchxrayvision/releases/download/v1/chex-densenet121-d121-tw-lr001-rot45-tr15-sc15-seed0-best.pt",
|
19 |
+
|
20 |
"labels": [
|
21 |
"Atelectasis",
|
22 |
"Consolidation",
|
|
|
23 |
"Pneumothorax",
|
24 |
"Edema",
|
|
|
|
|
25 |
"Effusion",
|
26 |
"Pneumonia",
|
|
|
27 |
"Cardiomegaly",
|
|
|
|
|
|
|
28 |
"Lung Lesion",
|
29 |
"Fracture",
|
30 |
"Lung Opacity",
|
31 |
"Enlarged Cardiomediastinum"
|
32 |
],
|
33 |
+
|
34 |
"op_threshs": [
|
35 |
0.1988969,
|
36 |
0.05710573,
|
|
|
37 |
0.0531293,
|
38 |
0.1435217,
|
|
|
|
|
39 |
0.27212676,
|
40 |
0.07749717,
|
|
|
41 |
0.19712369,
|
|
|
|
|
|
|
42 |
0.09932402,
|
43 |
0.09273402,
|
44 |
0.3270967,
|
45 |
0.10888247
|
46 |
]
|
47 |
+
}
|