Expand the definition of `multichannel` to multiple images within the same contrast
See original GitHub issueMotivation for the feature
Adds more functionality to ivadomed by making it possible to train multichannel models obtained by concatenating different images such as sagittal (acq-sag_T2w)
and axial (acq-ax_T2w
), having same dimensions within the same contrast.
Description of the feature
Currently, the definition of multichannel
as seen here is restrictive as it only allows the training of multichannel models if the image contrasts are different (i.e. if there are T1w and T2w images, then the number of input channels is 2). This leaves out the case where there exist multiple images within the same contrast (i.e. sagittal and axial as mentioned above).
This probably requires refactoring of the existing code so that the multichannel aspect does not depend on the existing contrast-only suffix string (i.e. T1w, T2w) but also is expanded to include the substring acq-sag_<existing-contrast-suffix-here>
and acq-ax_<existing-contrast-suffix-here>
. That is, for e.g. acq-sag_T1w
, acq-ax_T1w
, acq-sag_T2w
, `acq-sag_T2-star’, etc.
Additional context
This feature can also help accommodate (registered) inputs from multiple timepoints (by essentially concatenating them) as done in ms-challenge-2021.
Issue Analytics
- State:
- Created 2 years ago
- Comments:11 (11 by maintainers)
An alternative that was suggested in the meeting to ease the traversal process is to put the different configs in a list. Here is an example based on the previous suggestion:
I suggest to be more inclusive, otherwise in 6 months we will have other cases (eg:
*acq-flip1*
,*run1*
, etc.) and we will have to refactor again.