Closed H-CODE6 closed 2 years ago
Added test.py to the repository.
Thank you for your reply. I can't run train.py successfully according to your command python train.py --num_classes 3 --epochs 350 , is there any change in the running code? Or do you need to change the code in the train.py?
What is the error you are getting?
usage: train.py [-h] [-a ARCH] [--width WIDTH] [-j N] [--start-epoch N] [--epochs N] [-b N] [--lr LR] [--lr_dis LR_DIS] [--wd W] [--resume PATH] [--devices DEVICES] [--seed SEED] [--warmup N] [--disable-cos] [--warm WARM] [--val VAL] [--fold FOLD] [--norm_layer NORM_LAYER] [--optim {adam,sgd,adamw}] [--com COM] [--dropout DROPOUT] [--warm_restart] [--full] [--lambda_adv LAMBDA_ADV] [--lambda_vat LAMBDA_VAT] train.py: error: unrecognized arguments: --num_classes 3 Do you need to make changes to run the code?
Try the latest code without the argument num_classes.
NameError: name 'KFold' is not defined after operation,The code in train.py should need to be updated
The code in brats.py and train.py should need to be updated
I updated the repo. Can you check now?
The training code should be available. Thank you very much for your answer. If you continue to have questions, please ask you again? Thank you again.
Hello, the author. I'm running your code. I put 770 data in the training process. During the training process, I found that it was divided into two parts. There was a separate copy of more than 70 data. I started training after running several epochs. How do you understand this? Why divide according to such proportion?
I splitted dataset into training and validation datasets. Validation dataset is used to evaluate model's performance over unseen data during training. Based on performance, I save the best model.
Please follow Kfold function https://github.com/himashi92/vizviva_brats_2021/blob/main/dataset/brats_train.py#L96.
OK, why is the training set split? Can't the valid verification set be directly used to test the performance?
Ground truth masks for the validation dataset are not yet released. You can use the BraTS continuous evaluation portal to evaluate your predictions on the BraTS 2021 validation dataset.
OK, can you provide me with the address of the brats evaluation website?
Hello, just run test Py, the error of AttributeError: 'Namespace' object has no attribute 'lambda_adv' appears. What is the reason?
After adding parser.add_argument('--lambda_adv', type=float, default=0.3, help='scalar constant adversarial loss') parser.add_argument('--lambda_vat', type=float, default=0.2, help='scalar constant vat loss'),The error also appears RuntimeError: Exception thrown in SimpleITK ReadImage: /tmp/SimpleITK/Code/IO/src/sitkImageReaderBase.cxx:99: sitk::ERROR: The file "/media/hkw/hkwdisk/vizviva_brats_2021-main/BRATS2021/Data/valid/BraTS2021_00011t1.nii.gz" does not exist. There should be brats2021 after valid 00011 this question folder Can you update test.py code
This test.py code is written according to the brats evaluation. You can modify it in the way you want.
Hello, I didn't find test.py in the code folder , can you provide it?