Add official VoxelMorph CT registration pipeline
This commit is contained in:
23
scripts/setup_env.sh
Executable file
23
scripts/setup_env.sh
Executable file
@@ -0,0 +1,23 @@
|
||||
#!/usr/bin/env bash
|
||||
set -euo pipefail
|
||||
|
||||
ENV_NAME="${ENV_NAME:-voxelmorph-head-ct}"
|
||||
|
||||
conda env create -f environment.yml
|
||||
conda run -n "${ENV_NAME}" python -m pip install --no-cache-dir -r requirements.txt
|
||||
conda run -n "${ENV_NAME}" python - <<'PY'
|
||||
import os
|
||||
os.environ.setdefault("NEURITE_BACKEND", "pytorch")
|
||||
os.environ.setdefault("VXM_BACKEND", "pytorch")
|
||||
|
||||
import torch
|
||||
import voxelmorph as vxm
|
||||
import neurite as ne
|
||||
|
||||
print("torch:", torch.__version__)
|
||||
print("cuda:", torch.cuda.is_available())
|
||||
if torch.cuda.is_available():
|
||||
print("gpu:", torch.cuda.get_device_name(0))
|
||||
print("voxelmorph VxmPairwise:", hasattr(vxm.nn.models, "VxmPairwise"))
|
||||
print("neurite NCC:", hasattr(ne.nn.modules, "NCC"))
|
||||
PY
|
||||
Reference in New Issue
Block a user