Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
OpenDAS
vision
Commits
4508c84e
Unverified
Commit
4508c84e
authored
Nov 04, 2022
by
vfdev
Committed by
GitHub
Nov 04, 2022
Browse files
[proto][tests] Fix missing extra_dims in cxcywh (#6906)
parent
cb4413a3
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
+2
-2
test/prototype_common_utils.py
test/prototype_common_utils.py
+2
-2
No files found.
test/prototype_common_utils.py
View file @
4508c84e
...
@@ -373,8 +373,8 @@ def make_bounding_box_loader(*, extra_dims=(), format, spatial_size="random", dt
...
@@ -373,8 +373,8 @@ def make_bounding_box_loader(*, extra_dims=(), format, spatial_size="random", dt
h
=
randint_with_tensor_bounds
(
1
,
height
-
y
)
h
=
randint_with_tensor_bounds
(
1
,
height
-
y
)
parts
=
(
x
,
y
,
w
,
h
)
parts
=
(
x
,
y
,
w
,
h
)
else
:
# format == features.BoundingBoxFormat.CXCYWH:
else
:
# format == features.BoundingBoxFormat.CXCYWH:
cx
=
torch
.
randint
(
1
,
width
-
1
,
()
)
cx
=
torch
.
randint
(
1
,
width
-
1
,
extra_dims
)
cy
=
torch
.
randint
(
1
,
height
-
1
,
()
)
cy
=
torch
.
randint
(
1
,
height
-
1
,
extra_dims
)
w
=
randint_with_tensor_bounds
(
1
,
torch
.
minimum
(
cx
,
width
-
cx
)
+
1
)
w
=
randint_with_tensor_bounds
(
1
,
torch
.
minimum
(
cx
,
width
-
cx
)
+
1
)
h
=
randint_with_tensor_bounds
(
1
,
torch
.
minimum
(
cy
,
height
-
cy
)
+
1
)
h
=
randint_with_tensor_bounds
(
1
,
torch
.
minimum
(
cy
,
height
-
cy
)
+
1
)
parts
=
(
cx
,
cy
,
w
,
h
)
parts
=
(
cx
,
cy
,
w
,
h
)
...
...
Write
Preview
Markdown
is supported
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