Skip to content

Commit

Permalink
Merge pull request #388 from AllenCellModeling/amil-multchannel-support
Browse files Browse the repository at this point in the history
🚀 Added plugin support for multi-channel segmentations
  • Loading branch information
amilworks authored Jun 27, 2024
2 parents 27f1075 + ba76e97 commit 6195a66
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 6 deletions.
18 changes: 12 additions & 6 deletions configs/data/im2im/segmentation_plugin.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -33,14 +33,16 @@ transforms:
reader:
- _target_: cyto_dl.image.io.MonaiBioReader
dimension_order_out: ${eval:'"CZYX" if ${spatial_dims}==3 else "CYX"'}
C: 0
# [TRAIN] Exposing C as a configurable param for multi-channel segs
C: ${target_col1_channel}
- _target_: monai.transforms.LoadImaged
keys: ${target_col2}
allow_missing_keys: True
reader:
- _target_: cyto_dl.image.io.MonaiBioReader
dimension_order_out: ${eval:'"CZYX" if ${spatial_dims}==3 else "CYX"'}
C: 0
# [TRAIN] Exposing C as a configurable param for multi-channel segs
C: ${target_col2_channel}
- _target_: monai.transforms.ThresholdIntensityd
allow_missing_keys: True
keys:
Expand Down Expand Up @@ -108,14 +110,16 @@ transforms:
reader:
- _target_: cyto_dl.image.io.MonaiBioReader
dimension_order_out: ${eval:'"CZYX" if ${spatial_dims}==3 else "CYX"'}
C: 0
# [TEST] Exposing C as a configurable param for multi-channel segs
C: ${target_col1_channel}
- _target_: monai.transforms.LoadImaged
keys: ${target_col2}
allow_missing_keys: True
reader:
- _target_: cyto_dl.image.io.MonaiBioReader
dimension_order_out: ${eval:'"CZYX" if ${spatial_dims}==3 else "CYX"'}
C: 0
# [TEST] Exposing C as a configurable param for multi-channel segs
C: ${target_col2_channel}
# load merging mask - assumed not to exist by default
- _target_: cyto_dl.image.io.PolygonLoaderd
keys:
Expand Down Expand Up @@ -184,14 +188,16 @@ transforms:
reader:
- _target_: cyto_dl.image.io.MonaiBioReader
dimension_order_out: ${eval:'"CZYX" if ${spatial_dims}==3 else "CYX"'}
C: 0
# [VAL] Exposing C as a configurable param for multi-channel segs
C: ${target_col1_channel}
- _target_: monai.transforms.LoadImaged
keys: ${target_col2}
allow_missing_keys: True
reader:
- _target_: cyto_dl.image.io.MonaiBioReader
dimension_order_out: ${eval:'"CZYX" if ${spatial_dims}==3 else "CYX"'}
C: 0
# [VAL] Exposing C as a configurable param for multi-channel segs
C: ${target_col2_channel}

- _target_: monai.transforms.ThresholdIntensityd
allow_missing_keys: True
Expand Down
2 changes: 2 additions & 0 deletions configs/experiment/im2im/segmentation_plugin.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@ test: False
source_col: raw
target_col1: seg1
target_col2: seg2
target_col1_channel: 0
target_col2_channel: 0
merge_mask_col: merge_mask
exclude_mask_col: exclude_mask
base_image_col: base_image
Expand Down

0 comments on commit 6195a66

Please sign in to comment.