Johnyquest7 commited on
Commit
653a862
·
verified ·
1 Parent(s): ba3e16d

Upload folder using huggingface_hub

Browse files
Files changed (5) hide show
  1. README.md +24 -36
  2. best_model.pth +2 -2
  3. model_config.json +0 -0
  4. pytorch_model.bin +2 -2
  5. results.json +29 -29
README.md CHANGED
@@ -1,45 +1,33 @@
1
  ---
2
  license: cc-by-4.0
3
  tags:
4
- - medical-imaging
5
- - ultrasound
6
- - thyroid
7
- - classification
8
- - efficientnet
9
- - ml-intern
10
  datasets:
11
- - Johnyquest7/TN5000-thyroid-nodule-classification
12
  ---
13
- # Thyroid Nodule Classification - EfficientNetV2-S (AUC-Optimized v4)
14
- Frozen backbone, deeper head with Dropout 0.5. Optimized for AUC-ROC.
 
 
 
 
 
 
 
15
 
16
  ## Test Set Performance
17
  | Metric | Value | 95% CI |
18
  |--------|-------|--------|
19
- | Sensitivity | 0.1751 | [0.1482, 0.2046] |
20
- | Specificity | 0.9294 | [0.8919, 0.9569] |
21
- | PPV | 0.8707 | [0.8055, 0.9204] |
22
- | NPV | 0.2931 | [0.2627, 0.3249] |
23
- | AUC-ROC | 0.6835 | [0.6467, 0.7199] |
24
- ## Citation
25
- Yu, Xiaoxian et al. "TN5000..." Scientific Data (Nature), 2025.
26
-
27
- <!-- ml-intern-provenance -->
28
- ## Generated by ML Intern
29
-
30
- This model repository was generated by [ML Intern](https://github.com/huggingface/ml-intern), an agent for machine learning research and development on the Hugging Face Hub.
31
-
32
- - Try ML Intern: https://smolagents-ml-intern.hf.space
33
- - Source code: https://github.com/huggingface/ml-intern
34
-
35
- ## Usage
36
-
37
- ```python
38
- from transformers import AutoModelForCausalLM, AutoTokenizer
39
-
40
- model_id = 'Johnyquest7/Thyroid_EfficientNetV2'
41
- tokenizer = AutoTokenizer.from_pretrained(model_id)
42
- model = AutoModelForCausalLM.from_pretrained(model_id)
43
- ```
44
-
45
- For non-causal architectures, replace `AutoModelForCausalLM` with the appropriate `AutoModel` class.
 
1
  ---
2
  license: cc-by-4.0
3
  tags:
4
+ - medical-imaging
5
+ - ultrasound
6
+ - thyroid
7
+ - classification
8
+ - resnet
 
9
  datasets:
10
+ - Johnyquest7/TN5000-thyroid-nodule-classification
11
  ---
12
+ # Thyroid Nodule Classification - ResNet-18 (PEMV-Style Correct)
13
+ Trained on TN5000 with exact PEMV paper recipe, optimized for AUC-ROC.
14
+
15
+ ## Key Recipe Differences from Failed Runs
16
+ - No ImageNet normalization (only ToTensor to [0,1])
17
+ - CrossEntropyLoss with 2 logits (not BCE with 1 logit)
18
+ - ResNet-18 (proven 85.68% accuracy baseline on TN5000)
19
+ - AdamW lr=1e-4, wd=0.05, batch=16, 128x128
20
+ - Constant LR for 200 epochs (no scheduler)
21
 
22
  ## Test Set Performance
23
  | Metric | Value | 95% CI |
24
  |--------|-------|--------|
25
+ | Accuracy | 0.8891 | - |
26
+ | Sensitivity | 0.9175 | [0.8948, 0.9366] |
27
+ | Specificity | 0.8182 | [0.7685, 0.8611] |
28
+ | PPV | 0.9266 | [0.9048, 0.9447] |
29
+ | NPV | 0.7986 | [0.7481, 0.8430] |
30
+ | AUC-ROC | 0.9313 | [0.9125, 0.9483] |
31
+
32
+ ## References
33
+ - PEMV-Thyroid (arXiv:2603.28315): Prototype-Enhanced Multi-View Learning for Thyroid Nodule Ultrasound Classification
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
best_model.pth CHANGED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:1475972504c0a9df090290d68e2fea6ee1d719a1de25e0e2055ae0683d3fbf58
3
- size 82917646
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:48543f2595e272d6d1cbcd9f28ec9877395bc72009585e4dc0ba29cee8c906a0
3
+ size 44790904
model_config.json CHANGED
Binary files a/model_config.json and b/model_config.json differ
 
pytorch_model.bin CHANGED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:50344f12c08700a55344eb5c64cd45994bf32e878b45715ada7f0c4711344d95
3
- size 82919434
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:b83f55db67889c856d363362ad29442738742adf3a9b2e1c791b997b5cc47d27
3
+ size 44790706
results.json CHANGED
@@ -1,46 +1,46 @@
1
  {
2
- "best_epoch": 24,
3
- "best_val_auc": 0.6955626666666666,
4
  "test_metrics": {
5
- "sensitivity": 0.17510259917920656,
 
6
  "sensitivity_ci": [
7
- 0.14822370178949582,
8
- 0.2046325480923097
9
  ],
10
- "specificity": 0.929368029739777,
11
  "specificity_ci": [
12
- 0.8918951222927511,
13
- 0.9569420548075194
14
  ],
15
- "ppv": 0.8707482993197279,
16
  "ppv_ci": [
17
- 0.8055358886428969,
18
- 0.9203548937021385
19
  ],
20
- "npv": 0.29308323563892147,
21
  "npv_ci": [
22
- 0.26271020298013675,
23
- 0.3248933746402657
24
  ],
25
- "auc": 0.6834783537345084,
26
  "auc_ci": [
27
- 0.6466884099392298,
28
- 0.7199268327692855
29
  ],
30
- "tp": 128,
31
- "tn": 250,
32
- "fp": 19,
33
- "fn": 603,
34
- "threshold": 0.5
35
  },
36
  "config": {
37
- "backbone": "tf_efficientnetv2_s.in1k",
38
- "frozen": true,
39
- "img_size": 384,
40
- "batch_size": 64,
41
- "epochs_trained": 39,
42
- "lr_head": 0.0005,
43
- "weight_decay": 0.001,
44
  "optimization_metric": "auc"
45
  }
46
  }
 
1
  {
2
+ "best_epoch": 12,
3
+ "best_val_auc": 0.9318691478479817,
4
  "test_metrics": {
5
+ "accuracy": 0.8891108891108891,
6
+ "sensitivity": 0.9174825174825175,
7
  "sensitivity_ci": [
8
+ 0.8948475523330561,
9
+ 0.9365925537099365
10
  ],
11
+ "specificity": 0.8181818181818182,
12
  "specificity_ci": [
13
+ 0.7685054712783398,
14
+ 0.8611264590466025
15
  ],
16
+ "ppv": 0.9265536723163842,
17
  "ppv_ci": [
18
+ 0.9047977037903637,
19
+ 0.9446634522191668
20
  ],
21
+ "npv": 0.7986348122866894,
22
  "npv_ci": [
23
+ 0.7480838301457988,
24
+ 0.8430321946896866
25
  ],
26
+ "auc": 0.9312704777739742,
27
  "auc_ci": [
28
+ 0.9124902286540131,
29
+ 0.9482509242450335
30
  ],
31
+ "tp": 656,
32
+ "tn": 234,
33
+ "fp": 52,
34
+ "fn": 59
 
35
  },
36
  "config": {
37
+ "backbone": "resnet18.a1_in1k",
38
+ "img_size": 128,
39
+ "batch_size": 16,
40
+ "epochs_trained": 32,
41
+ "lr": 0.0001,
42
+ "weight_decay": 0.05,
43
+ "normalization": "none",
44
  "optimization_metric": "auc"
45
  }
46
  }