Coder Social home page Coder Social logo

test.py about vizviva_brats_2021 HOT 18 CLOSED

himashi92 avatar himashi92 commented on June 26, 2024
test.py

from vizviva_brats_2021.

Comments (18)

himashi92 avatar himashi92 commented on June 26, 2024

Added test.py to the repository.

from vizviva_brats_2021.

H-CODE6 avatar H-CODE6 commented on June 26, 2024

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?

from vizviva_brats_2021.

himashi92 avatar himashi92 commented on June 26, 2024

What is the error you are getting?

from vizviva_brats_2021.

H-CODE6 avatar H-CODE6 commented on June 26, 2024

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?

from vizviva_brats_2021.

himashi92 avatar himashi92 commented on June 26, 2024

Try the latest code without the argument num_classes.

from vizviva_brats_2021.

H-CODE6 avatar H-CODE6 commented on June 26, 2024

NameError: name 'KFold' is not defined after operation,The code in train.py should need to be updated

from vizviva_brats_2021.

H-CODE6 avatar H-CODE6 commented on June 26, 2024

The code in brats.py and train.py should need to be updated

from vizviva_brats_2021.

himashi92 avatar himashi92 commented on June 26, 2024

I updated the repo. Can you check now?

from vizviva_brats_2021.

H-CODE6 avatar H-CODE6 commented on June 26, 2024

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.

from vizviva_brats_2021.

H-CODE6 avatar H-CODE6 commented on June 26, 2024

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?

from vizviva_brats_2021.

himashi92 avatar himashi92 commented on June 26, 2024

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.

from vizviva_brats_2021.

H-CODE6 avatar H-CODE6 commented on June 26, 2024

OK, why is the training set split? Can't the valid verification set be directly used to test the performance?

from vizviva_brats_2021.

himashi92 avatar himashi92 commented on June 26, 2024

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.

from vizviva_brats_2021.

H-CODE6 avatar H-CODE6 commented on June 26, 2024

OK, can you provide me with the address of the brats evaluation website?

from vizviva_brats_2021.

himashi92 avatar himashi92 commented on June 26, 2024

https://www.synapse.org/#!Synapse:syn27046444/wiki/616991

from vizviva_brats_2021.

H-CODE6 avatar H-CODE6 commented on June 26, 2024

Hello, just run test Py, the error of AttributeError: 'Namespace' object has no attribute 'lambda_adv'
appears. What is the reason?

from vizviva_brats_2021.

H-CODE6 avatar H-CODE6 commented on June 26, 2024

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_00011_t1.nii.gz" does not exist.
There should be brats2021 after valid_ 00011 this question folder
Can you update test.py code

from vizviva_brats_2021.

himashi92 avatar himashi92 commented on June 26, 2024

This test.py code is written according to the brats evaluation. You can modify it in the way you want.

from vizviva_brats_2021.

Related Issues (13)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.