samihs-ich-segmentation / scripts /run_segment_example.sh
MooreMuaMu's picture
Add SAMIHS ICH segmentation package
29aaa12 verified
Raw
History Blame Contribute Delete
439 Bytes
#!/usr/bin/env bash
set -euo pipefail
if [[ $# -lt 2 ]]; then
echo "Usage: $0 <input_ct.nii.gz> <output_mask.nii.gz> [cuda_device]" >&2
exit 2
fi
INPUT_NII="$1"
OUTPUT_NII="$2"
DEVICE="${3:-cuda:0}"
/data/wxh/miniconda3/envs/flowmatching/bin/python \
/data/wxh/Medical/samihs_ich_segmentation_package/segment_ich.py \
--input "$INPUT_NII" \
--output "$OUTPUT_NII" \
--device "$DEVICE" \
--batch-size 8 \
--threshold 0.5