dataset.py
- Custom Dataset class for loading and preprocessing 3D medical imagesmodel.py
- Model definition with co-attention mechanismsutils.py
- Utility functions for training and evaluationlearnable.py
- Text encoder and prompt learning classestrain.py
- Main training script
The expected data structure is:
./Dataset/
├── Internal_nii2/
│ └── <hospital_number>/
│ └── ap.nii.gz
├── Internal_roi/
│ └── <hospital_number>/
│ └── ap.nrrd
├── label_v2.csv
└── rad_feat.csv
To train the model:
python train.py --text_prompt_len 6 --vision_prompt_dep 10 --vision_prompt_len 10 --orthogonal_loss_weight 0.1