Coder Social home page Coder Social logo

himashi92 / vizviva_brats_2021 Goto Github PK

View Code? Open in Web Editor NEW
17.0 2.0 3.0 155 KB

[Brainlesion 2021] Official PyTorch Implementation for Reciprocal Adversarial Learning for Brain Tumor Segmentation: A Solution to BraTS Challenge 2021 Segmentation Task

License: MIT License

Python 100.00%
brain-tumor-segmentation brats2021 pytorch-implementation adversarial-learning virtual-adversarial-training discriminator-model

vizviva_brats_2021's People

Contributors

himashi92 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

vizviva_brats_2021's Issues

performance

Hello, the author, recently reading your vizviva_ Brats_ 2021 code, found in brats_ When validating in the train, add the patient as the above training code_ Image, patient_ Label = pad_ Or_ Crop_ Image (patient_image, patient\u label, target\u size= (128, 128, 128)), I found that the performance decreased a lot. I don't know why.

dice

Hello, how to evaluate the Dice coefficient after the test?

test

Hello, author, I run according to your test.py. The following problems occur. What is the reason? We look forward to you.

Working with 1 GPUs
invalid literal for int() with base 10: ''
using default group number
[24, 48, 96, 192]
total number of trainable parameters 4793895
Validation Input Directory /input
Bench Test dataset number of batch: 1
=> loading checkpoint runs/brats_2021/model_1/model_best.pth.tar
=> loaded checkpoint 'runs/brats_2021/model_1/model_best.pth.tar' (epoch 3)
Traceback (most recent call last):
File "test.py", line 117, in
main(arguments)
File "test.py", line 111, in main
generate_segmentations(bench_loader, model_1, args)
File "test.py", line 40, in generate_segmentations
for i, batch in enumerate(data_loader):
File "/home/hkw/anaconda3/envs/pytorch/lib/python3.7/site-packages/torch/utils/data/dataloader.py", line 530, in next
data = self._next_data()
File "/home/hkw/anaconda3/envs/pytorch/lib/python3.7/site-packages/torch/utils/data/dataloader.py", line 1224, in _next_data
return self._process_data(data)
File "/home/hkw/anaconda3/envs/pytorch/lib/python3.7/site-packages/torch/utils/data/dataloader.py", line 1250, in _process_data
data.reraise()
File "/home/hkw/anaconda3/envs/pytorch/lib/python3.7/site-packages/torch/_utils.py", line 457, in reraise
raise exception
RuntimeError: Caught RuntimeError in DataLoader worker process 0.
Original Traceback (most recent call last):
File "/home/hkw/anaconda3/envs/pytorch/lib/python3.7/site-packages/torch/utils/data/_utils/worker.py", line 287, in _worker_loop
data = fetcher.fetch(index)
File "/home/hkw/anaconda3/envs/pytorch/lib/python3.7/site-packages/torch/utils/data/_utils/fetch.py", line 49, in fetch
data = [self.dataset[idx] for idx in possibly_batched_index]
File "/home/hkw/anaconda3/envs/pytorch/lib/python3.7/site-packages/torch/utils/data/_utils/fetch.py", line 49, in
data = [self.dataset[idx] for idx in possibly_batched_index]
File "/media/hkw/hkwdisk/viv-test/vizviva_brats_2021-main (1)/vizviva_brats_2021-main/dataset/brats.py", line 39, in getitem
patient_image = {key: self.load_nii(_patient[key]) for key in _patient if key not in ["id", "seg"]}
File "/media/hkw/hkwdisk/viv-test/vizviva_brats_2021-main (1)/vizviva_brats_2021-main/dataset/brats.py", line 39, in
patient_image = {key: self.load_nii(_patient[key]) for key in _patient if key not in ["id", "seg"]}
File "/media/hkw/hkwdisk/viv-test/vizviva_brats_2021-main (1)/vizviva_brats_2021-main/dataset/brats.py", line 67, in load_nii
return sitk.GetArrayFromImage(sitk.ReadImage(str(path_folder)))
File "/home/hkw/anaconda3/envs/pytorch/lib/python3.7/site-packages/SimpleITK/SimpleITK.py", line 8876, in ReadImage
return _SimpleITK.ReadImage(*args)
RuntimeError: Exception thrown in SimpleITK ReadImage: /tmp/SimpleITK/Code/IO/src/sitkImageReaderBase.cxx:99:
sitk::ERROR: The file "/media/hkw/hkwdisk/viv-test/vizviva_brats_2021-main (1)/vizviva_brats_2021-main/BRATS2021/Data/valid/BraTS2021_00046_t1.nii.gz" does not exist.

Train problem

Hello author, I want to train all the data.

but I have many problem.

I already downloaded Brats2021 Dataset and make a folder named 'Data', and paste all the data in the Data folder.

but the problem occured when I enter the command 'python train.py --epochs 350', and the error showed like the page.

image

In my opinion, I'm not input the path of dataset in the command. but when I input my path in the command same error occured.

How can I solve this error? Please help me.

Hausdorff Distance(HD95) is not Available during Validation

Dear @himashi92

Thank you for your contribution. In this paper, the HD metrics are part of evaluation metrics and it's required in many BraTS challenges. However, there are no logs for HD metrics during the validation. How should I update the scripts in order to get HD scores for each tumor class? Is there any chance that we can update the scripts which allow us to get full metrics scores?

Thank you

test.py

Hello, I didn't find test.py in the code folder , can you provide it?

Pretrained Model

Hello, first of all, great job. I am trying to use this model and implement it in an app I'm working on. I can't find the pre-trained model if you didn't share it yet is there anyway you can share it with me. My computer isn't strong enough to run the training.
Thanks in advance.

Test Phase Dice Scores

Dear @himashi92

After running test experiments, I only found segmentation mask under segs folder. I would like to know how to get the dice scores of each tumor class as presented in this paper. Please kindly respond with the necessary details.

thank you

Couldn't understand how to test on one instance

Hello i was trying to implement this model on a small application im having two problems:
1- is there a function that i d give the model and the niftii of one patient or the multiple niftii of one patient and it returns a segmented nifti something like test( OneData,Model) : segmentation or isn't there anything like that in this git.
2- Can this run on cpu only or do i need a gpu

Thanks in advance
Great work

prediction

Hi, i used the test.py with the pretrained model that you posted in your git but i got an error, can you please help me fix it
image
image

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.