Skip to content

Conversation

@af-a
Copy link
Contributor

@af-a af-a commented Jul 10, 2023

Description

This PR upgrades the FastSurfer environment with the latest dependency versions (as permitted by compatiblities and pip/conda requirements). The main targets were newer Ubuntu (22.04), Python (3.10), Pytorch (2.0.0+), and Freesurfer (7.4.1) versions; all other packages were upgraded accordingly.

The versions have been updated in the pip requirements.txt/requirements_cpu.txt (and requirements.in) files and the conda files: fastsurfer_env_gpu.yml, fastsurfer_env_cpu.yml, and fastsurfer_reconsurf.yml. The Dockerfiles (except for Dockerfile_FastSurferCNN_AMD) were also updated.

In initial tests on a 1mm case (using all Dockerfiles), FastSurfer builds and runs through successfully.

Note:

  • We upgraded to Python 3.10 instead of 3.11 because i) 3.10 is native in Ubuntu 22.04 and ii) Pytorch 2.0.0 does not yet support 3.11, particularly for conda-based installs (see here).
  • In the conda env files, torch and torchvision are now installed through pip, since conda can not create a valid environment with the latest versions (process never terminates).
  • In the initial tests, we observed some differences in the outputs of the surface pipeline (different values in statistics files) but not the segmentation pipeline. This indicates that new versions of the Python packages used in scripts within the pipeline produce different results. This will be investigated further and full validation runs will be executed to examine effects on global evalution metrics, if any.
  • The PYTHON_VERSION arguments in the Dockerfiles were removed, as they seem to be unused.
  • The Freesurfer upgrade breaks a check in recon-surf.sh; this was already fixed in Robustify mris_info string comparison to number of spaces (for FS741) #341.

Update: Full validation tests (DSC, test-retest, and group analyses) show minor differences after the upgrade.

Version List

The following is a list of the upgraded packages:

  • Ubuntu: 20.04 --> 22.04
  • Python: 3.8 --> 3.10
  • Miniconda: py38_4.11.0 --> py310_23.3.1
  • Freesurfer: 7.3.2 --> 7.4.1
  • lapy: 0.4.1 --> 1.0.1
  • matplotlib: 3.5.1 --> 3.7.1
  • nibabel: 3.2.2 --> 5.1.0
  • numpy: 1.23.5 --> 1.25.0
  • pandas: 1.4.3 --> 1.5.3
  • pillow: 9.2.0 --> 9.5.0
  • pip: 21.2.4 --> 23.1.2
  • scikit-image: 0.19.2 --> 0.19.3
  • scikit-learn: 1.1.2 --> 1.2.2
  • scipy: 1.8.0 --> 1.10.1
  • setuptools: 59.5.0 --> 67.8.0
  • simpleitk: 2.1.1 --> 2.2.1
  • tensorboard: 2.9.1 --> 2.12.1
  • torch: 1.12.0 --> 2.0.1 (CUDA: 11.3 --> 11.7)
  • torchvision: 0.13.0 --> 0.15.2 (CUDA: 11.3 --> 11.7)
  • tqdm: 4.64 --> 4.65.0

TODOs

  • Verify whether changes need to be made to python scripts in the surface pipeline due to the Freesurfer upgrade (probably not).
  • Run "quick tests" (multiple subjects and image resolutions).
  • Run full validation tests.

@m-reuter m-reuter merged commit 71ee135 into Deep-MI:dev Jul 14, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants