Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Training and Inference discussion for baseline model #34

Closed
2 of 3 tasks
rohanbanerjee opened this issue Mar 10, 2024 · 4 comments
Closed
2 of 3 tasks

Training and Inference discussion for baseline model #34

rohanbanerjee opened this issue Mar 10, 2024 · 4 comments
Assignees

Comments

@rohanbanerjee
Copy link
Collaborator

rohanbanerjee commented Mar 10, 2024

What is the baseline model

The model which was trained on ✅ as per the QCs mentioned in #25 is the baseline model. A total of 96 images were used in the training of this model. A list of subjects (for later reference) is below:
participants_baseline.csv

The model was trained in 6 different settings - 5 models for the 5 fold cross-validation and 1 fold_all model (discussion can be found here - MIC-DKFZ/nnUNet#1364 (comment)). The config (containing preprocessing, hyperparameters) for nnUNetv2 training is: plans.json

After the model was trained, the inference was run on the ❌ (failed segmentations) from #25. Below are the QCs from all the folds and fold_all:

qc_fold_0.zip
qc_fold_1.zip
qc_fold_2.zip
qc_fold_3.zip
qc_fold_4.zip
qc_fold_all.zip

The steps to reproduce the above QC results (/run inference) are the following:

  1. Clone this repos
  2. cd fmri-segmentation
  3. Download the model weights (the whole folder) from the link: https://drive.google.com/drive/folders/1WSn-15wGWz6i2_aZeQTwKls2sZ6dpfHf?usp=share_link
  4. Install dependencies
pip install -r run_nnunet_inference_requirements.txt
  1. Run the command:
python run_nnunet_inference.py --path-dataset <PATH TO FOLDER CONTAINING IMAGES, SUFFIXED WITH _0000> --path-out <PATH TO O/P FOLDER> --path-model <PATH TO DOWNLOADED WEIGHTS FOLDER>

Next steps:

@rohanbanerjee rohanbanerjee self-assigned this Mar 10, 2024
@rohanbanerjee rohanbanerjee changed the title Training and Inference discussion for baseline model Training and Inference discussion for baseline model Mar 11, 2024
@rohanbanerjee rohanbanerjee changed the title Training and Inference discussion for baseline model Training and Inference discussion for baseline model Mar 11, 2024
@rohanbanerjee
Copy link
Collaborator Author

rohanbanerjee commented Mar 11, 2024

Choose the fold whose inference results will be used for the next round of training

Out of all the folds_{0-5}, the fold_1 has the best performance in terms of dice score on it's respective test set. Given that, I don't think that is the best metric for us to choose the fold (or model). In my opinion, the baseline model should be trained on the maximum number of good ground truth and fold_all is the setting which fits this. The fold_all model is trained on all the training images and does not have a validation set unlike folds_{0-5}.

After going through the QC and based on the above conclusion, I am going ahead with fold_all.

@rohanbanerjee
Copy link
Collaborator Author

rohanbanerjee commented Mar 14, 2024

I chose 30 subjects from the fold_all inference that I manually corrected. The list of 30 chosen subjects is below:
qc_report_fold_all.zip

I manually corrected the segmentation for these subjects and attaching the QC for the same below:
qc_fold_all_corrected.zip

After @jcohenadad approves these segmentations, I'll add these images to the training set and start the re-training.

CC: @MerveKaptan

@jcohenadad
Copy link
Member

review: qc_fail.yml.zip

details:

spinefmri-sub-genevaR104_003_0000.nii.gz
image

spinefmri-sub-genevaR106_005_0000.nii.gz
image

spinefmri-sub-genevaR108_007_0000.nii.gz
image

spinefmri-sub-genevaR202_018_0000.nii.gz
image
image

spinefmri-sub-genevaR207_023_0000.nii.gz
image

spinefmri-sub-genevaR209_025_0000.nii.gz
image

spinefmri-sub-genevaR211_027_0000.nii.gz
image

spinefmri_sub-nwM09_task-motor_bold_0000.nii.gz
overseg: image

spinefmri_sub-nwM16_task-motor_bold_0000.nii.gz
image

"Download all" button is not there-- please make sure to use the latest version of SCT:

image

@rohanbanerjee
Copy link
Collaborator Author

Closing the issue since the baseline model training was successfully completed (including running inference and manual correction)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants