Project-MONAI / research-contributions

Implementations of recent research prototypes/demonstrations using MONAI.
https://monai.io/
Apache License 2.0
1.02k stars 334 forks source link

main.py: error: unrecognized arguments: --fold=0 #71

Open BelieferQAQ opened 2 years ago

BelieferQAQ commented 2 years ago

Hello , i run your file for main.py by this command, python main.py --feature_size=32 --batch_size=1 --logdir=unetr_test --fold=0 --optim_lr=1e-4 --lrschedule=warmup_cosine --infer_overlap=0.5 --save_checkpoint --data_dir=/dataset/dataset0/

but there is a bug that "main.py: error: unrecognized arguments: --fold=0",i want to know what mean of this parameter that "fold "? thak you very much

ahatamiz commented 2 years ago

Hi @BelieferQAQ , which repository did you try ?

BelieferQAQ commented 2 years ago

Hi @BelieferQAQ , which repository did you try ?

UNETR,

Using the default values for hyper-parameters, the following command can be used to initiate training using PyTorch native AMP package:


python main.py
--feature_size=32
--batch_size=1
--logdir=unetr_test
--fold=0
--optim_lr=1e-4
--lrschedule=warmup_cosine
--infer_overlap=0.5
--save_checkpoint
--data_dir=/dataset/dataset0/
BelieferQAQ commented 2 years ago

In addition, I train the model myself and get the weight model Pt, then use the following command: python test. py --infer overlap=0.5 --data dir=/data1/dataset/wdDATASET/BTCV/abdomen/ --pretrained dir='./ pretrained models/' --saved checkpoint=ckpt --pretrained model name=model. pt The result produced an error:
Unexpected key(s) in state
dict: "epoch", "best_acc", "statedict". I will --saved checkpoint=torchscript The result produced an error: PytorchStreamReader failed locating file constants. pkl: file not found Excuse me, how to solve this? Thank you very much!!

Jamshidhsp commented 2 years ago

@ahatamiz Hi, Thank you for your great work. Could you please help how I can do k-fold validation using the commands? I am facing an error saying --fold in not recognized. I am using a private dataset and not a pre-trained one. Thanks.

casarinsof commented 2 years ago

Hello, I faced the same issue, and I simply think they did not provide either the version with the k-fold nor the code for ensemble evaluation. In addition, I believe ensemble evaluation is fundamental to achieve high performance.