ellisdg / 3DUnetCNN

Pytorch 3D U-Net Convolution Neural Network (CNN) designed for medical image segmentation
MIT License
1.9k stars 653 forks source link

10-fold cross-validation on the training set. #295

Closed wenhankang closed 2 years ago

wenhankang commented 2 years ago

Excuse me,'ten models were trained via 10-fold cross-validation on the training set' In the paper.But I only see the last ten models saved and a baseline, not the ten cross-validation runs in the code.Could you please help me explain how to carry out ten times of cross verification?

wenhankang commented 2 years ago

@ellisdg

ellisdg commented 2 years ago

To do 10 fold cross validation, you need to set the training and test subjects in a separate config file for each fold. You can see the cross validation folder from the autoimplant project for an example of 4 fold cross validation. The trianing can then be run on each config file separately.

wenhankang commented 2 years ago

要进行 10 折交叉验证,您需要在单独的配置文件中为每个折设置训练和测试主题。您可以从 autoimplant 项目中查看交叉验证文件夹,以获取 4 折交叉验证的示例。然后可以分别在每个配置文件上运行 trianing。

image 'm glad to receive your reply. Could you help me solve how to use the ten model U-Net ensemble on the BraTS 2020 test set.

ellisdg commented 2 years ago

Here are the configuration files I used to train the models:

  1. https://github.com/ellisdg/fCNN/blob/master/data/brats_config_fold0.json
  2. https://github.com/ellisdg/fCNN/blob/master/data/brats_config_fold1.json
  3. https://github.com/ellisdg/fCNN/blob/master/data/brats_config_fold2.json
  4. https://github.com/ellisdg/fCNN/blob/master/data/brats_config_fold3.json
  5. https://github.com/ellisdg/fCNN/blob/master/data/brats_config_fold4.json
  6. https://github.com/ellisdg/fCNN/blob/master/data/brats_config_fold5.json
  7. https://github.com/ellisdg/fCNN/blob/master/data/brats_config_fold6.json
  8. https://github.com/ellisdg/fCNN/blob/master/data/brats_config_fold7.json
  9. https://github.com/ellisdg/fCNN/blob/master/data/brats_config_fold8.json
  10. https://github.com/ellisdg/fCNN/blob/master/data/brats_config_fold9.json

Train a model using each configuration file, this gives you 10 models. If you want to do the cross-validation, predict the "validation" subjects for each model according to its configuration file. If you want to predict the test dataset, use each model to predict each of the test subjects and average the result.

stale[bot] commented 2 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. If you are still wanting followup to this issue, please ping the thread by leaving a comment. You may also contact david.ellis@unmc.edu with questions.