Comments (7)
Hey,
I just find out a solution to decrease the memory spending. Since 3 variable:prediction_probability_axial,prediction_probability_coronal, prediction_probability_sagittal
is no longer used after
_, prediction_image = torch.max(torch.add(torch.mul(torch.add(prediction_probability_axial, prediction_probability_coronal), 0.4), torch.mul(prediction_probability_sagittal, 0.2)), 3)
We can use
a = torch.add(prediction_probability_axial, prediction_probability_coronal) del prediction_probability_axial,prediction_probability_coronal
to save the memory used by the two variables. From my experience, this step save 5GB memory and the script will fit in well with 32GB ram system.
Best,
Boyang
from fastsurfer.
Hey,
I will have a look at it, but it is possible that the view aggregation does indeed need a lot of CPU memory due to the large number of feature maps (95 classes).
Best,
Leonie
from fastsurfer.
Thanks a lot. And may I ask how many memory at least is required to run fastsurferCNN/eval.py for one image with size like (179x256x256)?
from fastsurfer.
Your RAM should be sufficient (at least if you run step i CNN segmentation on the GPU, where you might need to reduce batch size, e.g. try 8). On our GPU it takes 40 sec with 8GB RAM (RTX 2080). For the part ii, 32 Gig CPU RAM should really be enough. Only the view aggregation seems to be very memory hungry (probably around 30Gig) so could be that that is the problem if other stuff is loaded.
from fastsurfer.
OK, thanks, I'll try that. Another thing is that does your network support nifti format input? We use nifti format to store our brain mri images.
from fastsurfer.
Hey,
yes, nifti format is supported as well (see also #20 ).
Best,
Leonie
from fastsurfer.
Hey Boyang,
thank you :). I added the change with commit 25609f2. In total, this makes the view aggregation slightly slower (2-4 s on average on my machine). I would however consider this as tolerable given that it assures usage on the 32GB ram system.
Best,
Leonie
from fastsurfer.
Related Issues (20)
- CC values all 0 in aseg+DKT.stats HOT 5
- input image contains negative values and gpu memory issue HOT 6
- Issue creating symbolic links when running fastsurfer-gpu.sif HOT 6
- Error during smooth_aparc.py mode HOT 1
- Error during smooth_aparc.py mode_filter HOT 5
- Biasfield-corrected image input of the segstats.py HOT 4
- Use of '--rm' argument in build.py results in a TypeError HOT 4
- Is it possible to get segstats of cerebellum after run FastSurfer pipeline? HOT 3
- Some zeros in aseg.stats HOT 8
- Fooocus colab stopping with this error HOT 4
- FastSurfer surf pipeline did not finish: Missing .label files (not enough memory for mris_sample_parc) HOT 11
- conform.py bug HOT 2
- srun_fastsurfer.sh on HPC, surface pipeline fails for hundreds but works for tens of subjects HOT 8
- Question about content of wmparc.DKTatlas.mapped.mgz HOT 1
- Support for lesion masks? HOT 1
- Unmatched ROIs in predicted segmentation and provided FastSurfer_ColorLUT.tsv HOT 23
- FastSurfer Segmentation Modules: disable conformation of input image to isometric spaces HOT 5
- FastSurfer QuickSeg doesn't work with OASIS `.img` files HOT 3
- Docker build workflows HOT 5
- Model download issue HOT 22
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from fastsurfer.