This guide provides instructions to build and run the DeepWMH brain segmentation tool inside a Docker container.
Clone the main repository locally and move into the Docker setup folder:
cd dockerOptionally configure the Dockerfile, then build the Docker image using:
docker build -t <image_name> .Replace <image_name> with your preferred image tag (e.g., deepwmh:predict).
There are two ways to run the segmentation pipeline:
This script processes images and generates logs automatically.
./run_deepwmh.sh- Logs will be saved to the
logs/directory. - Output will be stored in the
output/directory.
You can also run the tool directly from the command line:
docker run --rm --gpus all \
-v /path/to/data:/data \
-v /path/to/output:/output \
deepwmh:predict \
-i /data/<flair_image> \
-n <subject_id> \
-m /model \
-o /output/<subject_id> \
-g 0 &Make sure to replace:
/path/to/datawith the path to your FLAIR input images./path/to/outputwith the desired output directory.<flair_image>,<subject_id>, and/modelwith your specific filenames/paths.
If you need to troubleshoot or access the container interactively:
docker build -t deepwmh:shell --build-arg ENTRYPOINT="/bin/bash" .docker run --gpus all --restart always -dit --name deepwmh deepwmh:shelldocker exec -it deepwmh /bin/bash- Make sure NVIDIA drivers and CUDA are correctly installed on your host machine.
- Use
install_services.shto set up and download required services. - The model
.zipfile should be placed in thedocker/directory before building the image. It will be copied into the container during the build process.