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
a347aff8
Commit
a347aff8
authored
Nov 14, 2017
by
Yuxin Wu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[FasterRCNN] fix bug in last commit
parent
7ca798da
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
2 deletions
+3
-2
examples/FasterRCNN/train.py
examples/FasterRCNN/train.py
+3
-2
No files found.
examples/FasterRCNN/train.py
View file @
a347aff8
...
...
@@ -82,6 +82,7 @@ class Model(ModelDesc):
image
,
anchor_labels
,
anchor_boxes
,
gt_boxes
,
gt_labels
=
inputs
fm_anchors
=
self
.
_get_anchors
(
image
)
image
=
self
.
_preprocess
(
image
)
image_shape2d
=
tf
.
shape
(
image
)[
2
:]
anchor_boxes_encoded
=
encode_bbox_target
(
anchor_boxes
,
fm_anchors
)
featuremap
=
pretrained_resnet_conv4
(
image
,
config
.
RESNET_NUM_BLOCK
[:
3
])
...
...
@@ -91,7 +92,7 @@ class Model(ModelDesc):
proposal_boxes
,
proposal_scores
=
generate_rpn_proposals
(
tf
.
reshape
(
decoded_boxes
,
[
-
1
,
4
]),
tf
.
reshape
(
rpn_label_logits
,
[
-
1
]),
tf
.
shape
(
image
)[
2
:]
)
image_shape2d
)
if
is_training
:
# sample proposal boxes in training
...
...
@@ -140,7 +141,7 @@ class Model(ModelDesc):
decoded_boxes
=
decode_bbox_target
(
fastrcnn_box_logits
/
tf
.
constant
(
config
.
FASTRCNN_BBOX_REG_WEIGHTS
),
anchors
)
decoded_boxes
=
clip_boxes
(
decoded_boxes
,
tf
.
shape
(
image
)[:
2
]
,
name
=
'fastrcnn_all_boxes'
)
decoded_boxes
=
clip_boxes
(
decoded_boxes
,
image_shape2d
,
name
=
'fastrcnn_all_boxes'
)
# indices: Nx2. Each index into (#proposal, #category)
pred_indices
,
final_probs
=
fastrcnn_predictions
(
decoded_boxes
,
label_probs
)
...
...
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