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
ResNet50_tensorflow
Commits
b3f63b00
Unverified
Commit
b3f63b00
authored
Jul 24, 2020
by
Srihari Humbarwadi
Committed by
GitHub
Jul 24, 2020
Browse files
Fixed typos
- Fixed `intermediate_scale` in `Anchor` - "ratio" and "divisible" in doc string
parent
07484704
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
4 deletions
+4
-4
official/vision/detection/dataloader/anchor.py
official/vision/detection/dataloader/anchor.py
+4
-4
No files found.
official/vision/detection/dataloader/anchor.py
View file @
b3f63b00
...
@@ -46,14 +46,14 @@ class Anchor(object):
...
@@ -46,14 +46,14 @@ class Anchor(object):
num_scales: integer number representing intermediate scales added
num_scales: integer number representing intermediate scales added
on each level. For instances, num_scales=2 adds one additional
on each level. For instances, num_scales=2 adds one additional
intermediate anchor scales [2^0, 2^0.5] on each level.
intermediate anchor scales [2^0, 2^0.5] on each level.
aspect_ratios: list of float numbers representing the aspect ra
i
to anchors
aspect_ratios: list of float numbers representing the aspect rat
i
o anchors
added on each level. The number indicates the ratio of width to height.
added on each level. The number indicates the ratio of width to height.
For instances, aspect_ratios=[1.0, 2.0, 0.5] adds three anchors on each
For instances, aspect_ratios=[1.0, 2.0, 0.5] adds three anchors on each
scale level.
scale level.
anchor_size: float number representing the scale of size of the base
anchor_size: float number representing the scale of size of the base
anchor to the feature stride 2^level.
anchor to the feature stride 2^level.
image_size: a list of integer numbers or Tensors representing
image_size: a list of integer numbers or Tensors representing
[height, width] of the input image size.The image_size should be divi
ded
[height, width] of the input image size.The image_size should be divi
sible
by the largest feature stride 2^max_level.
by the largest feature stride 2^max_level.
"""
"""
self
.
min_level
=
min_level
self
.
min_level
=
min_level
...
@@ -77,8 +77,8 @@ class Anchor(object):
...
@@ -77,8 +77,8 @@ class Anchor(object):
for
scale
in
range
(
self
.
num_scales
):
for
scale
in
range
(
self
.
num_scales
):
for
aspect_ratio
in
self
.
aspect_ratios
:
for
aspect_ratio
in
self
.
aspect_ratios
:
stride
=
2
**
level
stride
=
2
**
level
intermi
d
ate_scale
=
2
**
(
scale
/
float
(
self
.
num_scales
))
interm
ed
iate_scale
=
2
**
(
scale
/
float
(
self
.
num_scales
))
base_anchor_size
=
self
.
anchor_size
*
stride
*
intermi
d
ate_scale
base_anchor_size
=
self
.
anchor_size
*
stride
*
interm
ed
iate_scale
aspect_x
=
aspect_ratio
**
0.5
aspect_x
=
aspect_ratio
**
0.5
aspect_y
=
aspect_ratio
**
-
0.5
aspect_y
=
aspect_ratio
**
-
0.5
half_anchor_size_x
=
base_anchor_size
*
aspect_x
/
2.0
half_anchor_size_x
=
base_anchor_size
*
aspect_x
/
2.0
...
...
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