Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Lamping, Christian
chicken_segmentation_dataset
Commits
2c5879b6
Commit
2c5879b6
authored
Oct 06, 2021
by
Lamping, Christian
Browse files
Update utils.py
parent
1245c580
Changes
1
Hide whitespace changes
Inline
Side-by-side
utils.py
View file @
2c5879b6
...
...
@@ -306,7 +306,7 @@ class Dataset(object):
scores
.
append
(
score
)
image
=
self
.
load_image
(
image_id
)
mask
=
np
.
stack
(
instance_masks
)
mask
=
np
.
d
stack
(
instance_masks
)
class_ids
=
np
.
array
(
class_ids
,
dtype
=
np
.
int32
)
scores
=
np
.
array
(
scores
,
dtype
=
np
.
float32
)
_
,
window
,
scale
,
padding
,
crop
=
resize_image
(
...
...
@@ -315,7 +315,7 @@ class Dataset(object):
min_scale
=
None
,
max_dim
=
384
)
mask
=
resize_mask
(
mask
,
scale
,
padding
,
crop
)
print
(
mask
.
shape
)
mask
=
mask
.
transpose
(
2
,
0
,
1
)
return
mask
,
class_ids
,
scores
def
resize
(
image
,
output_shape
,
order
=
1
,
mode
=
'constant'
,
cval
=
0
,
clip
=
True
,
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment