NOEL-MNI / deepFCD

Automated Detection of Focal Cortical Dysplasia using Deep Learning
https://noel.bic.mni.mcgill.ca/projects/
BSD 3-Clause "New" or "Revised" License
8 stars 3 forks source link

Issue using relative paths for data directories #7

Closed ravnoor closed 2 years ago

ravnoor commented 2 years ago

Description

When using the relative paths for ${IO_DIRECTORY} (see README.md) to execute inference using inference.py, there's a duplication of the ${IO_DIRECTORY} in the args.dir and all subsequent dependent variables -- most notably options['test_folder]. First reported by @creativedoctor via email

Expected Behavior

When executing inference using either ./inference.py FCD_001 t1.nii.gz t2.nii.gz ./data cuda0 1 1 or ./inference.py FCD_001 t1.nii.gz t2.nii.gz /home/user/deepFCD/app/data cuda0 1 1, ./data/FCD_001 should map to /home/user/deepFCD/app/data/FCD_001

Actual Behavior

Instead, ./data maps to ./data/FCD_001/./data/FCD_001/

Possible Fix

Convert all relative path instances of args.dir to absolute paths

Steps to Reproduce

See Expected Behaviour

Context

${IO_DIRECTORY} was placed inside the deepFCD root folder. Untested whether this affects absolute paths outside the deepFCD root folder

Your Environment