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

Updated existing export jobs with new argument names and model objects that...

Updated existing export jobs with new argument names and model objects that are initiated outside workflow scope
parent 05f86dd8
No related branches found
No related tags found
No related merge requests found
......@@ -2,7 +2,7 @@ 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
from extensions.ilastik.models import IlastikPixelClassifierModel
from model_server.accessors import CziImageFileAccessor, write_accessor_data_to_file, InMemoryDataAccessor
from model_server.process import rescale
......@@ -29,12 +29,11 @@ if __name__ == '__main__':
px_ilp = Path('c:/Users/rhodes/projects/proj0011-plankton-seg/exp0016/pxAF405_dim8bit.ilp')
params = {
'ilastik_project_file': px_ilp.__str__(),
'pxmap_threshold': 0.25,
'pixel_class': 0,
'zmask_channel': 0,
'pxmap_foreground_channel': 0,
'segmentation_channel': 0,
'patches_channel': 2,
'mask_type': 'boxes',
'zmask_type': 'boxes',
'zmask_filters': {'area': (1e3, 1e8)},
'zmask_expand_box_by': (128, 3),
'export_pixel_probabilities': True,
......@@ -44,12 +43,11 @@ if __name__ == '__main__':
'export_3d_patches': False,
'export_annotated_zstack': True,
'export_patch_masks': True,
'rescale_zmask_clip': 0.01,
'zmask_clip': 0.01,
'rgb_overlay_channels': (3, None, None),
'rgb_overlay_weights': (0.5, 1.0, 1.0)
}
# input_files = get_matching_files(where_czi, 'czi', coord_filter={'P': (5, 10)},)
input_files = get_matching_files(where_czi, 'czi', coord_filter={})
......@@ -72,6 +70,7 @@ if __name__ == '__main__':
input_files,
where_output,
export_patches_from_multichannel_zstack,
[IlastikPixelClassifierModel(params={'project_file': Path(px_ilp)})],
params,
catch_and_continue=False,
)
......
......@@ -2,6 +2,7 @@ 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
from extensions.ilastik.models import IlastikPixelClassifierModel
# TODO: support list-comp of single image sequence in multiple locations
......@@ -18,13 +19,12 @@ if __name__ == '__main__':
px_ilp = Path('c:/Users/rhodes/projects/proj0011-plankton-seg/exp0017/pxAF405_dim8bit.ilp').__str__()
params = {
'ilastik_project_file': px_ilp,
'pxmap_threshold': 0.25,
'pixel_class': 0,
'zmask_channel': 0,
'zmask_zindex': 3,
'pxmap_foreground_channel': 0,
'segmentation_channel': 0,
'patches_channel': 2,
'mask_type': 'boxes',
'zmask_clip': 0.01,
'zmask_type': 'boxes',
'zmask_filters': {'area': (1e3, 1e8)},
'zmask_expand_box_by': (128, 3),
'export_pixel_probabilities': True,
......@@ -34,7 +34,6 @@ if __name__ == '__main__':
'export_3d_patches': False,
'export_annotated_zstack': True,
'export_patch_masks': True,
'rescale_zmask_clip': 0.01,
'rgb_overlay_channels': (1, None, None),
'rgb_overlay_weights': (0.5, 1.0, 1.0)
}
......@@ -45,6 +44,7 @@ if __name__ == '__main__':
input_files,
where_output,
export_patches_from_multichannel_zstack,
[IlastikPixelClassifierModel(params={'project_file': Path(px_ilp)})],
params,
catch_and_continue=False,
)
......
......@@ -4,6 +4,7 @@ import pandas as pd
from model_server.util import autonumber_new_directory, get_matching_files, loop_workflow
from extensions.chaeo.workflows import export_patches_from_multichannel_zstack
from extensions.ilastik.models import IlastikPixelClassifierModel
def write_ecotaxa_tsv(patches_csv_path, where):
# import patch output table
......@@ -53,13 +54,12 @@ if __name__ == '__main__':
px_ilp = Path('c:/Users/rhodes/projects/proj0011-plankton-seg/exp0017/pxAF405_dim8bit.ilp').__str__()
params = {
'ilastik_project_file': px_ilp,
'pxmap_threshold': 0.25,
'pixel_class': 0,
'zmask_channel': 0,
'pxmap_foreground_channel': 0,
'segmentation_channel': 0,
'zmask_zindex': 3,
'patches_channel': 2,
'mask_type': 'boxes',
'zmask_type': 'boxes',
'zmask_filters': {'area': (1e3, 1e8)},
'zmask_expand_box_by': (128, 3),
'export_pixel_probabilities': True,
......@@ -69,7 +69,7 @@ if __name__ == '__main__':
'export_3d_patches': False,
'export_annotated_zstack': True,
'export_patch_masks': True,
'rescale_zmask_clip': 0.01,
'zmask_clip': 0.01,
'rgb_overlay_channels': (1, None, None),
'rgb_overlay_weights': (0.2, 1.0, 1.0)
}
......@@ -80,6 +80,7 @@ if __name__ == '__main__':
input_files,
where_output,
export_patches_from_multichannel_zstack,
[IlastikPixelClassifierModel(params={'project_file': Path(px_ilp)})],
params,
catch_and_continue=False,
)
......
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