Code Monkey home page Code Monkey logo

Comments (3)

askerlee avatar askerlee commented on July 30, 2024

You mean test3d.py right?
Previously I suggested you to insert a structure like below to use brats 2020 dataset. But seems brats 2020 folders are already included in this structure:

                     'brats': {
                                 'num_classes': 4,
                                 'bce_weight':  [0., 3, 1, 1.75],  # bg, ET, WT, TC
                                 'ds_class':    'BratsSet',
                                 'train_ds_names':  '2019train',
                                 'test_ds_name':    '2019valid',
                                 'chosen_modality': -1,
                                 'xyz_permute':     None, # (1, 2, 0),
                                 'orig_input_size': None,
                                 # each dim of the orig_patch_size should always be multiply of 8.
                                 'orig_patch_size': (112, 112, 96),
                                 'input_scale':     (1,   1,   1),
                                 'D_pool_K':         2,
                                 'has_mask':    { '2019train': True,    '2019valid': False, 
                                                  '2020train': True,    '2020valid': False },
                                 'weight':      { '2019train': 1,       '2019valid': 1, 
                                                  '2020train': 1,       '2020valid': 1 }
                               },   

But you need to name the names of the training and validation folders to 2020train and 2020valid, respectively.
Then the test command line will be like:
python3 test3d.py --task brats --split all --bs 5 --ds 2020valid --net segtran --attractors 1024 --translayers 1 --cpdir ../model/segtran-brats-2019train-01170142 --iters 8000

from segtran.

bhralzz avatar bhralzz commented on July 30, 2024

but still getting below error in test3d.py
TypeError: init() got an unexpected keyword argument 'mask_num_classes'

when running the command
python3 test3d.py --task brats --split all --bs 5 --ds BraTS20_Valid --net segtran --attractors 1024 --translayers 1 --cpdir ../model/segtran-brats-BraTS20_Train-09211348 --iters 1000
as the train and validation folder path as below:
BraTS20_Train & BraTS20_Valid
and the train3d.py worked correctly in this setting

by removing such keywords worked!

from segtran.

askerlee avatar askerlee commented on July 30, 2024

Thank you! Yes it's because I updated datasets3d.py but forgot to update test3d.py. So some useless variables were still there. I've fixed the code.

from segtran.

Related Issues (20)

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.