Commit d079b37c authored by Yuxin Wu's avatar Yuxin Wu

fix #806

parent 08b0dfb6
...@@ -156,6 +156,7 @@ def fastrcnn_Xconv1fc_head(feature, num_classes, num_convs): ...@@ -156,6 +156,7 @@ def fastrcnn_Xconv1fc_head(feature, num_classes, num_convs):
def fastrcnn_4conv1fc_head(*args, **kwargs): def fastrcnn_4conv1fc_head(*args, **kwargs):
# This head was used in Group Normalization
return fastrcnn_Xconv1fc_head(*args, num_convs=4, **kwargs) return fastrcnn_Xconv1fc_head(*args, num_convs=4, **kwargs)
......
...@@ -143,8 +143,7 @@ def generate_rpn_proposals(boxes, scores, img_shape, ...@@ -143,8 +143,7 @@ def generate_rpn_proposals(boxes, scores, img_shape,
(-1, 4), name='nms_input_boxes') (-1, 4), name='nms_input_boxes')
nms_indices = tf.image.non_max_suppression( nms_indices = tf.image.non_max_suppression(
topk_valid_boxes_y1x1y2x2, topk_valid_boxes_y1x1y2x2,
# TODO use exp to work around a bug in TF1.9: https://github.com/tensorflow/tensorflow/issues/19578 topk_valid_scores,
tf.exp(topk_valid_scores),
max_output_size=post_nms_topk, max_output_size=post_nms_topk,
iou_threshold=cfg.RPN.PROPOSAL_NMS_THRESH) iou_threshold=cfg.RPN.PROPOSAL_NMS_THRESH)
......
...@@ -95,6 +95,7 @@ except ImportError: ...@@ -95,6 +95,7 @@ except ImportError:
if __name__ == '__main__': if __name__ == '__main__':
a = BSDS500('val') a = BSDS500('val')
a.reset_state()
for k in a.get_data(): for k in a.get_data():
cv2.imshow("haha", k[1].astype('uint8') * 255) cv2.imshow("haha", k[1].astype('uint8') * 255)
cv2.waitKey(1000) cv2.waitKey(1000)
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