Skip to content
Snippets Groups Projects
Commit 3495066f authored by Christopher Randolph Rhodes's avatar Christopher Randolph Rhodes
Browse files

Restored batch example to a working state, confirmed batch jobs run

parent 8f7dba9b
No related branches found
No related tags found
No related merge requests found
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
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment