Comments (7)
[INFO: run_prediction.py: 121]: Running view aggregation on cuda
[INFO: run_prediction.py: 263]: The memory requirements exceeds the available GPU memory, try using a smaller batch size (--batch_size ) and/or view aggregation on the cpu (--viewagg_device 'cpu').Note: View Aggregation on the GPU is particularly memory-hungry at approx. 5 GB for standard 256x256x256 images.
Have you tried setting this to cpu, i.e. --viewagg_device cpu?
from fastsurfer.
Hi, thank you for the reply
I have tried with --viewagg_device cpu - with 16gbs of ram, 2gbs swap
./run_fastsurfer.sh --t1 /home/pavgreen/Documents/LRGS/MRI/freetest/9024/mprage/anat/9024.nii --sid 9024 --sd /home/pavgreen/Documents/LRGS/MRI/freetest/PS2 --viewagg_device cpu --parallel
Though I end up with a different error
python3.8 /home/pavgreen/fastsurfer/FastSurferCNN/run_prediction.py --t1 /home/pavgreen/Documents/LRGS/MRI/freetest/9024/mprage/anat/9024.nii --aparc_aseg_segfile /home/pavgreen/Documents/LRGS/MRI/freetest/PS2/9024/mri/aparc.DKTatlas+aseg.deep.mgz --conformed_name /home/pavgreen/Documents/LRGS/MRI/freetest/PS2/9024/mri/orig.mgz --sid 9024 --seg_log /home/pavgreen/Documents/LRGS/MRI/freetest/PS2/9024/scripts/deep-seg.log --vox_size min --batch_size 1 --viewagg_device cpu --device auto
[INFO: run_prediction.py: 341]: Checking or downloading default checkpoints ...
[INFO: run_prediction.py: 158]: Output will be stored in: /home/pavgreen/Documents/LRGS/MRI/freetest/PS2
[INFO: misc.py: 159]: Using device: cuda
[INFO: run_prediction.py: 121]: Running view aggregation on cpu
[INFO: inference.py: 95]: Loading checkpoint /home/pavgreen/fastsurfer/FastSurferCNN/checkpoints/aparc_vinn_coronal_v2.0.0.pkl
[INFO: inference.py: 95]: Loading checkpoint /home/pavgreen/fastsurfer/FastSurferCNN/checkpoints/aparc_vinn_sagittal_v2.0.0.pkl
[INFO: inference.py: 95]: Loading checkpoint /home/pavgreen/fastsurfer/FastSurferCNN/checkpoints/aparc_vinn_axial_v2.0.0.pkl
[INFO: run_prediction.py: 359]: Analyzing single subject /home/pavgreen/Documents/LRGS/MRI/freetest/9024/mprage/anat/9024.nii
[INFO: run_prediction.py: 247]: Successfully saved image as /home/pavgreen/Documents/LRGS/MRI/freetest/PS2/9024/mri/orig/001.mgz
[INFO: run_prediction.py: 176]: Conforming image
Input: min: 0 max: 8055
rescale: min: 0.0 max: 4180.545 scale: 0.06099683175279778
Output: min: 0.0 max: 255.0
[INFO: run_prediction.py: 247]: Successfully saved image as /home/pavgreen/Documents/LRGS/MRI/freetest/PS2/9024/mri/orig.mgz
Traceback (most recent call last):
File "/home/pavgreen/fastsurfer/FastSurferCNN/run_prediction.py", line 407, in
raise e
File "/home/pavgreen/fastsurfer/FastSurferCNN/run_prediction.py", line 376, in
pred_data = eval.get_prediction(orig_fn, data_array, orig_img.header.get_zooms())
File "/home/pavgreen/fastsurfer/FastSurferCNN/run_prediction.py", line 206, in get_prediction
pred_prob = torch.zeros(shape, **kwargs)
RuntimeError: [enforce fail at alloc_cpu.cpp:66] . DefaultCPUAllocator: can't allocate memory: you tried to allocate 21206401024 bytes. Error code 12 (Cannot allocate memory)
ERROR: Segmentation failed QC checks.
from fastsurfer.
This indicates that you do not have enough memory on the CPU either. What resolution does your image have? In the section "System Requirements" in our README (https://github.com/Deep-MI/FastSurfer#system-requirements) you can get an idea how much memory is needed for which resolution. If you run out of memory with a 7 GB GPU and 16 GB CPU RAM, I assume your image is far below 0.7 mm. Is that correct?
from fastsurfer.
Thank you for the response.
Yes, the resolution is at 0.468 x 0.468 x 1 mm. I might try with a stronger system to compensate.
I read in the --help
notice under recon-surf that going below .7 would be experimental - how big of a difference/error in accuracy is expected from files with a higher resolution compared to .7-1mm ?
from fastsurfer.
.468 is far below .7 and I expect it to fail completely. Our code will interpolate to the smallest voxel dimension (so here it will be .468 isotropic) which is why it gets so large. I would recommend you run at .7 isotropic via --vox_size .7
from fastsurfer.
also is this 3T? The network has never seen a 7T image so that is also very experimental and would require at least some heavy bias field removal as preprocessing.
from fastsurfer.
Thank you for the response and advice, I will try running the image at .7 and see how it goes; and yes the image is in 3T.
Will close now
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.