This Docker image provides an environment for running a CNN-based
processing pipeline for the automatic calculation of the
Hippocampal-to-Ventricle ratio. The main entry point is
main.py, which processes neuroimaging data, generates segmentations,
and computes various metrics. The image is built using Micromamba for
efficient environment management and supports both CPU and GPU
execution.
Pull the Docker image from DockerHub:
docker pull soffiafdz/hvr_cnn:latest
docker run --rm \
-v $(pwd)/data:/app/data \
-v $(pwd)/output:/app/output \
soffiafdz/hvr_cnn:latest \
-f /app/data/input.csv -o /app/output
Ensure the following:
/app/output to persist results after
the container stops.Example:
$(pwd)/data$(pwd)/outputTo utilize GPU acceleration, ensure:
NVIDIA drivers and the NVIDIA Container Toolkit are installed on the host machine.
Run the container with GPU access:
docker run --rm \
--gpus all \
-v $(pwd)/data:/app/data \
-v $(pwd)/output:/app/output \
soffiafdz/hvr_cnn:latest \
-f /app/data/input.csv -o /app/output
Specify a CSV file with the -f or --csv_file flag. The CSV file
should contain columns for subject information, including:
subject_id (optional)
session_id (optional)
input_img_path (mandatory)
group (optional)
Example:
subject_id,session_id,input_img_path,group
subj_001,sess_001,/app/data/img1.mnc,control
subj_002,sess_002,/app/data/img2.mnc,patient
Command:
docker run --rm \
-v $(pwd)/data:/app/data \
-v $(pwd)/output:/app/output \
soffiafdz/hvr_cnn:latest \
-f /app/data/input.csv -o /app/output
Provide an image path with -i or --input_img_path:
docker run --rm \
-v $(pwd)/data:/app/data \
-v $(pwd)/output:/app/output \
soffiafdz/hvr_cnn:latest \
-i /app/data/img1.mnc -o /app/output
If -o or --output_dir is not specified, results are saved to
/app/output inside the container. Mount a volume to persist these
files:
-v $(pwd)/output:/app/output
Directory: /app/output/segmentations
Format: .mnc
Enable with --qc or --qc_images
Directory: /app/output/qc
Format: .jpg
Generate volume-related outputs:
--hc_vols: Hippocampal volumes CSV.
--vc_vols: Ventricular volumes CSV.
--hvr_csv: Hippocampal-to-Ventricular Ratio (HVR) CSV.
-f, --csv_file: Path to input CSV file.
-i, --input_img_path: Path(s) to input image(s).
-s, --subject_id: Subject ID(s).
-v, --session_id: Session ID(s).
-o, --output_dir: Directory for output files.
--qc: Include QC images in the output.
--hc_vols, --vc_vols, --hvr_csv: Save specific metrics to CSV.
PYTHONPATH: Set to /app to enable module imports.docker run --rm \
-v $(pwd)/data:/app/data \
-v $(pwd)/output:/app/output \
soffiafdz/hvr_cnn:latest \
-f /app/data/input.csv -o /app/output --qc --hc_vols
docker run --rm \
-v $(pwd)/data:/app/data \
-v $(pwd)/output:/app/output \
soffiafdz/hvr_cnn:latest \
-i /app/data/img1.mnc -o /app/output --qc
This Docker image and associated code are licensed under GNU General Public License v3.0.
For questions or issues, contact [email protected].
Content type
Image
Digest
sha256:3be726dd5…
Size
4 GB
Last updated
over 1 year ago
docker pull soffiafdz/hvr_cnn