External Email - Use Caution        

Dear Colleagues,

Hope you're well.

I have been trying to use the thalseg_1.1.h5 patch (MRI Segment Thalamic Nuclei CNN model v1.1 update). I use the following command: 

mri_segment_thalamic_nuclei_dti_cnn --t1 mri/norm.dwispace.mgz --aseg mri/aseg.dwispace.mgz --fa dmri/dtifit_FA.nii.gz --v1 dmri/dtifit_V1.nii.gz --o outputSegmentation.nii.gz --vol measuredVolumes.csv --model /usr/local/freesurfer/7.4.1/models/thalseg_1.1.h5 --threads 3

However, I have been encountering the following error message. I was wondering whether you may be able to help.

many thanks

georgios



Using user-specified model: /usr/local/freesurfer/7.4.1/models/thalseg_1.1.h5
DeprecationWarning: Conversion of an array with ndim > 0 to a scalar is deprecated, and will error in future. Ensure you extract a single element from your array before performing this operation. (Deprecated NumPy 1.25.)
DeprecationWarning: Conversion of an array with ndim > 0 to a scalar is deprecated, and will error in future. Ensure you extract a single element from your array before performing this operation. (Deprecated NumPy 1.25.)
DeprecationWarning: Conversion of an array with ndim > 0 to a scalar is deprecated, and will error in future. Ensure you extract a single element from your array before performing this operation. (Deprecated NumPy 1.25.)
Traceback (most recent call last):
  File "/usr/local/freesurfer/7.4.1/bin/mri_segment_thalamic_nuclei_dti_cnn", line 2551, in <module>
    main()
  File "/usr/local/freesurfer/7.4.1/bin/mri_segment_thalamic_nuclei_dti_cnn", line 164, in main
    predict(
  File "/usr/local/freesurfer/7.4.1/bin/mri_segment_thalamic_nuclei_dti_cnn", line 258, in predict
    net = build_model(model_file_segmentation=path_model_segmentation,
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/freesurfer/7.4.1/bin/mri_segment_thalamic_nuclei_dti_cnn", line 661, in build_model
    net = unet(nb_features=24,
          ^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/freesurfer/7.4.1/bin/mri_segment_thalamic_nuclei_dti_cnn", line 942, in unet
    dec_model = conv_dec(nb_features,
                ^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/freesurfer/7.4.1/bin/mri_segment_thalamic_nuclei_dti_cnn", line 1125, in conv_dec
    input_shape = last_tensor.shape.as_list()[1:]
                  ^^^^^^^^^^^^^^^^^
AttributeError: 'list' object has no attribute 'shape'

--
Georgios P. D. Argyropoulos
PhD, CPsychol, FHEA
Division of Psychology, Faculty of Natural Sciences; University of Stirling; FK9 4LA Scotland UK