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
28d7aac1
Commit
28d7aac1
authored
Jun 23, 2020
by
syiming
Browse files
Change rpn_box_predictor_features into a list.
parent
6ebbfe13
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
4 deletions
+4
-4
research/object_detection/meta_architectures/faster_rcnn_meta_arch.py
...ect_detection/meta_architectures/faster_rcnn_meta_arch.py
+4
-4
No files found.
research/object_detection/meta_architectures/faster_rcnn_meta_arch.py
View file @
28d7aac1
...
@@ -762,7 +762,7 @@ class FasterRCNNMetaArch(model.DetectionModel):
...
@@ -762,7 +762,7 @@ class FasterRCNNMetaArch(model.DetectionModel):
Returns:
Returns:
prediction_dict: a dictionary holding "raw" prediction tensors:
prediction_dict: a dictionary holding "raw" prediction tensors:
1) rpn_box_predictor_features: A 4-D float32 tensor with shape
1) rpn_box_predictor_features: A
list of
4-D float32 tensor with shape
[batch_size, height, width, depth] to be used for predicting proposal
[batch_size, height, width, depth] to be used for predicting proposal
boxes and corresponding objectness scores.
boxes and corresponding objectness scores.
2) rpn_features_to_crop: A list of 4-D float32 tensor with shape
2) rpn_features_to_crop: A list of 4-D float32 tensor with shape
...
@@ -1356,7 +1356,7 @@ class FasterRCNNMetaArch(model.DetectionModel):
...
@@ -1356,7 +1356,7 @@ class FasterRCNNMetaArch(model.DetectionModel):
Note resulting tensors will not have been postprocessed.
Note resulting tensors will not have been postprocessed.
Args:
Args:
rpn_box_predictor_features: A 4-D float32 tensor with shape
rpn_box_predictor_features: A
list of
4-D float32 tensor with shape
[batch, height, width, depth] to be used for predicting proposal boxes
[batch, height, width, depth] to be used for predicting proposal boxes
and corresponding objectness scores.
and corresponding objectness scores.
...
@@ -1381,10 +1381,10 @@ class FasterRCNNMetaArch(model.DetectionModel):
...
@@ -1381,10 +1381,10 @@ class FasterRCNNMetaArch(model.DetectionModel):
'corresponding to a single feature map.'
)
'corresponding to a single feature map.'
)
if
self
.
_first_stage_box_predictor
.
is_keras_model
:
if
self
.
_first_stage_box_predictor
.
is_keras_model
:
box_predictions
=
self
.
_first_stage_box_predictor
(
box_predictions
=
self
.
_first_stage_box_predictor
(
[
rpn_box_predictor_features
]
)
rpn_box_predictor_features
)
else
:
else
:
box_predictions
=
self
.
_first_stage_box_predictor
.
predict
(
box_predictions
=
self
.
_first_stage_box_predictor
.
predict
(
[
rpn_box_predictor_features
]
,
rpn_box_predictor_features
,
num_anchors_per_location
,
num_anchors_per_location
,
scope
=
self
.
first_stage_box_predictor_scope
)
scope
=
self
.
first_stage_box_predictor_scope
)
...
...
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