External Email - Use Caution
Dear Experts, I'm trying to understand what is the best input choice for running SAMSEG --recon in order to have the closest results as possible when compared against ASEG after executing (separately) an instance of recon-all all (and the raw input files in NIFTI format). I'm very well aware that ASEG and SAMSEG are different methods. I'm using the aseg.stats file as a results of the recon-all all command (here renamed as aseg.recon-all.stats for an easier identification). These stats should be my reference.
Currently I've run the samseg command using the following input variants: 1) raw input file (brain MP-RAGE sequence) converted into a mgz archive (Raw.mgz). samseg --t1w ./Raw.mgz --s 002_S_0685_DIRECT --recon --refmode t1w The corresponding results are attached into (samseg.direct.stats)
2) This time I've used the file T1.mgz which is one of the intermediate results generated after running recon-all -autorecon 1. Specifically, this is the output of (mri_normalize https://secure-web.cisco.com/1JV3nYNrViePm1qpOtzuMUtCndnVtCut-gp7OyXxNuXIOkpE_qcI5f6sZ_QCwSghG1IFvH334gaAg87lJLYfCvB-5zg8wmDlsw6lAdt8aOlOIPUAjSprkajT7zne-FP-hzGKv9CYvWmcSS9XIenkvKBhlfbO8vOv-ei30mFEGRIZaagYtK1Cyf9wmm4QF6GEj7bEzNVr-YBpfnGSNYSLBmufOWzHUZ-r1QCtztrC9tGdBWY2qatrd7cfd8q57QFqlCEFUVwIesthj1klkWBKBIVP9AjfVSX4ZriNvoJLsVcZ6fSYSPrEW5jpjoBoeTUkDy39-cD7pRoNjCcQMll36FQ/https%3A%2F%2Fsurfer.nmr.mgh.harvard.edu%2Ffswiki%2Fmri_normalize -g 1 -mprage nu.mgz T1.mgz). samseg --t1w ./T1W/T1.mgz --s 002_S_0685_DIRECT_T1W --recon --refmode t1w The corresponding samseg.stats file is attached and called (samseg.direct.t1.stats).
3) this time I've used the file brainmask.mgz which is the last intermediate result generated after running recon-all -autorecon 1. Specifically, this is the output of mri_watershed https://secure-web.cisco.com/1DjG5BDGTEbHYOWKmd4lc63SOmX8IrmziV9_NRWhpCskwO6lXP_OANTKjLP4P7zNcWyFmHcUAzXkrwvHQHxjel7Kt6VWmoFp0Dec-s6MAlL-nBlLBeauEFL4752dC7HNmXyvpFp8GB9mROITqzNZ0ZMNc5G-lQL2FfUV5IGX-p1DHRNN5Vw7G8qdIAeHIJYRhKRyuEqIzZ0afOXOYp79zF4m6WaEvzjf_-MVMKRTIk65x00-gMPz3jln6JODEdkkvNPc1Vad_tMdDHjoDPvBUPDKPPmc3p840hpjbk-e2W_eYsL1dczzFZsnkSX25piGNbpcwFN_z2Y_fei_T89237Q/https%3A%2F%2Fsurfer.nmr.mgh.harvard.edu%2Ffswiki%2Fmri_watershed. samseg --t1w ./brainmask.mgz --s 002_S_0685_DIRECT_BRAIN --recon --refmode t1w The corresponding samseg.stats file is attached and called (samseg.brain.stats).
I've noticed that the SAMSEG stats file (samseg.brain.stats) as obtained when using the brainmask.mgz as input file is the closest with the ASEG statistics (aseg.recon-all.stats). I also observe that the unknown volume is the lowest (# Measure Unknown, 5329.102436, mm^3) when using brainmask.mgz as input for SAMSEG, whereas is higher (Measure Unknown, 325302.894793, mm^3) when using T1.mgz as input file and is the highest (Measure Unknown, 946924.354060, mm^3) for the raw input.
I know that for running recon-all we use the raw input files (for example, in NIFTI format), but I wanted to know what is the best possible configuration for SAMSEG in terms of input file in order to have the closest match between SAMSEG and ASEG statistics. Could it be possible to use the intermediate result T1.mgz or brainmask.mgz as input file for running samseg command? Is it a technically correct procedure? Do we need to use only the raw data as input for running samseg --recon command?
Hope this is clear Regards GS
You should not use either T1.mgz as that has been highly processed for other purposes. The brainmask has also been processed, skull stripped and bias correction. I have not looked at what has to happen to get the most correlation between the methods; they are different methods and are supposed to give different results (we hope that samseg is an improvement on the aseg). I recommend using the raw input when specifying recon.
On 3/14/2023 3:26 PM, Giulio Siracusano wrote:
External Email - Use Caution
Dear Experts, I'm trying to understand what is the best input choice for running SAMSEG --recon in order to have the closest results as possible when compared against ASEG after executing (separately) an instance of recon-all all (and the raw input files in NIFTI format). I'm very well aware that ASEG and SAMSEG are different methods. I'm using the aseg.stats file as a results of the recon-all all command (here renamed as aseg.recon-all.stats for an easier identification). These stats should be my reference.
Currently I've run the samseg command using the following input variants:
- raw input file (brain MP-RAGE sequence) converted into a mgz
archive (Raw.mgz). samseg --t1w ./Raw.mgz --s 002_S_0685_DIRECT --recon --refmode t1w The corresponding results are attached into (samseg.direct.stats)
- This time I've used the file T1.mgz which is one of the
intermediate results generated after running recon-all -autorecon 1. Specifically, this is the output of (mri_normalize https://secure-web.cisco.com/1JV3nYNrViePm1qpOtzuMUtCndnVtCut-gp7OyXxNuXIOkpE_qcI5f6sZ_QCwSghG1IFvH334gaAg87lJLYfCvB-5zg8wmDlsw6lAdt8aOlOIPUAjSprkajT7zne-FP-hzGKv9CYvWmcSS9XIenkvKBhlfbO8vOv-ei30mFEGRIZaagYtK1Cyf9wmm4QF6GEj7bEzNVr-YBpfnGSNYSLBmufOWzHUZ-r1QCtztrC9tGdBWY2qatrd7cfd8q57QFqlCEFUVwIesthj1klkWBKBIVP9AjfVSX4ZriNvoJLsVcZ6fSYSPrEW5jpjoBoeTUkDy39-cD7pRoNjCcQMll36FQ/https%3A%2F%2Fsurfer.nmr.mgh.harvard.edu%2Ffswiki%2Fmri_normalize -g 1 -mprage nu.mgz T1.mgz). samseg --t1w ./T1W/T1.mgz --s 002_S_0685_DIRECT_T1W --recon --refmode t1w The corresponding samseg.stats file is attached and called (samseg.direct.t1.stats).
- this time I've used the file brainmask.mgz which is the last
intermediate result generated after running recon-all -autorecon 1. Specifically, this is the output of mri_watershed https://secure-web.cisco.com/1DjG5BDGTEbHYOWKmd4lc63SOmX8IrmziV9_NRWhpCskwO6lXP_OANTKjLP4P7zNcWyFmHcUAzXkrwvHQHxjel7Kt6VWmoFp0Dec-s6MAlL-nBlLBeauEFL4752dC7HNmXyvpFp8GB9mROITqzNZ0ZMNc5G-lQL2FfUV5IGX-p1DHRNN5Vw7G8qdIAeHIJYRhKRyuEqIzZ0afOXOYp79zF4m6WaEvzjf_-MVMKRTIk65x00-gMPz3jln6JODEdkkvNPc1Vad_tMdDHjoDPvBUPDKPPmc3p840hpjbk-e2W_eYsL1dczzFZsnkSX25piGNbpcwFN_z2Y_fei_T89237Q/https%3A%2F%2Fsurfer.nmr.mgh.harvard.edu%2Ffswiki%2Fmri_watershed.
samseg --t1w ./brainmask.mgz --s 002_S_0685_DIRECT_BRAIN --recon --refmode t1w The corresponding samseg.stats file is attached and called (samseg.brain.stats).
I've noticed that the SAMSEG stats file (samseg.brain.stats) as obtained when using the brainmask.mgz as input file is the closest with the ASEG statistics (aseg.recon-all.stats). I also observe that the unknown volume is the lowest (# Measure Unknown, 5329.102436, mm^3) when using brainmask.mgz as input for SAMSEG, whereas is higher (Measure Unknown, 325302.894793, mm^3) when using T1.mgz as input file and is the highest (Measure Unknown, 946924.354060, mm^3) for the raw input.
I know that for running recon-all we use the raw input files (for example, in NIFTI format), but I wanted to know what is the best possible configuration for SAMSEG in terms of input file in order to have the closest match between SAMSEG and ASEG statistics. Could it be possible to use the intermediate result T1.mgz or brainmask.mgz as input file for running samseg command? Is it a technically correct procedure? Do we need to use only the raw data as input for running samseg --recon command?
Hope this is clear Regards GS
Freesurfer mailing list Freesurfer@nmr.mgh.harvard.edu https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer
External Email - Use Caution
Hello experts, I've installed FreeSurfer 7.3.2 and used SynthSeg with --parc --robust and --threads options. The Virtual Machine I use has 4 cores and 20GB of ram, running Ubuntu 18.04. I've executed the same command without --threads option and it works perfectly, even running 4 different subjects at the time. As usual, I've used as input NIFTI archives of raw scans (one .nii file per subject) But, If I run one single subject with SynthSeg and I use --threads option
1, it terminates
with the error underneath:
*SynthSeg-robust 2.0using 4 threadspredicting 1/1terminate called after throwing an instance of 'std::bad_alloc' what(): std::bad_allocAborted (core dumped)*
I've tested with 4, 3, 2 threads and it doesn't work. I've also checked for memory allocation and the maximum it reaches is approx 50%, before terminating. I use tensorflow-cpu==2.12.0
Any help is appreciated
Regards
GS
External Email - Use Caution
Seems like you're running out of memory when using more than 1 threads. Can you allocate more memory to the VM? You can also try running Synthseg without the --robust flag? ________________________________ From: freesurfer-bounces@nmr.mgh.harvard.edu freesurfer-bounces@nmr.mgh.harvard.edu on behalf of Giulio Siracusano giuliosiracusano@gmail.com Sent: Monday, May 1, 2023 4:16 PM To: freesurfer@nmr.mgh.harvard.edu freesurfer@nmr.mgh.harvard.edu Subject: [Freesurfer] SynthSeg terminates with 'std::bad_alloc' error when using --threads option (>1)
External Email - Use Caution
Hello experts, I've installed FreeSurfer 7.3.2 and used SynthSeg with --parc --robust and --threads options. The Virtual Machine I use has 4 cores and 20GB of ram, running Ubuntu 18.04. I've executed the same command without --threads option and it works perfectly, even running 4 different subjects at the time. As usual, I've used as input NIFTI archives of raw scans (one .nii file per subject) But, If I run one single subject with SynthSeg and I use --threads option >1, it terminates with the error underneath:
SynthSeg-robust 2.0 using 4 threads predicting 1/1 terminate called after throwing an instance of 'std::bad_alloc' what(): std::bad_alloc Aborted (core dumped)
I've tested with 4, 3, 2 threads and it doesn't work. I've also checked for memory allocation and the maximum it reaches is approx 50%, before terminating. I use tensorflow-cpu==2.12.0
Any help is appreciated
Regards
GS
External Email - Use Caution
Dear Experts, I'm trying to understand what is the best approach to reconstruct the face of the patient from the MRI scan. I'm well aware that with MiDeFace we can alter the face and skull anatomy enough to anonymize the subject. https://secure-web.cisco.com/1GfgeIkyesQDYDg8YsJmKrV7mZezDHCRHaBrSjy8PwXIVgF...
My question is the opposite, because I'd like to understand which command or sequence of commands to use to reconstruct the face of the patients (for internal reporting) and export as images?
Thanks in advance GS
External Email - Use Caution
Try mkheadsurf
On 9/1/2023 6:46 AM, Giulio Siracusano wrote:
External Email - Use Caution
Dear Experts, I'm trying to understand what is the best approach to reconstruct the face of the patient from the MRI scan. I'm well aware that with MiDeFace we can alter the face and skull anatomy enough to anonymize the subject. *MailScanner has detected a possible fraud attempt from "secure-web.cisco.com" claiming to be* https://secure-web.cisco.com/191T-o63ZaPWgLfGwTg-01X_GqKdgtEx1UGwbOxtDgw1Gzx... https://secure-web.cisco.com/1GfgeIkyesQDYDg8YsJmKrV7mZezDHCRHaBrSjy8PwXIVgFc5soitnqDxuIljQwrCkNtvv6tZQlX7RbPMuKWSI_55Z9WNkVjuGI4Dsdi2R7vk2mEvktTSCSOUqQ4CDGCfd8qwsE4p86YEABksS5FxFt0a8J416R3isYWledREUp8VbfqdT3ADcEMWNEOa0_AWmVxPApQCjCx5qjdRV1Vof2CyHGpnl1R0-U9Hqq_5B2RE-7U8jR_l6eFrUPtR0zTXH14XmLd_BnL0Yol2ZrPVNn1h-TSJUwhJCc_-Kf1A5-eNMf6l1bOq7wD_tObPWmdJPj6jCkOIDFssr-Ekg64vzA/https%3A%2F%2Fsurfer.nmr.mgh.harvard.edu%2Ffswiki%2FMiDeFace
My question is the opposite, because I'd like to understand which command or sequence of commands to use to reconstruct the face of the patients (for internal reporting) and export as images?
Thanks in advance GS
Freesurfer mailing list Freesurfer@nmr.mgh.harvard.edu https://secure-web.cisco.com/1TwLevtTq2Hct42k-Ra16Mbsi6iiDIwFkPUbyczfHUnNIOo...
freesurfer@nmr.mgh.harvard.edu