MASILab / 3DUX-Net

240 stars 33 forks source link

How to train with AMOS 2022 dataset? #4

Closed KennanYang closed 1 year ago

KennanYang commented 1 year ago

Hello, I wanna train with AMOS2022 dataset, but I don't know what I need to config firstly. I find the TRAINING.md, in which there are no "INSTALL.md" and AMOS2022 Finetuning commands. Could you please give me more support?

leeh43 commented 1 year ago

Hi, thank you for your interest towards our idea. I am sorry for the inconvenience about the install.md and the finetune.md. Currently, we are organizing the code and the installation procedures. The tutorial for installation and finetuning will be pushed before the end of the coming Thursday. I will send you an reminder through here after I push the organized code and tutorial.

leeh43 commented 1 year ago

Both the installation and finetuning tutorials are uploaded and please take a look of the finetuning code main_finetune.py for AMOS 2022. You are also can use to train with AMOS 2022 datasets from scratch. If you have any questions or interesting findings from your experimental results, I am also happy to discuss also.

KennanYang commented 1 year ago

I get it! Thank you for your work and for answering my questions. I will try the finetuning code as soon as possible and come back to you if there is any problem. :)

KennanYang commented 1 year ago

Excuse me, I have a few more questions.

Does the AMOS dataset directory '/imagesVal' contain the official validation set of 100 cases? Or the validation set that you split the training set into 8:1:1, which is 20 cases?

I would also like to ask if it is convenient to provide the pre-trained weights of the best folding model trained with FLARE2021? Because my recent work explores the SOTA method for multi-organ segmentation based on AMOS2022.

Your work is very valuable! Thanks for your time and thanks again for your answers!

leeh43 commented 1 year ago

For the training/validation/testing split, we have split the training set into 8:1:1, which are 20 cases for validations. We haven't used the official validation set because of lacking of ground-truth labels. We may also have a try on challenging the leaderboard results, but with a different training settings (such as distributed learning).

For the pre-trained weight of FeTA 2021, FLARE 2021 and AMOS 2022, I will try to upload it as soon as possible and hopefully can be uploaded later the start of next week (As I have performed multiple ablation studies, current network version including variable names are different from the GitHub. Will organize it and upload to the GitHub).

KennanYang commented 1 year ago

OK! Thank you very much for your prompt reply!

leeh43 commented 1 year ago

Hi Kennan, I have put the FLARE2021 pretrained model weights with a link in the GitHub. Feel free to have a try to finetune the model for AMOS 2022. I will also put the pretrained weights for AMOS 2022 later also.

KennanYang commented 1 year ago

Fine! I got it! Thank you for your notice. I have been following your work.

KennanYang commented 1 year ago

Hello! When I try to finetune the model for AMOS 2022 with the FLARE2021 pretrained model weights. I meet an error:

"RuntimeError: Error(s) in loading state_dict for UXNET: size mismatch for uxnet_3d.stages.0.0.dwconv.weight: copying a param with shape torch.Size([48, 1, 7, 7, 7]) from checkpoint, the shape in current model is torch.Size([48, 1, 13, 13, 13]). ... ... " Is it about kernel settings because I see different kernel sizes in your paper? Or what parameters should I set initially? Thank you!

leeh43 commented 1 year ago

Please download the latest version of the code and I add some modification to the network structure. All provided weights are trained in the kernel size of 7x7x7, as I further optimized the hyperparameters and can demonstrate a similar performance with our results using a larger kernel in the paper. I can also provide you the 13x13x13 if you want to, but I definitely thinks that the results with 7x7x7 is already our best optimized with quicker computation time.

KennanYang commented 1 year ago

I download the latest version of the code. The pretrained model works! And I think the kernel 7x7x7 model is enough for me.

Also, I think line 41 in main_finetune.py should be like this: parser.add_argument('--pretrain_classes', type=int, default='', help='Number of classes output from pretrained model') Maybe it is a mistake, you could check it again.

Thank you!

leeh43 commented 1 year ago

Great, glad to hear that it is working and feel free to reach out if there is additional findings and potential suggestions for the network.

Fyi: I just integrate your comment and thank you to point it out of the mistake in main_finetune.py.

mostafij-rahman commented 1 year ago

How did you select 200 samples from AMOS 2022 dataset? I have found 240 training samples and 120 validation samples in AMOS 2022 dataset.

leeh43 commented 1 year ago

For AMOS 2022 challenge, it is divided into task 1 (CT) and task 2 (CT & MRI). All 240 training scans consists of both CT and MRI scans with ground truth labels. Only 200 of them is for task 1 and I randomly split it with 80% samples for training, 10% for validation and 10% testing in our transfer learning scenario. We haven't performed five-fold cross-validation with AMOS 2022 as in the paper shown, as we only want evaluate the transfer learning ability.

Studentpengyu commented 1 year ago

Hello! Thank you for your innovative work. I have been following your work closely. I have a question regarding the dataset for task 1. I recently downloaded the AMOS dataset from [https://zenodo.org/record/7155725#.Y0OOCOxBztM] and noticed that the content of the downloaded file differs from the data provided in the contest. Could you please clarify which specific 200 scans were used? Additionally, I would like to know the approach for dividing the dataset into training, validation, and testing sets. Thank you in advance for your assistance.

leeh43 commented 1 year ago

@Studentpengyu Please take a look our latest version of GitHub. I have put the AMOS split for training (including validation) and testing. Also, I have put my pretrained model in the GitHub and feel free to use it.

Studentpengyu commented 1 year ago

@leeh43 Thank you!