Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

make compute_metrics_reloaded.py BIDS-compatible #8

Open
naga-karthik opened this issue Jun 7, 2024 · 1 comment
Open

make compute_metrics_reloaded.py BIDS-compatible #8

naga-karthik opened this issue Jun 7, 2024 · 1 comment

Comments

@naga-karthik
Copy link
Member

Currently, I believe the scripts expects predictions and GTs to be in different folders and based on these lines also expects to be the root directory.

But to be able to run within the sct_run_batch script which typically outputs in bids-format, it would be good to have bids-compatibility for this script as well. (essentially globbing through the prediction and label suffixes instead of looking only for nii.gz files

tagging @valosekj

@valosekj
Copy link
Member

valosekj commented Jun 7, 2024

Currently, I believe the scripts expects predictions and GTs to be in different folders and based on these lines also expects to be the root directory.

Correct! Currently, the script expects two folders: (1) a folder with GTs and (2) a folder with predictions. This allows direct compatibility with nnUNet (and MSD?).

But to be able to run within the sct_run_batch script which typically outputs in bids-format, it would be good to have bids-compatibility for this script as well.

The script can also accept nii files directly (instead of paths to folders). In other words, you can directly specify the abs path to GT and the abs path to the prediction, for example:

python compute_metrics_reloaded.py 
-reference derivatives/labels/sub-01/anat/sub-01_T2w_seg-manual.nii.gz 
-prediction data_processed/sub-01/anat/sub-01_T2w_seg.nii.gz

(essentially globbing through the prediction and label suffixes instead of looking only for nii.gz files

Yes, this is a good idea for future improvement! We could reuse our code.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants