External Email - Use Caution Forwarding Koen's and my answers
________________________________ From: Koen Van Leemput <leem...@gmail.com> Sent: 01 February 2021 10:22 To: Stefano Cerri Cc: David Kamson Subject: Re: SAMSEG questions Hi Stefano and David, Regarding GPU/tensorflow issues, Andrew recommended running fspython -c 'import tensorflow' to diagnose what the problem is. Koen On Mon, Feb 1, 2021 at 3:04 AM Stefano Cerri <s...@dtu.dk<mailto:s...@dtu.dk>> wrote: Hi David, 1a) It depends on what analysis you are doing, but in general I would correct with SBTIV the longitudinal analysis as well. 1b) I assume you are computing volumes on the seg.mgz file with 3D slicer. The samseg.stats file is computed from "soft segmentations", i.e. probabilistic maps of each individual structure. These maps can be obtained by adding the flag --save-posteriors. 1c) This file is a scaling factor to obtain a certain average intensity in a target structure. It is used later on in the FreeSurfer pipeline for creating the wm mask and surfaces. It is unrelated to volume analysis/correction. 2) On this page (http://secure-web.cisco.com/1VcMQfGu6N_o0lPCGE8rKcisZZBWi7SnvF0e_eGMHnEZteuuyFGC1JWikLxqIPBcAWp5JqL_smf-VaF4qhjiWViKn9qxcnCkxg7GAyYSFXefq67wcJIem-hW6vYV_JtLGorQG1zwzl6AyNPHCiUG9pYrsO-ez2hRqRKImnUSzS3tU62LCoX36sBrLvWhL4S0KbHH3vhX19mVCKe2ClTR6vfDbNaYBx_v8DpbvzM3phbF1IwJ126NTjj6mDCBAU1COLWVpT56iKTaVgMl4PjYAmQ/http%3A%2F%2Ffreesurfer.net%2Ffswiki%2FDownloadAndInstall) there is a link for downloading the development version. Installation is then similar to Freesurfer 7.1, you just need to change the name of the downloaded file. Remember that it is essential to process all your subjects with the same version of FreeSurfer. 3) If you have both Tensorflow versions, the latest installed version is used. If you have the GPU version installed and the CPU is used, it means that Tensorflow has some problems locating your cuda/cudnn libraries. Unfortunately, I can't help much here. The specific cuda/cudnn libraries depend on your specific OS and GPU graphic card. Also note that the GPU is used only in the last part of the algorithm, during the sampling phase. Hope this helps. Best, Stefano ________________________________ From: David Kamson <dkams...@jhmi.edu<mailto:dkams...@jhmi.edu>> Sent: 30 January 2021 20:45 To: Stefano Cerri; freesurfer@nmr.mgh.harvard.edu<mailto:freesurfer@nmr.mgh.harvard.edu> Cc: leem...@gmail.com<mailto:leem...@gmail.com> Subject: SAMSEG questions Hey Stefano, Thanks for the quick responses! Your arxiv.org<http://secure-web.cisco.com/1fCw1M5LHKguprGZaKGYWYPrl-nXSWhkOsGqvsvmcZq9aDpS39tS9GEwju4eAyi6oBeINz-ftbm47UeG80_-_aj8qQy0gXR5lqioso_zGyPjAj_lbaBBgXoYpyBilNs_L3DoyDCodqha0UoT-7R7cuNaVXB_EUk-_ktIdi5k1MIT8vHWocYxuNEeaGNoYClBB69GNRYskQ4mqMpiN9eZQT-rY6PLOCunUQZlvlurxMI3pQ7dy7pXg6XObezP_WqN_thNUk4pe4FfcQOzWouUrFA/http%3A%2F%2Farxiv.org> paper is very helpful! I was wondering if you could help me with some of the follow up questions: 1) SAMSEG long should compute more consistent longitudinal structural volumes than SAMSEG while detecting better volumetric group differences (cf. Table 1 and Fig 3 of https://secure-web.cisco.com/1GQa4CGwElUY2mW4Sq82w19at83-bnSN-rjbzKNFRS6VfQlnzCi3ZU8Ffxk4qAsp26ZsgZrNlTxsP2kxSroyCWre8PZFDfS0Z-W-XaGd9BqJ6cySqQZEG_F09hMlfdVaco75IFqHk9T5ZEhSjX11A8DtM-wX_SZ4VnlI8kP4wa_Pq0k-boU8MACbfslY70MiYP_0QqsfAKluXYLeFyIUV03Wo7HTFUT6ZnsE_bkQM5VO5-cRsIa_cIClFeRjkDfsPSdGRG8l5Rl41k4oGo1R7pw/https%3A%2F%2Farxiv.org%2Fpdf%2F2008.05117.pdf). Yes, using SBTIV for correcting volume changes from different scanners would be beneficial and most probably necessary. * Do you recommend using the SBTIV correction for the longitudinal analyses as well? * The volumes I get if I look at the statistics for SEG in 3D slicer, they differ by up to 2%. Is there another scaling factor applied in the samseg.stats file? * What is the the SUBJ_scaling.txt file referring to? Should I use that to make corrections? 2) The lesion version of SAMSEG long is available in the development version. Enabling the lesion extension can be done by adding the same flag(s) as for the cross-sectional lesion version (--lesion, see the Wiki for details: https://secure-web.cisco.com/1zxjznTdMuBEIc1Dx0NZk6wpPdZ8iSQLZ2MiValYSz09WGuNESSkIMq0XjWkZ2ScIRPkKm77GwYCF737UNAyXFy7zQYTO-kuyaxwysbN1GHucyHI6XeJVKdhG77Qmh5licBbRTJF1psHEvXPe4ZkewlpeksEsbgH17ZDqwoIKKnR-rxyKJoGcSnqorm5pWo7Adyd2KWP0Ko-vbe6KvKNnG2DEhuJwq2j92igFi-gG5NKlAEgWOragTCJzG-tTJVUwltvGpoY9-4kvHTII8Y11NQ/https%3A%2F%2Fsurfer.nmr.mgh.harvard.edu%2Ffswiki%2FSamseg) Thank you! Unfortunately the wiki doesn’t specify how I could get access to the development version? 3) We never conducted extensive experiments for the number of burn-in and samples for the MCMC scheme, but we found that 50 burn-in and 50 samples lead to robust and replicable lesion segmentation results. Increasing these two numbers might increase the lesion segmentation performance, although differences might be minimal and the overall computational cost high. We suggest to not decrease these two numbers as lesion performance could potentially decrease. This is very very helpful! Is there a way to force CUDA for the in the lesion segmentation? In order for me to be able to run the lesion segmentation under Ubuntu, I had to install both the CPU and the GPU tensorflow, and it does not seem to use the GPU at all (TensorFlow puts out the CPU specs but not the GPU and GPU utilization % doesn’t change during the processing). Thank you for the help! David Hi FreeSurfers, Thank you for sharing the new SAMSEG tool, which I consider a major breakthrough in image processing! I have a few questions about using SAMSEG vs SAMSEG_Long: 1. What volumetric differences should I expect between running SAMSEG on individual images, vs. using SAMSEG_Long for the longitudinal analysis? Could I use SBTIV to adjust differences between scans? (all images are FLAIRs preprocessed using mrI_robust_template) 2. Is there currently a way to integrate lesion segmentation into the SAMSEG_long?s longitudinal analysis? 3. What is the expected impact of increasing or decreasing -Burn-In and -Sample numbers for lesion segmentation? Thank you for all the help! Best, Dave Kamson
_______________________________________________ Freesurfer mailing list Freesurfer@nmr.mgh.harvard.edu https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer