Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
S
seminar-breakout
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Shashank Suhas
seminar-breakout
Commits
f7dfb86a
Commit
f7dfb86a
authored
Aug 26, 2018
by
Yuxin Wu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix bug in last commit
parent
438aef79
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
2 deletions
+3
-2
examples/FasterRCNN/model_frcnn.py
examples/FasterRCNN/model_frcnn.py
+3
-2
No files found.
examples/FasterRCNN/model_frcnn.py
View file @
f7dfb86a
...
@@ -159,7 +159,7 @@ def fastrcnn_losses(labels, label_logits, fg_boxes, fg_box_logits):
...
@@ -159,7 +159,7 @@ def fastrcnn_losses(labels, label_logits, fg_boxes, fg_box_logits):
fg_label_pred
=
tf
.
argmax
(
tf
.
gather
(
label_logits
,
fg_inds
),
axis
=
1
)
fg_label_pred
=
tf
.
argmax
(
tf
.
gather
(
label_logits
,
fg_inds
),
axis
=
1
)
num_zero
=
tf
.
reduce_sum
(
tf
.
to_int64
(
tf
.
equal
(
fg_label_pred
,
0
)),
name
=
'num_zero'
)
num_zero
=
tf
.
reduce_sum
(
tf
.
to_int64
(
tf
.
equal
(
fg_label_pred
,
0
)),
name
=
'num_zero'
)
false_negative
=
tf
.
where
(
false_negative
=
tf
.
where
(
empty_fg
,
0.
,
tf
.
t
ruediv
(
num_zero
,
num_fg
),
name
=
'false_negative'
)
empty_fg
,
0.
,
tf
.
t
o_float
(
tf
.
truediv
(
num_zero
,
num_fg
)
),
name
=
'false_negative'
)
fg_accuracy
=
tf
.
where
(
fg_accuracy
=
tf
.
where
(
empty_fg
,
0.
,
tf
.
reduce_mean
(
tf
.
gather
(
correct
,
fg_inds
)),
name
=
'fg_accuracy'
)
empty_fg
,
0.
,
tf
.
reduce_mean
(
tf
.
gather
(
correct
,
fg_inds
)),
name
=
'fg_accuracy'
)
...
@@ -297,7 +297,7 @@ def fastrcnn_4conv1fc_gn_head(*args, **kwargs):
...
@@ -297,7 +297,7 @@ def fastrcnn_4conv1fc_gn_head(*args, **kwargs):
class
BoxProposals
(
object
):
class
BoxProposals
(
object
):
"""
"""
A structure to manage box proposals and their relation with ground truth.
A structure to manage box proposals and their relation
s
with ground truth.
"""
"""
def
__init__
(
self
,
boxes
,
def
__init__
(
self
,
boxes
,
labels
=
None
,
fg_inds_wrt_gt
=
None
,
labels
=
None
,
fg_inds_wrt_gt
=
None
,
...
@@ -406,6 +406,7 @@ class FastRCNNHead(object):
...
@@ -406,6 +406,7 @@ class FastRCNNHead(object):
@
memoized
@
memoized
def
decoded_output_boxes_class_agnostic
(
self
):
def
decoded_output_boxes_class_agnostic
(
self
):
""" Returns: Nx4 """
assert
self
.
_bbox_class_agnostic
assert
self
.
_bbox_class_agnostic
box_logits
=
tf
.
reshape
(
self
.
box_logits
,
[
-
1
,
4
])
box_logits
=
tf
.
reshape
(
self
.
box_logits
,
[
-
1
,
4
])
decoded
=
decode_bbox_target
(
decoded
=
decode_bbox_target
(
...
...
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