File size: 3,759 Bytes
1734875 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 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 112 113 114 115 116 | # AMOS22 CT->MRI shared-13 experiment plan
This is the first SACFlow-FM implementation/evaluation protocol.
## Label protocol
AMOS22 labeled data contains 500 CT and 100 MRI cases. In the local AMOS split, MRI validation labels may only contain labels `0..13`; labels `14` and `15` are absent in `target_val`. For a clean CT->MRI protocol we use a shared-label setting:
- keep labels `0..13`;
- map labels `14` and `15` to background `0`;
- set `num_classes: 14`;
- use `target_val` for evaluation because `target_test` labels are not available.
## 0. Create manifests
From repo root:
```bash
AMOS_ROOT=datasets/amos22 bash scripts/amos/create_manifests_shared13.sh
```
This creates:
```text
data_json/amos_ct2mr.json
data_json/amos_ct2mr_shared13.json
data_json/amos_ct2mr_shared13_sfda.json
```
Use `amos_ct2mr_shared13_sfda.json` for all source-free adaptation runs. It removes labels from `target_train` to avoid target-label leakage.
## 1. Smoke test
```bash
NPROC=1 bash scripts/amos/train_source_ct_smoke.sh
```
## 2. Source CT model
```bash
NPROC=8 bash scripts/amos/train_source_ct_shared13.sh
bash scripts/amos/eval_source_ct2mri_shared13.sh
```
## 3. Export compact source memory
```bash
NUM_PASSES=3 bash scripts/amos/export_memory_ct_shared13.sh
```
## 4. MRI oracle upper bound
```bash
NPROC=8 bash scripts/amos/train_oracle_mri_shared13.sh
python tools/eval.py \
--config configs/experiments/amos_oracle_mri_shared13.yaml \
--checkpoint outputs/amos/oracle_mri_shared13/checkpoints/best.pt \
--split target_val
```
## 5. Internal SFDA baselines
```bash
NPROC=8 bash scripts/amos/run_selftrain_ct2mri_shared13.sh
NPROC=8 bash scripts/amos/run_peft_ct2mri_shared13.sh
NPROC=8 bash scripts/amos/run_proto_align_ct2mri_shared13.sh
```
Evaluate:
```bash
python tools/eval.py --config configs/experiments/amos_selftrain_ct2mri_shared13.yaml --checkpoint outputs/amos/selftrain_ct2mri_shared13/checkpoints/best.pt --split target_val
python tools/eval.py --config configs/experiments/amos_peft_ct2mri_shared13.yaml --checkpoint outputs/amos/peft_ct2mri_shared13/checkpoints/best.pt --split target_val
python tools/eval.py --config configs/experiments/amos_proto_align_ct2mri_shared13.yaml --checkpoint outputs/amos/proto_align_ct2mri_shared13/checkpoints/best.pt --split target_val
```
## 6. SACFlow-FM
```bash
NPROC=8 bash scripts/amos/run_sacflow_ct2mri_shared13.sh
bash scripts/amos/eval_sacflow_ct2mri_shared13.sh
```
## 7. First ablations
Run these after the main SACFlow-FM run works:
```bash
NPROC=8 bash scripts/amos/run_sacflow_linear_ct2mri_shared13.sh
NPROC=8 bash scripts/amos/run_sacflow_whole_feature_ct2mri_shared13.sh
NPROC=8 bash scripts/amos/run_sacflow_random_subspace_ct2mri_shared13.sh
```
Evaluate:
```bash
python tools/eval.py --config configs/experiments/amos_sacflow_linear_ct2mri_shared13.yaml --checkpoint outputs/amos/sacflow_linear_ct2mri_shared13/checkpoints/best.pt --split target_val
python tools/eval.py --config configs/experiments/amos_sacflow_whole_feature_ct2mri_shared13.yaml --checkpoint outputs/amos/sacflow_whole_feature_ct2mri_shared13/checkpoints/best.pt --split target_val
python tools/eval.py --config configs/experiments/amos_sacflow_random_subspace_ct2mri_shared13.yaml --checkpoint outputs/amos/sacflow_random_subspace_ct2mri_shared13/checkpoints/best.pt --split target_val
```
## First results table
Report:
| Method | Target labels for training? | Source images during adaptation? | Mean Dice | Mean HD95 |
|---|---:|---:|---:|---:|
| Source-only CT->MRI | No | No | | |
| MRI oracle | Yes | N/A | | |
| Self-training | No | No | | |
| PEFT-only | No | No | | |
| Proto-align internal | No | No | | |
| SACFlow-linear | No | No | | |
| SACFlow-FM | No | No | | |
|