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
fda51c28
Commit
fda51c28
authored
Jun 29, 2020
by
syiming
Browse files
change crop_and_resize_fn into multilevel function
parent
d2deafd6
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
6 deletions
+4
-6
research/object_detection/builders/model_builder.py
research/object_detection/builders/model_builder.py
+4
-2
research/object_detection/utils/ops.py
research/object_detection/utils/ops.py
+0
-4
No files found.
research/object_detection/builders/model_builder.py
View file @
fda51c28
...
@@ -36,6 +36,7 @@ from object_detection.protos import losses_pb2
...
@@ -36,6 +36,7 @@ from object_detection.protos import losses_pb2
from
object_detection.protos
import
model_pb2
from
object_detection.protos
import
model_pb2
from
object_detection.utils
import
label_map_util
from
object_detection.utils
import
label_map_util
from
object_detection.utils
import
ops
from
object_detection.utils
import
ops
from
object_detection.utils
import
spatial_transform_ops
as
spatial_ops
from
object_detection.utils
import
tf_version
from
object_detection.utils
import
tf_version
## Feature Extractors for TF
## Feature Extractors for TF
...
@@ -601,8 +602,9 @@ def _build_faster_rcnn_model(frcnn_config, is_training, add_summaries):
...
@@ -601,8 +602,9 @@ def _build_faster_rcnn_model(frcnn_config, is_training, add_summaries):
second_stage_localization_loss_weight
)
second_stage_localization_loss_weight
)
crop_and_resize_fn
=
(
crop_and_resize_fn
=
(
ops
.
matmul_crop_and_resize
if
frcnn_config
.
use_matmul_crop_and_resize
spatial_ops
.
multilevel_matmul_crop_and_resize
else
ops
.
native_crop_and_resize
)
if
frcnn_config
.
use_matmul_crop_and_resize
else
spatial_ops
.
multilevel_native_crop_and_resize
)
clip_anchors_to_image
=
(
clip_anchors_to_image
=
(
frcnn_config
.
clip_anchors_to_image
)
frcnn_config
.
clip_anchors_to_image
)
...
...
research/object_detection/utils/ops.py
View file @
fda51c28
...
@@ -32,12 +32,8 @@ from object_detection.utils import spatial_transform_ops as spatial_ops
...
@@ -32,12 +32,8 @@ from object_detection.utils import spatial_transform_ops as spatial_ops
from
object_detection.utils
import
static_shape
from
object_detection.utils
import
static_shape
multilevel_matmul_crop_and_resize
=
\
spatial_ops
.
multilevel_matmul_crop_and_resize
matmul_crop_and_resize
=
spatial_ops
.
matmul_crop_and_resize
matmul_crop_and_resize
=
spatial_ops
.
matmul_crop_and_resize
multilevel_roi_align
=
spatial_ops
.
multilevel_roi_align
multilevel_roi_align
=
spatial_ops
.
multilevel_roi_align
multilevel_native_crop_and_resize
=
\
spatial_ops
.
multilevel_native_crop_and_resize
native_crop_and_resize
=
spatial_ops
.
native_crop_and_resize
native_crop_and_resize
=
spatial_ops
.
native_crop_and_resize
...
...
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