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
f7d74d68
Commit
f7d74d68
authored
Jul 01, 2020
by
syiming
Browse files
change crop and resize fn to fit multilevel ones
parent
47bc1813
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
3 deletions
+5
-3
research/object_detection/meta_architectures/context_rcnn_meta_arch.py
...ct_detection/meta_architectures/context_rcnn_meta_arch.py
+1
-1
research/object_detection/meta_architectures/context_rcnn_meta_arch_tf1_test.py
...ion/meta_architectures/context_rcnn_meta_arch_tf1_test.py
+4
-2
No files found.
research/object_detection/meta_architectures/context_rcnn_meta_arch.py
View file @
f7d74d68
...
...
@@ -324,7 +324,7 @@ class ContextRCNNMetaArch(faster_rcnn_meta_arch.FasterRCNNMetaArch):
A float32 Tensor with shape [K, new_height, new_width, depth].
"""
box_features
=
self
.
_crop_and_resize_fn
(
features_to_crop
,
proposal_boxes_normalized
,
[
features_to_crop
]
,
proposal_boxes_normalized
,
None
,
[
self
.
_initial_crop_size
,
self
.
_initial_crop_size
])
attention_features
=
self
.
_context_feature_extract_fn
(
...
...
research/object_detection/meta_architectures/context_rcnn_meta_arch_tf1_test.py
View file @
f7d74d68
...
...
@@ -42,6 +42,7 @@ from object_detection.protos import box_predictor_pb2
from
object_detection.protos
import
hyperparams_pb2
from
object_detection.protos
import
post_processing_pb2
from
object_detection.utils
import
ops
from
object_detection.utils
import
spatial_transform_ops
as
spatial_ops
from
object_detection.utils
import
test_case
from
object_detection.utils
import
test_utils
from
object_detection.utils
import
tf_version
...
...
@@ -363,8 +364,9 @@ class ContextRCNNMetaArchTest(test_case.TestCase, parameterized.TestCase):
max_negatives_per_positive
=
None
)
crop_and_resize_fn
=
(
ops
.
matmul_crop_and_resize
if
use_matmul_crop_and_resize
else
ops
.
native_crop_and_resize
)
spatial_ops
.
multilevel_matmul_crop_and_resize
if
use_matmul_crop_and_resize
else
spatial_ops
.
multilevel_native_crop_and_resize
)
common_kwargs
=
{
'is_training'
:
is_training
,
...
...
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