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