Skip to content

Commit

Permalink
Fix the comment on output shape in RPN
Browse files Browse the repository at this point in the history
  • Loading branch information
keineahnung2345 authored and waleedka committed Sep 21, 2018
1 parent 10a364f commit 1aeb72d
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions mrcnn/model.py
Original file line number Diff line number Diff line change
Expand Up @@ -839,9 +839,9 @@ def rpn_graph(feature_map, anchors_per_location, anchor_stride):
every pixel in the feature map), or 2 (every other pixel).
Returns:
rpn_logits: [batch, H, W, 2] Anchor classifier logits (before softmax)
rpn_probs: [batch, H, W, 2] Anchor classifier probabilities.
rpn_bbox: [batch, H, W, (dy, dx, log(dh), log(dw))] Deltas to be
rpn_class_logits: [batch, H * W * anchors_per_location, 2] Anchor classifier logits (before softmax)
rpn_probs: [batch, H * W * anchors_per_location, 2] Anchor classifier probabilities.
rpn_bbox: [batch, H * W * anchors_per_location, (dy, dx, log(dh), log(dw))] Deltas to be
applied to anchors.
"""
# TODO: check if stride of 2 causes alignment issues if the feature map
Expand All @@ -863,7 +863,7 @@ def rpn_graph(feature_map, anchors_per_location, anchor_stride):
rpn_probs = KL.Activation(
"softmax", name="rpn_class_xxx")(rpn_class_logits)

# Bounding box refinement. [batch, H, W, anchors per location, depth]
# Bounding box refinement. [batch, H, W, anchors per location * depth]
# where depth is [x, y, log(w), log(h)]
x = KL.Conv2D(anchors_per_location * 4, (1, 1), padding="valid",
activation='linear', name='rpn_bbox_pred')(shared)
Expand All @@ -885,9 +885,9 @@ def build_rpn_model(anchor_stride, anchors_per_location, depth):
depth: Depth of the backbone feature map.
Returns a Keras Model object. The model outputs, when called, are:
rpn_logits: [batch, H, W, 2] Anchor classifier logits (before softmax)
rpn_probs: [batch, W, W, 2] Anchor classifier probabilities.
rpn_bbox: [batch, H, W, (dy, dx, log(dh), log(dw))] Deltas to be
rpn_class_logits: [batch, H * W * anchors_per_location, 2] Anchor classifier logits (before softmax)
rpn_probs: [batch, H * W * anchors_per_location, 2] Anchor classifier probabilities.
rpn_bbox: [batch, H * W * anchors_per_location, (dy, dx, log(dh), log(dw))] Deltas to be
applied to anchors.
"""
input_feature_map = KL.Input(shape=[None, None, depth],
Expand Down

0 comments on commit 1aeb72d

Please sign in to comment.