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
yaoyuping
nnDetection
Commits
7b546055
Commit
7b546055
authored
Jun 22, 2021
by
mibaumgartner
Browse files
fix
parent
ac24a62a
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
0 deletions
+9
-0
nndet/core/boxes/anchors.py
nndet/core/boxes/anchors.py
+9
-0
No files found.
nndet/core/boxes/anchors.py
View file @
7b546055
...
...
@@ -267,6 +267,15 @@ class AnchorGenerator2D(torch.nn.Module):
# self._cache.clear()
return
anchors
def
num_anchors_per_location
(
self
)
->
List
[
int
]:
"""
Number of anchors per resolution
Returns:
List[int]: number of anchors per positions for each resolution
"""
return
[
len
(
s
)
*
len
(
a
)
for
s
,
a
in
zip
(
self
.
sizes
,
self
.
aspect_ratios
)]
def
get_num_acnhors_per_level
(
self
)
->
List
[
int
]:
"""
Number of anchors per resolution
...
...
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