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

Clarification of manual-correction.py use cases #44

Open
valosekj opened this issue May 18, 2023 · 1 comment
Open

Clarification of manual-correction.py use cases #44

valosekj opened this issue May 18, 2023 · 1 comment

Comments

@valosekj
Copy link
Member

There was some confusion about how and when to use manual_correction.py script. This issue intends to clarify possible use cases.

Use Case I - manual correction of automatically generated labels

In this use case, images and labels for each subject are located in the same directory, for example:

data_processed
└── sub-amu01
    └── anat
        ├── sub-amu01_T2w.nii.gz         # image
        ├── sub-amu01_T2w_seg.nii.gz     # label
...

data_processed is usually created by sct_run_batch.py. Labels are usually generated automatically, for example, using sct_deepseg_sc. This use case is used for the manual correction of these automatically generated labels. The manually corrected labels are saved under derivatives folder.

Use Case II - re-correction of already existing labels

In this use case, images are located under the root directory, and labels are located under derivatives, for example:

├── derivatives
│   ├── labels
│   │   ├── sub-amu01
│   │   │   ├── anat
│   │   │   │   ├── sub-amu01_T2w_seg-manual.json     # label
│   │   │   │   ├── sub-amu01_T2w_seg-manual.nii.gz
...
├── sub-amu01
│   ├── anat
│   │   ├── sub-amu01_T2w.nii.gz         # image
...

The dataset is usually already git-annexed on our data server (for details see here) and labels under derivatives have already been manually QCed and corrected. This use case is thus just about the re-correction of these already existing labels. The corrected labels overwrite the labels under derivatives folder.

Use Case III - creating labels from scratch

In this use case, only images are available. Either under data_processed or under the root directory of an already git-annexed dataset. For example:

data_processed
└── sub-amu01
    └── anat
        ├── sub-amu01_T2w.nii.gz         # image
...
├── sub-amu01
│   ├── anat
│   │   ├── sub-amu01_T2w.nii.gz         # image
...

The purpose of this use case is to manually create new labels from scratch, for example in the case of MS and SCI lesions (we do not have a robust automatic algorithm) or in the case of vertebral labeling (vertebral labeling fails for some contrast and FOV). The manually created labels are saved under under derivatives folder.

@NathanMolinier
Copy link
Contributor

NathanMolinier commented May 18, 2023

To avoid future confusion regarding these different cases ("which case am I currently facing ?"), I created a pull request to directly specify:

  • the folder where images are stored using -path-img
  • the folder where labels are stored using -path-label
  • the folder where corrected labels will be stored using -path-out

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