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
0b326566
Commit
0b326566
authored
Oct 18, 2021
by
Lamping, Christian
Browse files
Update utils.py
parent
c3e27db1
Changes
1
Hide whitespace changes
Inline
Side-by-side
utils.py
View file @
0b326566
...
...
@@ -64,8 +64,8 @@ class Dataset(object):
boxes
=
extract_bboxes
(
masks
)
boxes
=
torch
.
as_tensor
(
boxes
,
dtype
=
torch
.
float32
)
# t
here is only one
class
labels
=
torch
.
ones
((
num_objs
,)
,
dtype
=
torch
.
int64
)
# t
wo_
class
es
labels
=
torch
.
as_tensor
(
class_ids
,
dtype
=
torch
.
int64
)
masks
=
torch
.
as_tensor
(
masks
,
dtype
=
torch
.
uint8
)
image_id
=
torch
.
tensor
([
idx
])
...
...
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