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
d263818b
Commit
d263818b
authored
May 17, 2019
by
Yuxin Wu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[MaskRCNN] use L1
parent
0831fe9d
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
4 deletions
+3
-4
examples/FasterRCNN/config.py
examples/FasterRCNN/config.py
+1
-1
examples/FasterRCNN/modeling/model_frcnn.py
examples/FasterRCNN/modeling/model_frcnn.py
+2
-3
No files found.
examples/FasterRCNN/config.py
View file @
d263818b
...
...
@@ -178,7 +178,7 @@ _C.RPN.TEST_PER_LEVEL_NMS_TOPK = 1000
# fastrcnn training ---------------------
_C
.
FRCNN
.
BATCH_PER_IM
=
512
_C
.
FRCNN
.
BBOX_REG_WEIGHTS
=
[
20.
,
20.
,
10.
,
10.
]
# Detectron: 10, 10, 5, 5
_C
.
FRCNN
.
BBOX_REG_WEIGHTS
=
[
10.
,
10.
,
5.
,
5.
]
# Slightly better setting: 20, 20, 10, 10
_C
.
FRCNN
.
FG_THRESH
=
0.5
_C
.
FRCNN
.
FG_RATIO
=
0.25
# fg ratio in a ROI batch
...
...
examples/FasterRCNN/modeling/model_frcnn.py
View file @
d263818b
# -*- coding: utf-8 -*-
# File: model.py
# File: model
_frcnn
.py
import
tensorflow
as
tf
...
...
@@ -164,8 +164,7 @@ def fastrcnn_losses(labels, label_logits, fg_boxes, fg_box_logits):
fg_accuracy
=
tf
.
where
(
empty_fg
,
0.
,
tf
.
reduce_mean
(
tf
.
gather
(
correct
,
fg_inds
)),
name
=
'fg_accuracy'
)
box_loss
=
tf
.
losses
.
huber_loss
(
fg_boxes
,
fg_box_logits
,
reduction
=
tf
.
losses
.
Reduction
.
SUM
)
box_loss
=
tf
.
reduce_sum
(
tf
.
abs
(
fg_boxes
-
fg_box_logits
))
box_loss
=
tf
.
truediv
(
box_loss
,
tf
.
cast
(
tf
.
shape
(
labels
)[
0
],
tf
.
float32
),
name
=
'box_loss'
)
...
...
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