# FreeSurfer synth-tools Python env — CPU profile.
#
# Versions track upstream freesurfer/python/requirements-build-py38.txt
# (relaxed to >= where exact pinning isn't justified). Updated when a Synth
# tool fails on a newer wheel.

# --- ML runtimes (CPU wheels) -----------------------------------------------
# Plain tensorflow, not tensorflow-cpu: tensorflow-cpu has no aarch64 wheels and
# tf-keras depends on tensorflow. Without [and-cuda] it runs on the CPU.
tensorflow>=2.19,<2.20
# SynthSeg, SynthSR and SynthMorph are written against the Keras 2 API
# (BatchNormalization(fused=...), tf.keras.backend), which TF >= 2.16's Keras 3
# rejects. tf-keras is Keras 2 for the same TF minor; fspython sets
# TF_USE_LEGACY_KERAS=1 so tensorflow.keras resolves to it. Keep the two minors equal.
tf-keras>=2.19,<2.20
# torch CPU wheel is selected by the pytorch.org cpu index in setup tool.
torch>=2.2,<2.6

# --- FreeSurfer-adjacent neuroimaging stack --------------------------------
surfa>=0.5
nibabel>=5.1
numpy>=1.24,<3
scipy>=1.10
h5py>=3.10
scikit-image>=0.21
scikit-learn>=1.3
SimpleITK>=2.3

# --- SynthMorph ------------------------------------------------------------
# mri_synthmorph imports voxelmorph and neurite, which are not on PyPI at the
# versions FreeSurfer uses; these are upstream's commits
# (freesurfer-8.2.0/python/requirements-build.txt). Needs git at setup time.
neurite @ git+https://github.com/adalca/neurite.git@95b2b568b124cbc654467177ddcdb2cb3526788c
voxelmorph @ git+https://github.com/voxelmorph/voxelmorph.git@feb74e0541b8a390ccd2ea57b745aa8808703ca4

# --- Synth-tool helpers (small, pure-python) -------------------------------
pyyaml
tqdm
matplotlib
