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
ModelZoo
SOLOv2-pytorch
Commits
8f7507eb
Commit
8f7507eb
authored
Aug 03, 2019
by
youkaichao
Committed by
Kai Chen
Aug 04, 2019
Browse files
manually add type promotion (#1114)
parent
7b75de4d
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
4 deletions
+4
-4
mmdet/core/anchor/anchor_target.py
mmdet/core/anchor/anchor_target.py
+4
-4
No files found.
mmdet/core/anchor/anchor_target.py
View file @
8f7507eb
...
...
@@ -164,10 +164,10 @@ def anchor_inside_flags(flat_anchors, valid_flags, img_shape,
img_h
,
img_w
=
img_shape
[:
2
]
if
allowed_border
>=
0
:
inside_flags
=
valid_flags
&
\
(
flat_anchors
[:,
0
]
>=
-
allowed_border
)
&
\
(
flat_anchors
[:,
1
]
>=
-
allowed_border
)
&
\
(
flat_anchors
[:,
2
]
<
img_w
+
allowed_border
)
&
\
(
flat_anchors
[:,
3
]
<
img_h
+
allowed_border
)
(
flat_anchors
[:,
0
]
>=
-
allowed_border
)
.
type
(
torch
.
uint8
)
&
\
(
flat_anchors
[:,
1
]
>=
-
allowed_border
)
.
type
(
torch
.
uint8
)
&
\
(
flat_anchors
[:,
2
]
<
img_w
+
allowed_border
)
.
type
(
torch
.
uint8
)
&
\
(
flat_anchors
[:,
3
]
<
img_h
+
allowed_border
)
.
type
(
torch
.
uint8
)
else
:
inside_flags
=
valid_flags
return
inside_flags
...
...
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