diff --git a/paddle/fluid/API.spec b/paddle/fluid/API.spec index b01296b8d8b3541386bdca22bd2e4ee9384de985..6e6d237cb2fad67b1860c0942a5ab24e83774b0d 100644 --- a/paddle/fluid/API.spec +++ b/paddle/fluid/API.spec @@ -330,7 +330,7 @@ paddle.fluid.layers.polygon_box_transform (ArgSpec(args=['input', 'name'], varar paddle.fluid.layers.yolov3_loss (ArgSpec(args=['x', 'gtbox', 'gtlabel', 'anchors', 'anchor_mask', 'class_num', 'ignore_thresh', 'downsample_ratio', 'name'], varargs=None, keywords=None, defaults=(None,)), ('document', '991e934c3e09abf0edec7c9c978b4691')) paddle.fluid.layers.box_clip (ArgSpec(args=['input', 'im_info', 'name'], varargs=None, keywords=None, defaults=(None,)), ('document', '397e9e02b451d99c56e20f268fa03f2e')) paddle.fluid.layers.multiclass_nms (ArgSpec(args=['bboxes', 'scores', 'score_threshold', 'nms_top_k', 'keep_top_k', 'nms_threshold', 'normalized', 'nms_eta', 'background_label', 'name'], varargs=None, keywords=None, defaults=(0.3, True, 1.0, 0, None)), ('document', 'ca7d1107b6c5d2d6d8221039a220fde0')) -paddle.fluid.layers.box_decoder_and_assign (ArgSpec(args=['prior_box', 'prior_box_var', 'target_box', 'box_score', 'box_clip'], varargs=None, keywords=None, defaults=None), ('document', 'e6daa972b52c6050d95bfaaee7b5289e')) +paddle.fluid.layers.box_decoder_and_assign (ArgSpec(args=['prior_box', 'prior_box_var', 'target_box', 'box_score', 'box_clip', 'name'], varargs=None, keywords=None, defaults=(None,)), ('document', 'fb470052db88526a94a7e5de9d9b3a4c')) paddle.fluid.layers.accuracy (ArgSpec(args=['input', 'label', 'k', 'correct', 'total'], varargs=None, keywords=None, defaults=(1, None, None)), ('document', '9808534c12c5e739a10f73ebb0b4eafd')) paddle.fluid.layers.auc (ArgSpec(args=['input', 'label', 'curve', 'num_thresholds', 'topk', 'slide_steps'], varargs=None, keywords=None, defaults=('ROC', 4095, 1, 1)), ('document', 'e0e95334fce92d16c2d9db6e7caffc47')) paddle.fluid.layers.exponential_decay (ArgSpec(args=['learning_rate', 'decay_steps', 'decay_rate', 'staircase'], varargs=None, keywords=None, defaults=(False,)), ('document', '98a5050bee8522fcea81aa795adaba51')) diff --git a/paddle/fluid/operators/detection/box_decoder_and_assign_op.cc b/paddle/fluid/operators/detection/box_decoder_and_assign_op.cc index bda2680f4cb32d32ee4094caff92556f63bfe217..585552cd42aa227739a73b66fb4f212657079df1 100644 --- a/paddle/fluid/operators/detection/box_decoder_and_assign_op.cc +++ b/paddle/fluid/operators/detection/box_decoder_and_assign_op.cc @@ -152,6 +152,12 @@ and height respectively. Similarly, `px`, `py`, `pw`, `ph` denote the priorbox's (anchor) center coordinates, width and height. `pxv`, `pyv`, `pwv`, `phv` denote the variance of the priorbox and `ox`, `oy`, `ow`, `oh` denote the encoded/decoded coordinates, width and height. + +After box decode, the Assigning schema described below: + +For each priorbox, use the best non-background class's decoded values to +updata the priorbox locations and get outputassignbox. So, the shape of +output_assign_box is the same as priorbox. )DOC"); } }; diff --git a/python/paddle/fluid/layers/detection.py b/python/paddle/fluid/layers/detection.py index 2fe01bb69e8e1d8c41fe7e5f425079ea9a12621c..b465fe129acf4f38a647b7c529d6ed575b303081 100644 --- a/python/paddle/fluid/layers/detection.py +++ b/python/paddle/fluid/layers/detection.py @@ -2225,8 +2225,12 @@ def multiclass_nms(bboxes, @templatedoc() -def box_decoder_and_assign(prior_box, prior_box_var, target_box, box_score, - box_clip): +def box_decoder_and_assign(prior_box, + prior_box_var, + target_box, + box_score, + box_clip, + name=None): """ ${comment} Args: @@ -2234,6 +2238,7 @@ def box_decoder_and_assign(prior_box, prior_box_var, target_box, box_score, prior_box_var(${prior_box_var_type}): ${prior_box_var_comment} target_box(${target_box_type}): ${target_box_comment} box_score(${box_score_type}): ${box_score_comment} + name(str|None): The name of this operator Returns: output_box(${output_box_type}): ${output_box_comment} output_assign_box(${output_assign_box_type}): ${output_assign_box_comment}