Commit 1855f881 authored by syiming's avatar syiming
Browse files

Fix faster_rcnn_meta_arch. All test on this file passed

1. fix boxlist concatenate
2. fix input for crop and resize fn
3. TODO: need to check if the crop and resize fn used correctly
parent fd7e8be5
...@@ -1332,7 +1332,7 @@ class FasterRCNNMetaArch(model.DetectionModel): ...@@ -1332,7 +1332,7 @@ class FasterRCNNMetaArch(model.DetectionModel):
single_rpn_box_predictor_features = ( single_rpn_box_predictor_features = (
self._first_stage_box_predictor_first_conv(single_rpn_features_to_crop)) self._first_stage_box_predictor_first_conv(single_rpn_features_to_crop))
rpn_box_predictor_features.append(single_rpn_box_predictor_features) rpn_box_predictor_features.append(single_rpn_box_predictor_features)
anchors = tf.concat(anchors, axis=0) anchors = box_list_ops.concatenate(anchors)
return (rpn_box_predictor_features, rpn_features_to_crop, return (rpn_box_predictor_features, rpn_features_to_crop,
anchors, image_shape) anchors, image_shape)
...@@ -2533,6 +2533,7 @@ class FasterRCNNMetaArch(model.DetectionModel): ...@@ -2533,6 +2533,7 @@ class FasterRCNNMetaArch(model.DetectionModel):
box_list.BoxList(tf.reshape(proposal_boxes, [-1, 4])), box_list.BoxList(tf.reshape(proposal_boxes, [-1, 4])),
image_shape[1], image_shape[2], check_range=False).get() image_shape[1], image_shape[2], check_range=False).get()
# TODO(syiming): check this!
flat_cropped_gt_mask = self._crop_and_resize_fn( flat_cropped_gt_mask = self._crop_and_resize_fn(
[tf.expand_dims(flat_gt_masks, -1)], [tf.expand_dims(flat_gt_masks, -1)],
tf.expand_dims(flat_normalized_proposals, axis=1), None, tf.expand_dims(flat_normalized_proposals, axis=1), None,
......
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