sct-pipeline / contrast-agnostic-softseg-spinalcord

Contrast-agnostic spinal cord segmentation project with softseg
MIT License
4 stars 3 forks source link

Add reorientation to RPI also for train/val transforms #103

Closed valosekj closed 5 months ago

valosekj commented 7 months ago

Currently, reorientation to RPI is explicitely specified only for inference_transforms:

https://github.com/sct-pipeline/contrast-agnostic-softseg-spinalcord/blob/59e6229a32fa68b20d8fae6e4cb73cd07a7a243b/monai/transforms.py#L44

This makes sense because spine-generic images used for train/val were already reoriented to RPI before training. So we need to reorient to RPI only images we run inference on.

But, with new data coming to the training, it would be a good idea to use Orientationd(keys=["image", lbl_key], axcodes="RPI") also for train_transforms and val_transforms.

naga-karthik commented 7 months ago

Thanks for opening the issue! I missed this when creating release v2.1 -- this will be fixed in the next release!

naga-karthik commented 7 months ago

This has been added in commit https://github.com/sct-pipeline/contrast-agnostic-softseg-spinalcord/commit/8b2ff11f398aeefd38ffe15017310490eca4499c as part of the next updates in my new branch nk/new-model

naga-karthik commented 5 months ago

closing as this is the default now and has been fixed