From 09b24fa8946f112e892462591d6e1bba0a373f45 Mon Sep 17 00:00:00 2001 From: Christopher Rhodes <christopher.rhodes@embl.de> Date: Sun, 22 Oct 2023 08:22:07 +0200 Subject: [PATCH] Elevate patch annotations to workflow params --- .../chaeo/actual_runs/20230805_kristineberg_PA.py | 1 + extensions/chaeo/workflows.py | 11 +++++++---- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/extensions/chaeo/actual_runs/20230805_kristineberg_PA.py b/extensions/chaeo/actual_runs/20230805_kristineberg_PA.py index bca4017f..e359ccc9 100644 --- a/extensions/chaeo/actual_runs/20230805_kristineberg_PA.py +++ b/extensions/chaeo/actual_runs/20230805_kristineberg_PA.py @@ -39,6 +39,7 @@ if __name__ == '__main__': 'zmask_expand_box_by': (128, 3), 'export_pixel_probabilities': True, 'export_2d_patches_for_training': True, + 'draw_bounding_box_on_2d_patch': True, 'export_2d_patches_for_annotation': True, 'export_3d_patches': False, 'export_annotated_zstack': True, diff --git a/extensions/chaeo/workflows.py b/extensions/chaeo/workflows.py index 0a441bf6..bf1503e4 100644 --- a/extensions/chaeo/workflows.py +++ b/extensions/chaeo/workflows.py @@ -31,6 +31,9 @@ def export_patches_from_multichannel_zstack( export_pixel_probabilities=True, export_2d_patches_for_training=True, export_2d_patches_for_annotation=True, + draw_bounding_box_on_2d_patch=True, + draw_contour_on_2d_patch=False, + draw_mask_on_2d_patch=False, export_3d_patches=True, export_annotated_zstack=True, export_patch_masks=True, @@ -85,7 +88,7 @@ def export_patches_from_multichannel_zstack( zmask_meta, prefix=fstem, draw_bounding_box=False, - rescale_clip=0.0, + rescale_clip=0.001, make_3d=True, ) ti.click('export_3d_patches') @@ -101,11 +104,11 @@ def export_patches_from_multichannel_zstack( focus_metric='max_sobel', ch_white=patches_channel, ch_rgb_overlay=rgb_overlay_channels, - draw_bounding_box=False, + draw_bounding_box=draw_bounding_box_on_2d_patch, bounding_box_channel=1, bounding_box_linewidth=2, - # draw_contour=True, - draw_mask=True, + draw_contour=draw_contour_on_2d_patch, + draw_mask=draw_mask_on_2d_patch, overlay_gain=rgb_overlay_weights, ) df_patches = pd.DataFrame(files) -- GitLab