Commit fda51c28 authored by syiming's avatar syiming
Browse files

change crop_and_resize_fn into multilevel function

parent d2deafd6
...@@ -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)
......
...@@ -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
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment