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
e7ff1bec
Commit
e7ff1bec
authored
Sep 21, 2021
by
Vishnu Banna
Browse files
pre proc ops test
parent
8a5c229d
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
8 deletions
+8
-8
official/vision/beta/projects/yolo/dataloaders/yolo_input.py
official/vision/beta/projects/yolo/dataloaders/yolo_input.py
+8
-8
No files found.
official/vision/beta/projects/yolo/dataloaders/yolo_input.py
View file @
e7ff1bec
...
...
@@ -19,7 +19,7 @@ class Parser(parser.Parser):
output_size
,
anchors
,
expanded_strides
,
anchor_free
_limit
s
=
None
,
level
_limit
=
None
,
max_num_instances
=
200
,
area_thresh
=
0.1
,
aug_rand_hue
=
1.0
,
...
...
@@ -49,7 +49,7 @@ class Parser(parser.Parser):
anchors: `Dict[List[Union[int, float]]]` values for each anchor box.
expanded_strides: `Dict[int]` for how much the model scales down the
images at the largest level.
anchor_free
_limit
s
: `List` the box sizes that will be allowed at each FPN
level
_limit: `List` the box sizes that will be allowed at each FPN
level as is done in the FCOS and YOLOX paper for anchor free box
assignment. Anchor free will perform worse than Anchor based, but only
slightly.
...
...
@@ -117,7 +117,7 @@ class Parser(parser.Parser):
# Set the anchor boxes for each scale
self
.
_anchors
=
anchors
self
.
_
anchor_free
_limit
s
=
anchor_free
_limit
s
self
.
_
level
_limit
=
level
_limit
# anchor labeling paramters
self
.
_use_tie_breaker
=
use_tie_breaker
...
...
@@ -150,7 +150,7 @@ class Parser(parser.Parser):
keys
=
list
(
self
.
_anchors
.
keys
())
if
self
.
_
anchor_free
_limit
s
is
not
None
:
if
self
.
_
level
_limit
is
not
None
:
maxim
=
2000
self
.
_scale_up
=
{
key
:
maxim
//
self
.
_max_num_instances
for
key
in
keys
}
self
.
_anchor_t
=
-
0.01
...
...
@@ -330,13 +330,13 @@ class Parser(parser.Parser):
updates
=
{}
true_grids
=
{}
if
self
.
_
anchor_free
_limit
s
is
not
None
:
self
.
_
anchor_free
_limit
s
=
[
0.0
]
+
self
.
_
anchor_free
_limit
s
+
[
np
.
inf
]
if
self
.
_
level
_limit
is
not
None
:
self
.
_
level
_limit
=
[
0.0
]
+
self
.
_
level
_limit
+
[
np
.
inf
]
# for each prediction path generate a properly scaled output prediction map
for
i
,
key
in
enumerate
(
self
.
_anchors
.
keys
()):
if
self
.
_
anchor_free
_limit
s
is
not
None
:
fpn_limits
=
self
.
_
anchor_free
_limit
s
[
i
:
i
+
2
]
if
self
.
_
level
_limit
is
not
None
:
fpn_limits
=
self
.
_
level
_limit
[
i
:
i
+
2
]
else
:
fpn_limits
=
None
...
...
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