Coder Social home page Coder Social logo

Comments (8)

himashi92 avatar himashi92 commented on June 26, 2024

You can use test.py https://github.com/himashi92/vizviva_brats_2021/blob/main/test.py to make predictions for the given patient data. In this repo, I primarily focus on brain tumor segmentation and patient data comprises multiple modalities.

Yes, you can use a CPU, but I recommend using GPU for both training and inference time.

from vizviva_brats_2021.

billel-a avatar billel-a commented on June 26, 2024

Since there is the pretrained model I was thinking if im not doing a retraining but a simple one data segmentation it ll be fast even on gpu the problem i had working with your test.py is :
line 85 - 86 you have this :
if ngpus == 0:
raise RuntimeWarning("This will not be able to run on CPU only")

and to use test.py do I have to put data in the folder dataset ? cause I was looking to just load them by path each time

from vizviva_brats_2021.

himashi92 avatar himashi92 commented on June 26, 2024

Remove that code fragment. Try using device = torch.device("cpu"), and load model to cpu instead of gpu like this model.to(device).

You have to give your folder dataset path for input_dir parameter https://github.com/himashi92/vizviva_brats_2021/blob/main/config.py#L6

from vizviva_brats_2021.

billel-a avatar billel-a commented on June 26, 2024

yeah but this is used to do a bunch of predictions like all the test data or train data or ...
Sorry to bother you but what im looking for is just one data prediction im working on a niftii visualizer where he ll chose from the GUI the file he wants and i want based on the file he chose i do the prediction and segmentation just for that.
Can you tell me what i have to do ?
And thanks so much for your help

from vizviva_brats_2021.

himashi92 avatar himashi92 commented on June 26, 2024

What is the dataset you gonna use? Is it this brats dataset?
So basically, this model works for multi-modal nifty images. Therefore, when you choose a nifty file you have to choose the folder which has four modalities in it, not a single nifty file. For example, if you choose the patient_01's folder (that is BraTS2021_00000), the file structure looks like this.

BraTS2021_00000
|--------------BraTS2021_00000_flair.nii.gz
|--------------BraTS2021_00000_t1.nii.gz
|--------------BraTS2021_00000_t1ce.nii.gz
|--------------BraTS2021_00000_t2.nii.gz
|--------------BraTS2021_00000_seg.nii.gz

So the chosen input dir from GUI should be BraTS2021_00000 folder path.

from vizviva_brats_2021.

billel-a avatar billel-a commented on June 26, 2024

It shouldnt use the file : BraTS2021_00000_seg.nii.gz isn't this the result file what the model should give as output ?
and for the rest yes i ll be giving it :
|--------------BraTS2021_00000_flair.nii.gz
|--------------BraTS2021_00000_t1.nii.gz
|--------------BraTS2021_00000_t1ce.nii.gz
|--------------BraTS2021_00000_t2.nii.gz

from vizviva_brats_2021.

himashi92 avatar himashi92 commented on June 26, 2024

yes, you are right. But this will be handled by code.

from vizviva_brats_2021.

billel-a avatar billel-a commented on June 26, 2024

Thanks so much

from vizviva_brats_2021.

Related Issues (9)

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.