From 3495066f3cc9216323afe704a6b5d7ecaff51024 Mon Sep 17 00:00:00 2001 From: Christopher Rhodes <christopher.rhodes@embl.de> Date: Thu, 26 Oct 2023 10:42:50 +0200 Subject: [PATCH] Restored batch example to a working state, confirmed batch jobs run --- .../20230805_kristineberg_PA.py | 0 .../20230807_kristineberg_spiked.py | 0 .../20231008_Bilbao_PA.py | 0 .../{actual_runs => batch_jobs}/__init__.py | 0 .../proj0004-exp0038-fixed.py | 0 .../chaeo/examples/batch_run_patches.py | 42 ------------------- 6 files changed, 42 deletions(-) rename extensions/chaeo/{actual_runs => batch_jobs}/20230805_kristineberg_PA.py (100%) rename extensions/chaeo/{actual_runs => batch_jobs}/20230807_kristineberg_spiked.py (100%) rename extensions/chaeo/{actual_runs => batch_jobs}/20231008_Bilbao_PA.py (100%) rename extensions/chaeo/{actual_runs => batch_jobs}/__init__.py (100%) rename extensions/chaeo/{actual_runs => batch_jobs}/proj0004-exp0038-fixed.py (100%) delete mode 100644 extensions/chaeo/examples/batch_run_patches.py diff --git a/extensions/chaeo/actual_runs/20230805_kristineberg_PA.py b/extensions/chaeo/batch_jobs/20230805_kristineberg_PA.py similarity index 100% rename from extensions/chaeo/actual_runs/20230805_kristineberg_PA.py rename to extensions/chaeo/batch_jobs/20230805_kristineberg_PA.py diff --git a/extensions/chaeo/actual_runs/20230807_kristineberg_spiked.py b/extensions/chaeo/batch_jobs/20230807_kristineberg_spiked.py similarity index 100% rename from extensions/chaeo/actual_runs/20230807_kristineberg_spiked.py rename to extensions/chaeo/batch_jobs/20230807_kristineberg_spiked.py diff --git a/extensions/chaeo/actual_runs/20231008_Bilbao_PA.py b/extensions/chaeo/batch_jobs/20231008_Bilbao_PA.py similarity index 100% rename from extensions/chaeo/actual_runs/20231008_Bilbao_PA.py rename to extensions/chaeo/batch_jobs/20231008_Bilbao_PA.py diff --git a/extensions/chaeo/actual_runs/__init__.py b/extensions/chaeo/batch_jobs/__init__.py similarity index 100% rename from extensions/chaeo/actual_runs/__init__.py rename to extensions/chaeo/batch_jobs/__init__.py diff --git a/extensions/chaeo/actual_runs/proj0004-exp0038-fixed.py b/extensions/chaeo/batch_jobs/proj0004-exp0038-fixed.py similarity index 100% rename from extensions/chaeo/actual_runs/proj0004-exp0038-fixed.py rename to extensions/chaeo/batch_jobs/proj0004-exp0038-fixed.py diff --git a/extensions/chaeo/examples/batch_run_patches.py b/extensions/chaeo/examples/batch_run_patches.py deleted file mode 100644 index dcb35207..00000000 --- a/extensions/chaeo/examples/batch_run_patches.py +++ /dev/null @@ -1,42 +0,0 @@ -from pathlib import Path - -from model_server.util import autonumber_new_directory, get_matching_files, loop_workflow -from extensions.chaeo.workflows import export_patches_from_multichannel_zstack - -if __name__ == '__main__': - where_czi = 'z:/rhodes/projects/proj0004-marine-photoactivation/data/exp0038/AutoMic/20230906-163415/Selection' - where_output = autonumber_new_directory( - 'c:/Users/rhodes/projects/proj0011-plankton-seg/exp0009/output', - 'batch-output' - ) - - px_ilp = Path.home() / 'model-server' / 'ilastik' / 'AF405-bodies_boundaries.ilp' - - params = { - 'ilastik_project_file': px_ilp.__str__(), - 'pxmap_threshold': 0.25, - 'pixel_class': 0, - 'zmask_channel': 0, - 'patches_channel': 4, - 'mask_type': 'boxes', - 'zmask_filters': {'area': (1e3, 1e8)}, - 'zmask_expand_box_by': (128, 3), - 'export_pixel_probabilities': True, - 'export_2d_patches_for_training': True, - 'export_2d_patches_for_annotation': True, - 'export_3d_patches': False, - 'export_annotated_zstack': False, - 'export_patch_masks': True, - } - - input_files = get_matching_files(where_czi, 'czi', coord_filter={'P': (0, 10)}, ) - - loop_workflow( - input_files, - where_output, - export_patches_from_multichannel_zstack, - params, - catch_and_continue=False, - ) - - print('Finished') \ No newline at end of file -- GitLab