Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
M
model_server
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Christopher Randolph Rhodes
model_server
Commits
b7738938
"README.md" did not exist on "77d42d1ca15049459aa57a31b8d7ab23c86794e5"
Commit
b7738938
authored
1 year ago
by
Christopher Randolph Rhodes
Browse files
Options
Downloads
Patches
Plain Diff
Exposed export product flags in batch runner
parent
8fd758a5
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
extensions/chaeo/examples/batch_run_patches.py
+9
-2
9 additions, 2 deletions
extensions/chaeo/examples/batch_run_patches.py
extensions/chaeo/workflows.py
+4
-2
4 additions, 2 deletions
extensions/chaeo/workflows.py
with
13 additions
and
4 deletions
extensions/chaeo/examples/batch_run_patches.py
+
9
−
2
View file @
b7738938
...
@@ -9,7 +9,7 @@ from model_server.accessors import InMemoryDataAccessor, write_accessor_data_to_
...
@@ -9,7 +9,7 @@ from model_server.accessors import InMemoryDataAccessor, write_accessor_data_to_
if
__name__
==
'
__main__
'
:
if
__name__
==
'
__main__
'
:
where_czi
=
Path
(
where_czi
=
Path
(
'
c:/Users
/rhodes/projects/proj0004-marine-photoactivation/data/exp0038/AutoMic/20230906-163415/Selection
'
'
z:
/rhodes/projects/proj0004-marine-photoactivation/data/exp0038/AutoMic/20230906-163415/Selection
'
)
)
where_output_root
=
Path
(
where_output_root
=
Path
(
...
@@ -54,6 +54,13 @@ if __name__ == '__main__':
...
@@ -54,6 +54,13 @@ if __name__ == '__main__':
'
mask_type
'
:
'
boxes
'
,
'
mask_type
'
:
'
boxes
'
,
'
zmask_filters
'
:
{
'
area
'
:
(
1e3
,
1e8
)},
'
zmask_filters
'
:
{
'
area
'
:
(
1e3
,
1e8
)},
'
zmask_expand_box_by
'
:
(
128
,
3
),
'
zmask_expand_box_by
'
:
(
128
,
3
),
'
export_pixel_probabilities
'
:
False
,
'
export_2d_patches_for_training
'
:
True
,
'
export_2d_patches_for_annotation
'
:
False
,
'
export_3d_patches
'
:
False
,
'
export_annotated_zstack
'
:
False
,
'
export_patch_masks
'
:
False
,
'
export_patch_label_maps
'
:
True
,
}
}
result
=
export_patches_from_multichannel_zstack
(
**
export_kwargs
)
result
=
export_patches_from_multichannel_zstack
(
**
export_kwargs
)
...
@@ -61,7 +68,7 @@ if __name__ == '__main__':
...
@@ -61,7 +68,7 @@ if __name__ == '__main__':
# parse and record results
# parse and record results
df
=
result
[
'
dataframe
'
]
df
=
result
[
'
dataframe
'
]
df
[
'
source_path
'
]
=
ff
df
[
'
source_path
'
]
=
ff
df
.
to_csv
(
where_output
/
'
df_objects.csv
'
,
**
csv_args
)
df
.
to_csv
(
where_output
/
'
df_objects.csv
'
,
index
=
False
,
**
csv_args
)
pd
.
DataFrame
(
result
[
'
timer_results
'
],
index
=
[
0
]).
to_csv
(
where_output
/
'
timer_results.csv
'
,
**
csv_args
)
pd
.
DataFrame
(
result
[
'
timer_results
'
],
index
=
[
0
]).
to_csv
(
where_output
/
'
timer_results.csv
'
,
**
csv_args
)
pd
.
json_normalize
(
export_kwargs
).
to_csv
(
where_output
/
'
workflow_params.csv
'
,
**
csv_args
)
pd
.
json_normalize
(
export_kwargs
).
to_csv
(
where_output
/
'
workflow_params.csv
'
,
**
csv_args
)
csv_args
=
{
'
mode
'
:
'
a
'
,
'
header
'
:
False
}
# append to CSV from here on
csv_args
=
{
'
mode
'
:
'
a
'
,
'
header
'
:
False
}
# append to CSV from here on
...
...
This diff is collapsed.
Click to expand it.
extensions/chaeo/workflows.py
+
4
−
2
View file @
b7738938
...
@@ -24,10 +24,12 @@ def export_patches_from_multichannel_zstack(
...
@@ -24,10 +24,12 @@ def export_patches_from_multichannel_zstack(
zmask_filters
:
Dict
=
None
,
zmask_filters
:
Dict
=
None
,
zmask_expand_box_by
:
int
=
None
,
zmask_expand_box_by
:
int
=
None
,
export_pixel_probabilities
=
True
,
export_pixel_probabilities
=
True
,
export_2d_patches
=
True
,
export_2d_patches_for_training
=
True
,
export_2d_patches_for_annotation
=
True
,
export_3d_patches
=
True
,
export_3d_patches
=
True
,
export_annotated_zstack
=
True
,
export_annotated_zstack
=
True
,
export_patch_masks
=
True
,
export_patch_masks
=
True
,
export_patch_label_maps
=
True
,
)
->
Dict
:
)
->
Dict
:
ti
=
Timer
()
ti
=
Timer
()
...
@@ -81,7 +83,7 @@ def export_patches_from_multichannel_zstack(
...
@@ -81,7 +83,7 @@ def export_patches_from_multichannel_zstack(
)
)
ti
.
click
(
'
export_3d_patches
'
)
ti
.
click
(
'
export_3d_patches
'
)
if
export_2d_patches
:
if
export_2d_patches
_for_annotation
:
files
=
export_multichannel_patches_from_zstack
(
files
=
export_multichannel_patches_from_zstack
(
Path
(
where_output
)
/
'
2d_patches
'
,
Path
(
where_output
)
/
'
2d_patches
'
,
stack
,
stack
,
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment