Upload folder using huggingface_hub
Browse files- README.md +24 -36
- best_model.pth +2 -2
- model_config.json +0 -0
- pytorch_model.bin +2 -2
- 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 |
-
-
|
| 9 |
-
- ml-intern
|
| 10 |
datasets:
|
| 11 |
-
- Johnyquest7/TN5000-thyroid-nodule-classification
|
| 12 |
---
|
| 13 |
-
# Thyroid Nodule Classification -
|
| 14 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 15 |
|
| 16 |
## Test Set Performance
|
| 17 |
| Metric | Value | 95% CI |
|
| 18 |
|--------|-------|--------|
|
| 19 |
-
|
|
| 20 |
-
|
|
| 21 |
-
|
|
| 22 |
-
|
|
| 23 |
-
|
|
| 24 |
-
|
| 25 |
-
|
| 26 |
-
|
| 27 |
-
|
| 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:
|
| 3 |
-
size
|
|
|
|
| 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:
|
| 3 |
-
size
|
|
|
|
| 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":
|
| 3 |
-
"best_val_auc": 0.
|
| 4 |
"test_metrics": {
|
| 5 |
-
"
|
|
|
|
| 6 |
"sensitivity_ci": [
|
| 7 |
-
0.
|
| 8 |
-
0.
|
| 9 |
],
|
| 10 |
-
"specificity": 0.
|
| 11 |
"specificity_ci": [
|
| 12 |
-
0.
|
| 13 |
-
0.
|
| 14 |
],
|
| 15 |
-
"ppv": 0.
|
| 16 |
"ppv_ci": [
|
| 17 |
-
0.
|
| 18 |
-
0.
|
| 19 |
],
|
| 20 |
-
"npv": 0.
|
| 21 |
"npv_ci": [
|
| 22 |
-
0.
|
| 23 |
-
0.
|
| 24 |
],
|
| 25 |
-
"auc": 0.
|
| 26 |
"auc_ci": [
|
| 27 |
-
0.
|
| 28 |
-
0.
|
| 29 |
],
|
| 30 |
-
"tp":
|
| 31 |
-
"tn":
|
| 32 |
-
"fp":
|
| 33 |
-
"fn":
|
| 34 |
-
"threshold": 0.5
|
| 35 |
},
|
| 36 |
"config": {
|
| 37 |
-
"backbone": "
|
| 38 |
-
"
|
| 39 |
-
"
|
| 40 |
-
"
|
| 41 |
-
"
|
| 42 |
-
"
|
| 43 |
-
"
|
| 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 |
}
|