Commit 13078601 authored by syiming's avatar syiming
Browse files

fix bug

parent a4d4d0f4
...@@ -1962,11 +1962,10 @@ class FasterRCNNMetaArch(model.DetectionModel): ...@@ -1962,11 +1962,10 @@ class FasterRCNNMetaArch(model.DetectionModel):
# unit_scale_index: num_levels-2 is chosen based on section 4.2 of # unit_scale_index: num_levels-2 is chosen based on section 4.2 of
# https://arxiv.org/pdf/1612.03144.pdf and works best for Resnet based # https://arxiv.org/pdf/1612.03144.pdf and works best for Resnet based
# feature extractor. # feature extractor.
image_shape = image_shape.as_list()
box_levels = ops.fpn_feature_levels( box_levels = ops.fpn_feature_levels(
num_levels, num_levels - 2, num_levels, num_levels - 2,
tf.sqrt(
tf.sqrt(image_shape[1] * image_shape[2] * 1.0) / 224.0, tf.cast(image_shape[1] * image_shape[2], tf.float32)) / 224.0,
proposal_boxes_normalized) proposal_boxes_normalized)
cropped_regions = self._flatten_first_two_dimensions( cropped_regions = self._flatten_first_two_dimensions(
......
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