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
23e7823e
Commit
23e7823e
authored
Oct 06, 2021
by
Lamping, Christian
Browse files
Update utils.py
parent
9713bdbb
Changes
1
Hide whitespace changes
Inline
Side-by-side
utils.py
View file @
23e7823e
...
...
@@ -696,6 +696,7 @@ def extract_bboxes(mask):
mask: [height, width, num_instances]. Mask pixels are either 1 or 0.
Returns: bbox array [num_instances, (y1, x1, y2, x2)].
"""
mask
=
mask
.
transpose
((
1
,
2
,
0
))
boxes
=
np
.
zeros
([
mask
.
shape
[
-
1
],
4
],
dtype
=
np
.
int32
)
for
i
in
range
(
mask
.
shape
[
-
1
]):
m
=
mask
[:,
:,
i
]
...
...
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