This file is written for terminal coding agents such as OpenAI Codex and Anthropic Claude Code. It provides the exact steps needed to reproduce the VoxelOpt abdomen CT registration result without touching unrelated files.
- Work from the repository root.
- Do not commit
abdomenreg/,logs_abct/,.npy,.npz,.nii, or.nii.gzfiles. - Keep the public source surface focused on VoxelOpt:
get_unet_features.py,test_abdomen.py,abdomenreg_loader.py,costVolComplex.py, and the metric/warping utilities. - Prefer a one-pair smoke test before the full 42-pair evaluation.
- Use one GPU at a time with
--gpu_id; this repo does not need multi-GPU launchers.
conda create -n voxelopt python=3.9 -y
conda activate voxeloptInstall PyTorch for the target CUDA version from the official PyTorch selector:
https://pytorch.org/get-started/locally/
Then install Python dependencies:
pip install -r requirements.txtDownload the preprocessed abdominal CT registration data:
https://www.dropbox.com/scl/fo/1ri37zp2awc1e218p0zjx/AHw9tXM-wowNqT8WzG6Uq5c?rlkey=ppgyoll7vzzg6hgdz8uzt9h7q&st=drein7eg&dl=0
The repository root should look like:
VoxelOpt/
abdomenreg/
img/img0001.nii.gz ... img0030.nii.gz
label/label0001.nii.gz ... label0030.nii.gz
src/
unet.pth
The default scripts use the test split subjects 0024 to 0030.
python src/get_unet_features.py --data_path ./abdomenreg --split test --gpu_id 0 --overwriteExpected generated files:
abdomenreg/fea/img0024.npy
...
abdomenreg/fea/img0030.npy
Run one ordered pair before launching the full evaluation:
python src/test_abdomen.py --data_path ./abdomenreg --gpu_id 0 --max_pairs 1Expected behavior:
- It reports
Dataset size: 42. - It writes
logs_abct/results_ks1_half1_ada1_foundation_n1.csv. - The first pair should complete without CUDA out-of-memory.
python src/test_abdomen.py --data_path ./abdomenreg --gpu_id 0Expected output CSV:
logs_abct/results_ks1_half1_ada1_foundation.csv
Expected metrics are approximately:
Dice: 58.5%
HD95: 18.5
SDLogJ: 0.21
For Codex or Claude Code:
Read README.md and INSTALL.md. Verify the VoxelOpt reproduction setup without
committing generated data. First run the one-pair smoke test, then summarize
whether the full 42-pair command is ready.
Run feature extraction for abdomenreg test subjects and then run the VoxelOpt
Table 1 evaluation on GPU 0. Do not modify source files unless a command fails;
if it fails, inspect the traceback and make the smallest fix.
Generated outputs should stay untracked:
git status --shortIf present, these should not be committed:
abdomenreg/
logs_abct/
__pycache__/
*.npy
*.npz
*.nii.gz