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
e730dc2d
Commit
e730dc2d
authored
1 year ago
by
Christopher Randolph Rhodes
Browse files
Options
Downloads
Patches
Plain Diff
ilastik prereqs run now
parent
fa63053b
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
extensions/chaeo/conf/testing.py
+7
-0
7 additions, 0 deletions
extensions/chaeo/conf/testing.py
extensions/chaeo/test_zstack.py
+11
-6
11 additions, 6 deletions
extensions/chaeo/test_zstack.py
with
18 additions
and
6 deletions
extensions/chaeo/conf/testing.py
+
7
−
0
View file @
e730dc2d
...
...
@@ -13,3 +13,10 @@ multichannel_zstack = {
pixel_classifier
=
{
'
path
'
:
root
/
'
ilastik
'
/
'
AF405-bodies_boundaries.ilp
'
}
pipeline_params
=
{
'
threshold
'
:
0.6
,
}
output_path
=
root
/
'
testing_output
'
/
'
chaeo
'
output_path
.
mkdir
(
parents
=
True
,
exist_ok
=
True
)
\ No newline at end of file
This diff is collapsed.
Click to expand it.
extensions/chaeo/test_zstack.py
+
11
−
6
View file @
e730dc2d
import
unittest
from
extensions.chaeo.conf.testing
import
multichannel_zstack
,
pixel_classifier
from
conf.testing
import
output_path
from
extensions.chaeo.conf.testing
import
multichannel_zstack
,
pixel_classifier
,
pipeline_params
from
extensions.chaeo.zstack
import
build_stack_mask
from
model_server.accessors
import
generate_file_accessor
,
InMemoryDataAccessor
from
model_server.accessors
import
generate_file_accessor
,
InMemoryDataAccessor
,
write_accessor_data_to_file
from
extensions.ilastik.models
import
IlastikObjectClassifierModel
,
IlastikPixelClassifierModel
class
TestZStackDerivedDataProducts
(
unittest
.
TestCase
):
...
...
@@ -12,11 +14,14 @@ class TestZStackDerivedDataProducts(unittest.TestCase):
self
.
zstack
=
generate_file_accessor
(
multichannel_zstack
[
'
path
'
])
pxmodel
=
IlastikPixelClassifierModel
(
project_file
=
pixel_classifier
[
'
path
'
]
{
'
project_file
'
:
pixel_classifier
[
'
path
'
]
},
)
self
.
pxmap
=
None
self
.
obmap
=
None
self
.
stack
=
None
mip
=
InMemoryDataAccessor
(
self
.
zstack
.
get_one_channel_data
(
channel
=
0
).
data
.
max
(
axis
=-
1
,
keepdims
=
True
))
self
.
pxmap
,
result
=
pxmodel
.
infer
(
mip
)
write_accessor_data_to_file
(
output_path
/
'
pxmap.tif
'
,
self
.
pxmap
)
self
.
obmap
=
InMemoryDataAccessor
((
self
.
pxmap
.
data
>
pipeline_params
[
'
threshold
'
]).
astype
(
'
uint8
'
))
write_accessor_data_to_file
(
output_path
/
'
obmap.tif
'
,
self
.
obmap
)
def
test_zmask_makes_correct_boxes
(
self
):
zmask
,
meta
=
build_stack_mask
(
...
...
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