Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
S
SVLT
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
ALMF
SVLT
Commits
ebaf5ac1
Commit
ebaf5ac1
authored
7 months ago
by
Christopher Randolph Rhodes
Browse files
Options
Downloads
Patches
Plain Diff
Merged in RoiSet polygon logic so far from YOLO dev branch
parent
74f7c2aa
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
model_server/base/roiset.py
+0
-6
0 additions, 6 deletions
model_server/base/roiset.py
tests/test_ilastik/test_ilastik.py
+3
-3
3 additions, 3 deletions
tests/test_ilastik/test_ilastik.py
with
3 additions
and
9 deletions
model_server/base/roiset.py
+
0
−
6
View file @
ebaf5ac1
...
...
@@ -288,7 +288,6 @@ def make_object_ids_from_df(df: pd.DataFrame, sd: dict) -> InMemoryDataAccessor:
class
RoiSet
(
object
):
# TODO: __init__ to take bounding boxes e.g. from obj det model; flag if overlaps are allowed
def
__init__
(
self
,
acc_raw
:
GenericImageDataAccessor
,
...
...
@@ -302,15 +301,12 @@ class RoiSet(object):
:param df: dataframe containing at minimum bounding box and segmentation mask information
:param params: optional arguments that influence the definition and representation of ROIs
"""
# assert acc_obj_ids.chroma == 1
# self.acc_obj_ids = acc_obj_ids
self
.
acc_raw
=
acc_raw
self
.
accs_derived
=
[]
self
.
params
=
params
self
.
_df
=
df
self
.
count
=
len
(
self
.
_df
)
# self.object_class_maps = {} # classification results
def
__iter__
(
self
):
"""
Expose ROI meta information via the Pandas.DataFrame API
"""
...
...
@@ -342,7 +338,6 @@ class RoiSet(object):
return
RoiSet
(
acc_raw
,
df
,
params
)
# TODO: add a generator for the object detection case
@staticmethod
def
from_bounding_boxes
(
acc_raw
:
GenericImageDataAccessor
,
...
...
@@ -857,7 +852,6 @@ class RoiSet(object):
def
acc_obj_ids
(
self
):
return
make_object_ids_from_df
(
self
.
_df
,
self
.
acc_raw
.
shape_dict
)
# TODO: make this work with obj det dataset
@staticmethod
def
deserialize
(
acc_raw
:
GenericImageDataAccessor
,
where
:
Path
,
prefix
=
''
):
"""
...
...
This diff is collapsed.
Click to expand it.
tests/test_ilastik/test_ilastik.py
+
3
−
3
View file @
ebaf5ac1
...
...
@@ -5,7 +5,7 @@ import numpy as np
from
model_server.base.accessors
import
CziImageFileAccessor
,
generate_file_accessor
,
InMemoryDataAccessor
,
PatchStack
,
write_accessor_data_to_file
from
model_server.extensions.ilastik
import
models
as
ilm
from
model_server.extensions.ilastik.pipelines.px_then_ob
import
infer_px_then_ob_model
from
model_server.base.roiset
import
_
get_label_ids
,
RoiSet
,
RoiSetMetaParams
from
model_server.base.roiset
import
get_label_ids
,
RoiSet
,
RoiSetMetaParams
from
model_server.base.pipelines.segment
import
classify_pixels
import
model_server.conf.testing
as
conf
...
...
@@ -399,9 +399,9 @@ class TestIlastikObjectClassification(unittest.TestCase):
stack_ch_pa
=
stack
.
get_mono
(
conf
.
meta
[
'
roiset
'
][
'
patches_channel
'
])
seg_mask
=
generate_file_accessor
(
data
[
'
multichannel_zstack_mask2d
'
][
'
path
'
])
self
.
roiset
=
RoiSet
(
self
.
roiset
=
RoiSet
.
from_binary_mask
(
stack_ch_pa
,
_get_label_ids
(
seg_mask
)
,
seg_mask
,
params
=
RoiSetMetaParams
(
mask_type
=
'
boxes
'
,
filters
=
{
'
area
'
:
{
'
min
'
:
1e3
,
'
max
'
:
1e4
}},
...
...
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