External Email - Use Caution
Dear All,
I am running into errors using the infant freesurfer tool. Specifically, the error I am getting now is this:
Traceback (most recent call last):
File "/Applications/freesurfer/infantFreesurfer/python/scripts/sscnn_skullstrip", line 74, in <module>
cor_img_data = predict('cor')
File "/Applications/freesurfer/infantFreesurfer/python/scripts/sscnn_skullstrip", line 64, in predict
wmp_standardize=False
File "/Applications/freesurfer/infantFreesurfer/python/packages/sscnn_skullstripping/deeplearn_utils/DeepImageSynth.py", line 261, in from_file
model = load_model(model_filename, custom_objects={'dice_coef_loss2': dice_coef_loss2})
File "/Applications/freesurfer/infantFreesurfer/python/lib/python3.6/site-packages/keras/engine/saving.py", line 259, in load_model
model_config = json.loads(model_config.decode('utf-8'))
AttributeError: 'str' object has no attribute 'decode'
Maybe the skull stripping is failing because of the shoulders in the image?
[image: Screen Shot 2021-08-18 at 12.01.46 PM.png]
Hi Jonathan,
I believe running this should do the trick:
fspython -m pip install h5py==2.10.0
Best, Andrew
From: freesurfer-bounces@nmr.mgh.harvard.edu freesurfer-bounces@nmr.mgh.harvard.edu on behalf of Jonathan A Winawer jonathan.winawer@nyu.edu Date: Wednesday, August 18, 2021 at 12:03 PM To: freesurfer@nmr.mgh.harvard.edu freesurfer@nmr.mgh.harvard.edu Subject: [Freesurfer] infant freesurfer
External Email - Use Caution Dear All,
I am running into errors using the infant freesurfer tool. Specifically, the error I am getting now is this:
Traceback (most recent call last):
File "/Applications/freesurfer/infantFreesurfer/python/scripts/sscnn_skullstrip", line 74, in <module>
cor_img_data = predict('cor')
File "/Applications/freesurfer/infantFreesurfer/python/scripts/sscnn_skullstrip", line 64, in predict
wmp_standardize=False
File "/Applications/freesurfer/infantFreesurfer/python/packages/sscnn_skullstripping/deeplearn_utils/DeepImageSynth.py", line 261, in from_file
model = load_model(model_filename, custom_objects={'dice_coef_loss2': dice_coef_loss2})
File "/Applications/freesurfer/infantFreesurfer/python/lib/python3.6/site-packages/keras/engine/saving.py", line 259, in load_model
model_config = json.loads(model_config.decode('utf-8'))
AttributeError: 'str' object has no attribute 'decode'
Maybe the skull stripping is failing because of the shoulders in the image?
[cid:image001.png@01D7948D.AB701D30]
-- Jonathan Winawer Associate Professor of Psychology and Neural Science
New York University 6 Washington Place New York, NY, 10003 (212) 998-7922 (phone) (212) 995-4018 (fax) jonathan.winawer@nyu.edumailto:jonathan.winawer@nyu.edu MailScanner has detected a possible fraud attempt from "secure-web.cisco.com" claiming to be http://psych.nyu.edu/winawer/http://secure-web.cisco.com/1FTYuRoQ-0hleS-C5onGuzk4JNWPfWogv-vlqseY0HzyUjJoCiHEZHk-q76pFk1nOQg2lcCJrQT4An29qKZqm3KpQoc5MLGEEYREk7bYTdt4Pl2JEwky8z0crH4gpNgeauOIC3OHH3tn-bzvMwMqEjjYFWrsygPnjbdjumzmsnuHh7h_T7dLRHI4XdbpHrJap0Lsg-sr52JzC8PWzj5z9mpOCdvGyYpoMOlgj9VQqkVXPFglHrUMmPikfVKaYojbM8HbyiWVBFjK4SFRnRkqSJA/http%3A%2F%2Fpsych.nyu.edu%2Fwinawer%2F
freesurfer@nmr.mgh.harvard.edu