Commit 7556cc1e authored by Yuxin Wu's avatar Yuxin Wu

[FasterRCNN] remove unused arg; fix bug in decode bbox

parent a0324a28
......@@ -137,12 +137,11 @@ def get_anchor_labels(anchors, gt_boxes, crowd_boxes):
return anchor_labels, anchor_boxes
def get_rpn_anchor_input(im, boxes, klass, is_crowd):
def get_rpn_anchor_input(im, boxes, is_crowd):
"""
Args:
im: an image
boxes: nx4, floatbox, gt. shoudn't be changed
klass: n,
is_crowd: n,
Returns:
......@@ -220,7 +219,7 @@ def get_train_dataflow(add_mask=False):
# rpn anchor:
try:
fm_labels, fm_boxes = get_rpn_anchor_input(im, boxes, klass, is_crowd)
fm_labels, fm_boxes = get_rpn_anchor_input(im, boxes, is_crowd)
boxes = boxes[is_crowd == 0] # skip crowd boxes in training target
klass = klass[is_crowd == 0]
if not len(boxes):
......
......@@ -134,7 +134,7 @@ def decode_bbox_target(box_predictions, anchors):
xbyb = box_pred_txty * waha + xaya
x1y1 = xbyb - wbhb * 0.5
x2y2 = xbyb + wbhb * 0.5 # (...)x1x2
out = tf.concat([x1y1, x2y2], axis=1)
out = tf.concat([x1y1, x2y2], axis=-2)
return tf.reshape(out, orig_shape)
......
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