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
836d599f
Commit
836d599f
authored
Jul 09, 2021
by
The-Indian-Chinna
Browse files
Minor: Simple Documentation Fixes.
parent
34e39103
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
18 additions
and
16 deletions
+18
-16
official/vision/beta/projects/yolo/README.md
official/vision/beta/projects/yolo/README.md
+11
-11
official/vision/beta/projects/yolo/ops/nms_ops.py
official/vision/beta/projects/yolo/ops/nms_ops.py
+7
-5
No files found.
official/vision/beta/projects/yolo/README.md
View file @
836d599f
...
@@ -18,8 +18,8 @@ repository.
...
@@ -18,8 +18,8 @@ repository.
## Description
## Description
YOLO v1 the original implementation was released in 2015 providing a
YOLO v1 the original implementation was released in 2015 providing a
groundbreakingalgorithm that would quickly process images and locate objects
in
ground
breaking
algorithm that would quickly process images and locate objects
a single pass through the detector. The original implementation used a
in
a single pass through the detector. The original implementation used a
backbone derived from state of the art object classifiers of the time, like
backbone derived from state of the art object classifiers of the time, like
[
GoogLeNet
](
https://arxiv.org/abs/1409.4842
)
and
[
GoogLeNet
](
https://arxiv.org/abs/1409.4842
)
and
[
VGG
](
https://arxiv.org/abs/1409.1556
)
. More attention was given to the novel
[
VGG
](
https://arxiv.org/abs/1409.1556
)
. More attention was given to the novel
...
...
official/vision/beta/projects/yolo/ops/nms_ops.py
View file @
836d599f
...
@@ -8,13 +8,13 @@ class TiledNMS():
...
@@ -8,13 +8,13 @@ class TiledNMS():
IOU_TYPES
=
{
'diou'
:
0
,
'giou'
:
1
,
'ciou'
:
2
,
'iou'
:
3
}
IOU_TYPES
=
{
'diou'
:
0
,
'giou'
:
1
,
'ciou'
:
2
,
'iou'
:
3
}
def
__init__
(
self
,
iou_type
=
'diou'
,
beta
=
0.6
):
def
__init__
(
self
,
iou_type
=
'diou'
,
beta
=
0.6
):
'''
Initialization for all non max suppression operations mainly used to
"""
Initialization for all non max suppression operations mainly used to
select hyperparameters for the iou type and scaling.
select hyperparameters for the iou type and scaling.
Args:
Args:
iou_type: `str` for the version of IOU to use {diou, giou, ciou, iou}.
iou_type: `str` for the version of IOU to use {diou, giou, ciou, iou}.
beta: `float` for the amount to scale regularization on distance iou.
beta: `float` for the amount to scale regularization on distance iou.
'''
"""
self
.
_iou_type
=
TiledNMS
.
IOU_TYPES
[
iou_type
]
self
.
_iou_type
=
TiledNMS
.
IOU_TYPES
[
iou_type
]
self
.
_beta
=
beta
self
.
_beta
=
beta
...
@@ -326,8 +326,10 @@ def sorted_non_max_suppression_padded(scores, boxes, max_output_size,
...
@@ -326,8 +326,10 @@ def sorted_non_max_suppression_padded(scores, boxes, max_output_size,
def
sort_drop
(
objectness
,
box
,
classificationsi
,
k
):
def
sort_drop
(
objectness
,
box
,
classificationsi
,
k
):
"""This function sorts and drops boxes such that there are only k boxes
"""This function sorts and then drops boxes.
sorted by number the objectness or confidence
Boxes are sorted and dropped such that there are only k boxes sorted by the
objectness or confidence.
Args:
Args:
objectness: a `Tensor` of shape [batch size, N] that needs to be
objectness: a `Tensor` of shape [batch size, N] that needs to be
...
@@ -447,7 +449,7 @@ def nms(boxes,
...
@@ -447,7 +449,7 @@ def nms(boxes,
boxes
,
classes
,
confidence
=
segment_nms
(
boxes
,
classes
,
confidence
,
boxes
,
classes
,
confidence
=
segment_nms
(
boxes
,
classes
,
confidence
,
prenms_top_k
,
nms_thresh
)
prenms_top_k
,
nms_thresh
)
# sort the classes of the unspressed boxes
# sort the classes of the uns
up
pressed boxes
class_confidence
,
class_ind
=
tf
.
math
.
top_k
(
class_confidence
,
class_ind
=
tf
.
math
.
top_k
(
classes
,
k
=
tf
.
shape
(
classes
)[
-
1
],
sorted
=
True
)
classes
,
k
=
tf
.
shape
(
classes
)[
-
1
],
sorted
=
True
)
...
...
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