Update README.md
Browse files
README.md
CHANGED
|
@@ -1,13 +1,57 @@
|
|
| 1 |
---
|
| 2 |
-
license: apache-2.0
|
| 3 |
language:
|
| 4 |
-
- en
|
| 5 |
tags:
|
| 6 |
-
-
|
| 7 |
-
-
|
| 8 |
-
-
|
| 9 |
-
-
|
| 10 |
-
-
|
| 11 |
-
-
|
| 12 |
-
-
|
| 13 |
-
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
---
|
| 2 |
+
license: apache-2.0 # or mit, cc-by-nc-4.0, etc. – choose appropriately
|
| 3 |
language:
|
| 4 |
+
- en
|
| 5 |
tags:
|
| 6 |
+
- medical-imaging
|
| 7 |
+
- self-supervised-learning
|
| 8 |
+
- mae
|
| 9 |
+
- swin-transformer
|
| 10 |
+
- 3d-vision
|
| 11 |
+
- pytorch
|
| 12 |
+
- ct
|
| 13 |
+
- opscc
|
| 14 |
+
---
|
| 15 |
+
|
| 16 |
+
# 3D Swin Transformer MAE for OPSCC CT Pretraining
|
| 17 |
+
|
| 18 |
+
Self-supervised masked autoencoder (MAE) using a **3D Swin Transformer** backbone trained on cropped OPSCC neck CT volumes.
|
| 19 |
+
Includes asymmetry-aware loss weighting (airway + soft-tissue features) and overfitting monitoring via augmented-pair cosine similarity.
|
| 20 |
+
|
| 21 |
+
## Model Details
|
| 22 |
+
|
| 23 |
+
- **Architecture**: 3D Swin Transformer encoder + lightweight asymmetric decoder + auxiliary asymmetry prediction heads
|
| 24 |
+
- **Input shape**: 1×60×128×128 (single-channel CT volumes, intensities normalized to [0,1])
|
| 25 |
+
- **Pretraining objective**: Masked reconstruction (75% masking ratio) + auxiliary asymmetry regression
|
| 26 |
+
- **Drop path rate**: linear schedule up to 0.1
|
| 27 |
+
- **Training**: AdamW, lr=1e-4, batch size 2 (adjustable), early stopping + cosine sim monitoring
|
| 28 |
+
|
| 29 |
+
## Intended Use & Limitations
|
| 30 |
+
|
| 31 |
+
**Primary use**: Pretraining foundation for downstream OPSCC tasks (staging, segmentation, outcome prediction)
|
| 32 |
+
**Not intended for**: Direct clinical diagnosis without fine-tuning and validation
|
| 33 |
+
|
| 34 |
+
**Limitations**:
|
| 35 |
+
- Trained on limited cohort (TCIA-derived OPSCC cases)
|
| 36 |
+
- Assumes cropped, skull-base-to-thoracic-inlet volumes
|
| 37 |
+
- Asymmetry heuristics are rule-based → may miss subtle cases
|
| 38 |
+
- No multi-modal / contrast-enhanced support yet
|
| 39 |
+
|
| 40 |
+
## How to Use
|
| 41 |
+
|
| 42 |
+
```bash
|
| 43 |
+
# 1. Clone repo
|
| 44 |
+
git clone https://huggingface.co/jdmayfield/opscc-ct-mae-swin-pretrain
|
| 45 |
+
cd opscc-ct-mae-swin-pretrain
|
| 46 |
+
|
| 47 |
+
# 2. Install deps
|
| 48 |
+
pip install -r requirements.txt
|
| 49 |
+
|
| 50 |
+
# 3. Train (or resume from checkpoint)
|
| 51 |
+
python train_mae_swin3d.py \
|
| 52 |
+
--data-dir /path/to/your/cropped_volumes \
|
| 53 |
+
--output-dir ./checkpoints \
|
| 54 |
+
--epochs 100 \
|
| 55 |
+
--batch-size 2 \
|
| 56 |
+
--lr 1e-4
|
| 57 |
+
|