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

Allow other suffixes than -manual #48

Closed
valosekj opened this issue Jul 6, 2023 · 7 comments
Closed

Allow other suffixes than -manual #48

valosekj opened this issue Jul 6, 2023 · 7 comments
Assignees

Comments

@valosekj
Copy link
Member

valosekj commented Jul 6, 2023

Sometimes, it might be useful to be able to specify other suffixes than -manual; for example -manual_rater1 or -manual_rater2

fname_label = os.path.join(path_out_deriv, subject, ses, contrast,
utils.add_suffix(utils.remove_suffix(filename, args.suffix_files_in),
suffix_dict[task] + '-manual'))

Related issue: #40

@valosekj valosekj self-assigned this Jul 6, 2023
@NathanMolinier
Copy link
Contributor

NathanMolinier commented Jul 10, 2023

I wonder if the simple addition of -manual is BIDS compliant

See https://intranet.neuro.polymtl.ca/data/dataset-curation.html#derivatives-structure
Capture d’écran 2023-07-10 à 15 14 06

@jcohenadad
Copy link
Member

jcohenadad commented Jul 10, 2023

IMO I would not use the suffix "manual" anymore, because:

  • this information is included in the JSON as per previous discussion, where the software OR the rater would be listed in the JSON sidecar
  • in general, to train a DL model, we generate GT by running a pipeline with SOTA software and then manually correct a fraction of it (typically 10-20%). Which means, that the remaining 80-90% are NOT human-corrected, BUT should still be used for DL training.
    • A potential issue with this approach however, is that we need a mechanism to know if a label created by a software has already been reviewed by a human. The 'manual' suffix addresses this problem...
  • The script that trains a DL model would not have to deal with the "-manual" or "manual2", etc. suffixes, but would only search for the type of the label, eg: label-SC_seg, or in the case of multiple raters (see below), label-SC_seg*

@jcohenadad
Copy link
Member

I agree with #48 (comment) about mentioning that a label folders was either manually corrected and/or reviewed by a human (eg: called "labels_manual"). In case there is more than one rater, we could simply at a numerical suffix to the seg suffix. Examples:

```
...
...
├── sub-XXX
│   └── anat
│       └──sub-XXX_T1w.nii.gz
...
...
└── derivatives
    ├── dataset_description.json
    └── manual_labels
        ├── sub-XXX
        │   ├── anat
        │   │   ├──sub-XXX_T1w_label-SC_seg.nii.gz
        │   │   ├──sub-XXX_T1w_label-SC_seg1.nii.gz
        │   │   ├──sub-XXX_T1w_label-SC_seg2.nii.gz
        ...
        ...
```

@valosekj
Copy link
Member Author

We had some additional in-person discussion with @NathanMolinier. We agree with removing the suffix -manual from label filenames.

However, we are a bit reluctant to rename derivatives/labels to derivatives/manual_labels for two reasons:

  • the legacy reasons (all our datasets currently contain derivatives/labels)
  • where would we put the automatically generated labels? Under a second directory (automatic_labels)?

We would stay just with derivatives/labels. This folder will contain both automatically generated as well as manually corrected files (as it is now). The information if the file was generated automatically or manually corrected will be stored in JSON sidecar (discussion here).

...
...
├── sub-XXX
│   └── anat
│       └──sub-XXX_T1w.nii.gz
...
...
└── derivatives
    ├── dataset_description.json
    └── labels
        ├── sub-XXX
        │   ├── anat
        │   │   ├──sub-XXX_T1w_label-SC_seg.nii.gz
        │   │   ├──sub-XXX_T1w_label-SC_seg.json            # will contain information on how it was generated (https://github.com/spinalcordtoolbox/spinalcordtoolbox/issues/3394), and if manually corrected, also the name 
        ...

@valosekj
Copy link
Member Author

In case there is more than one rater, we could simply at a numerical suffix to the seg suffix. Examples:

Good idea!

@jcohenadad
Copy link
Member

However, we are a bit reluctant to rename derivatives/labels to derivatives/manual_labels for two reasons:

i'm OK with that, but in that case we should be consistent and update our current SOP

where would we put the automatically generated labels? Under a second directory (automatic_labels)?

For us, there is often no clear distinction between automatic and manual labels, because labels are first created automatically, and then reviewed manually. The assumption should be that, if there is something under derivatives/ that has been git-annexed, then it has been reviewed by a human and it is correct (whether it was created automatically or not)

@valosekj
Copy link
Member Author

However, we are a bit reluctant to rename derivatives/labels to derivatives/manual_labels for two reasons:

i'm OK with that, but in that case we should be consistent and update our current SOP

Okay! Updated in neuropoly/intranet.neuro.polymtl.ca@729bc53.


Also, regarding my original comment:

Sometimes, it might be useful to be able to specify other suffixes than -manual; for example -manual_rater1 or -manual_rater2

This can be actually achieved by already existing -suffix-files-seg flag. For example, we can use -suffix-files-seg '_seg1'.

--> closing the issue

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

3 participants