def retinanet_detection_output(bboxes, scores, anchors, im_info, score_threshold=0.05, nms_top_k=1000, keep_top_k=100, nms_threshold=0.3, nms_eta=1.0):
    '\n    **Detection Output Layer for the detector RetinaNet.**\n\n    In the detector `RetinaNet <https://arxiv.org/abs/1708.02002>`_ , many \n    `FPN <https://arxiv.org/abs/1612.03144>`_ levels output the category\n    and location predictions, this OP is to get the detection results by\n    performing following steps:\n\n    1. For each FPN level, decode box predictions according to the anchor\n       boxes from at most :attr:`nms_top_k` top-scoring predictions after\n       thresholding detector confidence at :attr:`score_threshold`.\n    2. Merge top predictions from all levels and apply multi-class non \n       maximum suppression (NMS) on them to get the final detections.\n\n    Args:\n        bboxes(List): A list of Tensors from multiple FPN levels represents\n            the location prediction for all anchor boxes. Each element is\n            a 3-D Tensor with shape :math:`[N, Mi, 4]`, :math:`N` is the\n            batch size, :math:`Mi` is the number of bounding boxes from\n            :math:`i`-th FPN level and each bounding box has four coordinate\n            values and the layout is [xmin, ymin, xmax, ymax]. The data type\n            of each element is float32 or float64.\n        scores(List): A list of Tensors from multiple FPN levels represents\n            the category prediction for all anchor boxes. Each element is a\n            3-D Tensor with shape :math:`[N, Mi, C]`,  :math:`N` is the batch\n            size, :math:`C` is the class number (**excluding background**),\n            :math:`Mi` is the number of bounding boxes from :math:`i`-th FPN\n            level. The data type of each element is float32 or float64.\n        anchors(List): A list of Tensors from multiple FPN levels represents\n            the locations of all anchor boxes. Each element is a 2-D Tensor\n            with shape :math:`[Mi, 4]`, :math:`Mi` is the number of bounding\n            boxes from :math:`i`-th FPN level, and each bounding box has four\n            coordinate values and the layout is [xmin, ymin, xmax, ymax].\n            The data type of each element is float32 or float64.\n        im_info(Variable): A 2-D Tensor with shape :math:`[N, 3]` represents the size\n            information of input images. :math:`N` is the batch size, the size\n            information of each image is a 3-vector which are the height and width\n            of the network input along with the factor scaling the origin image to\n            the network input. The data type of :attr:`im_info` is float32.\n        score_threshold(float): Threshold to filter out bounding boxes\n            with a confidence score before NMS, default value is set to 0.05.\n        nms_top_k(int): Maximum number of detections per FPN layer to be\n            kept according to the confidences before NMS, default value is set to\n            1000.\n        keep_top_k(int): Number of total bounding boxes to be kept per image after\n            NMS step. Default value is set to 100, -1 means keeping all bounding\n            boxes after NMS step.\n        nms_threshold(float): The Intersection-over-Union(IoU) threshold used to \n            filter out boxes in NMS.\n        nms_eta(float): The parameter for adjusting :attr:`nms_threshold` in NMS.\n            Default value is set to 1., which represents the value of\n            :attr:`nms_threshold` keep the same in NMS. If :attr:`nms_eta` is set\n            to be lower than 1. and the value of :attr:`nms_threshold` is set to\n            be higher than 0.5, everytime a bounding box is filtered out,\n            the adjustment for :attr:`nms_threshold` like :attr:`nms_threshold`\n            = :attr:`nms_threshold` * :attr:`nms_eta`  will not be stopped until\n            the actual value of :attr:`nms_threshold` is lower than or equal to\n            0.5.\n\n    **Notice**: In some cases where the image sizes are very small, it\'s possible\n    that there is no detection if :attr:`score_threshold` are used at all\n    levels. Hence, this OP do not filter out anchors from the highest FPN level\n    before NMS. And the last element in :attr:`bboxes`:, :attr:`scores` and\n    :attr:`anchors` is required to be from the highest FPN level.\n\n    Returns:\n        Variable(The data type is float32 or float64):\n            The detection output is a 1-level LoDTensor with shape :math:`[No, 6]`.\n            Each row has six values: [label, confidence, xmin, ymin, xmax, ymax].\n            :math:`No` is the total number of detections in this mini-batch.\n            The :math:`i`-th image has `LoD[i + 1] - LoD[i]` detected\n            results, if `LoD[i + 1] - LoD[i]` is 0, the :math:`i`-th image\n            has no detected results. If all images have no detected results,\n            LoD will be set to 0, and the output tensor is empty (None).\n\n    Examples:\n        .. code-block:: python\n\n           import paddle.fluid as fluid\n\n           bboxes_low = fluid.data(\n               name=\'bboxes_low\', shape=[1, 44, 4], dtype=\'float32\')\n           bboxes_high = fluid.data(\n               name=\'bboxes_high\', shape=[1, 11, 4], dtype=\'float32\')\n           scores_low = fluid.data(\n               name=\'scores_low\', shape=[1, 44, 10], dtype=\'float32\')\n           scores_high = fluid.data(\n               name=\'scores_high\', shape=[1, 11, 10], dtype=\'float32\')\n           anchors_low = fluid.data(\n               name=\'anchors_low\', shape=[44, 4], dtype=\'float32\')\n           anchors_high = fluid.data(\n               name=\'anchors_high\', shape=[11, 4], dtype=\'float32\')\n           im_info = fluid.data(\n               name="im_info", shape=[1, 3], dtype=\'float32\')\n           nmsed_outs = fluid.layers.retinanet_detection_output(\n               bboxes=[bboxes_low, bboxes_high],\n               scores=[scores_low, scores_high],\n               anchors=[anchors_low, anchors_high],\n               im_info=im_info,\n               score_threshold=0.05,\n               nms_top_k=1000,\n               keep_top_k=100,\n               nms_threshold=0.45,\n               nms_eta=1.0)\n    '
    check_type(bboxes, 'bboxes', list, 'retinanet_detection_output')
    for (i, bbox) in enumerate(bboxes):
        check_variable_and_dtype(bbox, 'bbox{}'.format(i), ['float32', 'float64'], 'retinanet_detection_output')
    check_type(scores, 'scores', list, 'retinanet_detection_output')
    for (i, score) in enumerate(scores):
        check_variable_and_dtype(score, 'score{}'.format(i), ['float32', 'float64'], 'retinanet_detection_output')
    check_type(anchors, 'anchors', list, 'retinanet_detection_output')
    for (i, anchor) in enumerate(anchors):
        check_variable_and_dtype(anchor, 'anchor{}'.format(i), ['float32', 'float64'], 'retinanet_detection_output')
    check_variable_and_dtype(im_info, 'im_info', ['float32', 'float64'], 'retinanet_detection_output')
    helper = LayerHelper('retinanet_detection_output', **locals())
    output = helper.create_variable_for_type_inference(dtype=helper.input_dtype('scores'))
    helper.append_op(type='retinanet_detection_output', inputs={'BBoxes': bboxes, 'Scores': scores, 'Anchors': anchors, 'ImInfo': im_info}, attrs={'score_threshold': score_threshold, 'nms_top_k': nms_top_k, 'nms_threshold': nms_threshold, 'keep_top_k': keep_top_k, 'nms_eta': 1.0}, outputs={'Out': output})
    output.stop_gradient = True
    return output
**Detection Output Layer for the detector RetinaNet.**

In the detector `RetinaNet <https://arxiv.org/abs/1708.02002>`_ , many 
`FPN <https://arxiv.org/abs/1612.03144>`_ levels output the category
and location predictions, this OP is to get the detection results by
performing following steps:

1. For each FPN level, decode box predictions according to the anchor
   boxes from at most :attr:`nms_top_k` top-scoring predictions after
   thresholding detector confidence at :attr:`score_threshold`.
2. Merge top predictions from all levels and apply multi-class non 
   maximum suppression (NMS) on them to get the final detections.

Args:
    bboxes(List): A list of Tensors from multiple FPN levels represents
        the location prediction for all anchor boxes. Each element is
        a 3-D Tensor with shape :math:`[N, Mi, 4]`, :math:`N` is the
        batch size, :math:`Mi` is the number of bounding boxes from
        :math:`i`-th FPN level and each bounding box has four coordinate
        values and the layout is [xmin, ymin, xmax, ymax]. The data type
        of each element is float32 or float64.
    scores(List): A list of Tensors from multiple FPN levels represents
        the category prediction for all anchor boxes. Each element is a
        3-D Tensor with shape :math:`[N, Mi, C]`,  :math:`N` is the batch
        size, :math:`C` is the class number (**excluding background**),
        :math:`Mi` is the number of bounding boxes from :math:`i`-th FPN
        level. The data type of each element is float32 or float64.
    anchors(List): A list of Tensors from multiple FPN levels represents
        the locations of all anchor boxes. Each element is a 2-D Tensor
        with shape :math:`[Mi, 4]`, :math:`Mi` is the number of bounding
        boxes from :math:`i`-th FPN level, and each bounding box has four
        coordinate values and the layout is [xmin, ymin, xmax, ymax].
        The data type of each element is float32 or float64.
    im_info(Variable): A 2-D Tensor with shape :math:`[N, 3]` represents the size
        information of input images. :math:`N` is the batch size, the size
        information of each image is a 3-vector which are the height and width
        of the network input along with the factor scaling the origin image to
        the network input. The data type of :attr:`im_info` is float32.
    score_threshold(float): Threshold to filter out bounding boxes
        with a confidence score before NMS, default value is set to 0.05.
    nms_top_k(int): Maximum number of detections per FPN layer to be
        kept according to the confidences before NMS, default value is set to
        1000.
    keep_top_k(int): Number of total bounding boxes to be kept per image after
        NMS step. Default value is set to 100, -1 means keeping all bounding
        boxes after NMS step.
    nms_threshold(float): The Intersection-over-Union(IoU) threshold used to 
        filter out boxes in NMS.
    nms_eta(float): The parameter for adjusting :attr:`nms_threshold` in NMS.
        Default value is set to 1., which represents the value of
        :attr:`nms_threshold` keep the same in NMS. If :attr:`nms_eta` is set
        to be lower than 1. and the value of :attr:`nms_threshold` is set to
        be higher than 0.5, everytime a bounding box is filtered out,
        the adjustment for :attr:`nms_threshold` like :attr:`nms_threshold`
        = :attr:`nms_threshold` * :attr:`nms_eta`  will not be stopped until
        the actual value of :attr:`nms_threshold` is lower than or equal to
        0.5.

**Notice**: In some cases where the image sizes are very small, it's possible
that there is no detection if :attr:`score_threshold` are used at all
levels. Hence, this OP do not filter out anchors from the highest FPN level
before NMS. And the last element in :attr:`bboxes`:, :attr:`scores` and
:attr:`anchors` is required to be from the highest FPN level.

Returns:
    Variable(The data type is float32 or float64):
        The detection output is a 1-level LoDTensor with shape :math:`[No, 6]`.
        Each row has six values: [label, confidence, xmin, ymin, xmax, ymax].
        :math:`No` is the total number of detections in this mini-batch.
        The :math:`i`-th image has `LoD[i + 1] - LoD[i]` detected
        results, if `LoD[i + 1] - LoD[i]` is 0, the :math:`i`-th image
        has no detected results. If all images have no detected results,
        LoD will be set to 0, and the output tensor is empty (None).

Examples:
    .. code-block:: python

       import paddle.fluid as fluid

       bboxes_low = fluid.data(
           name='bboxes_low', shape=[1, 44, 4], dtype='float32')
       bboxes_high = fluid.data(
           name='bboxes_high', shape=[1, 11, 4], dtype='float32')
       scores_low = fluid.data(
           name='scores_low', shape=[1, 44, 10], dtype='float32')
       scores_high = fluid.data(
           name='scores_high', shape=[1, 11, 10], dtype='float32')
       anchors_low = fluid.data(
           name='anchors_low', shape=[44, 4], dtype='float32')
       anchors_high = fluid.data(
           name='anchors_high', shape=[11, 4], dtype='float32')
       im_info = fluid.data(
           name="im_info", shape=[1, 3], dtype='float32')
       nmsed_outs = fluid.layers.retinanet_detection_output(
           bboxes=[bboxes_low, bboxes_high],
           scores=[scores_low, scores_high],
           anchors=[anchors_low, anchors_high],
           im_info=im_info,
           score_threshold=0.05,
           nms_top_k=1000,
           keep_top_k=100,
           nms_threshold=0.45,
           nms_eta=1.0)
def retinanet_detection_output(bboxes, scores, anchors, im_info, score_threshold=0.05, nms_top_k=1000, keep_top_k=100, nms_threshold=0.3, nms_eta=1.0):
    '\n    **Detection Output Layer for the detector RetinaNet.**\n\n    In the detector `RetinaNet <https://arxiv.org/abs/1708.02002>`_ , many \n    `FPN <https://arxiv.org/abs/1612.03144>`_ levels output the category\n    and location predictions, this OP is to get the detection results by\n    performing following steps:\n\n    1. For each FPN level, decode box predictions according to the anchor\n       boxes from at most :attr:`nms_top_k` top-scoring predictions after\n       thresholding detector confidence at :attr:`score_threshold`.\n    2. Merge top predictions from all levels and apply multi-class non \n       maximum suppression (NMS) on them to get the final detections.\n\n    Args:\n        bboxes(List): A list of Tensors from multiple FPN levels represents\n            the location prediction for all anchor boxes. Each element is\n            a 3-D Tensor with shape :math:`[N, Mi, 4]`, :math:`N` is the\n            batch size, :math:`Mi` is the number of bounding boxes from\n            :math:`i`-th FPN level and each bounding box has four coordinate\n            values and the layout is [xmin, ymin, xmax, ymax]. The data type\n            of each element is float32 or float64.\n        scores(List): A list of Tensors from multiple FPN levels represents\n            the category prediction for all anchor boxes. Each element is a\n            3-D Tensor with shape :math:`[N, Mi, C]`,  :math:`N` is the batch\n            size, :math:`C` is the class number (**excluding background**),\n            :math:`Mi` is the number of bounding boxes from :math:`i`-th FPN\n            level. The data type of each element is float32 or float64.\n        anchors(List): A list of Tensors from multiple FPN levels represents\n            the locations of all anchor boxes. Each element is a 2-D Tensor\n            with shape :math:`[Mi, 4]`, :math:`Mi` is the number of bounding\n            boxes from :math:`i`-th FPN level, and each bounding box has four\n            coordinate values and the layout is [xmin, ymin, xmax, ymax].\n            The data type of each element is float32 or float64.\n        im_info(Variable): A 2-D Tensor with shape :math:`[N, 3]` represents the size\n            information of input images. :math:`N` is the batch size, the size\n            information of each image is a 3-vector which are the height and width\n            of the network input along with the factor scaling the origin image to\n            the network input. The data type of :attr:`im_info` is float32.\n        score_threshold(float): Threshold to filter out bounding boxes\n            with a confidence score before NMS, default value is set to 0.05.\n        nms_top_k(int): Maximum number of detections per FPN layer to be\n            kept according to the confidences before NMS, default value is set to\n            1000.\n        keep_top_k(int): Number of total bounding boxes to be kept per image after\n            NMS step. Default value is set to 100, -1 means keeping all bounding\n            boxes after NMS step.\n        nms_threshold(float): The Intersection-over-Union(IoU) threshold used to \n            filter out boxes in NMS.\n        nms_eta(float): The parameter for adjusting :attr:`nms_threshold` in NMS.\n            Default value is set to 1., which represents the value of\n            :attr:`nms_threshold` keep the same in NMS. If :attr:`nms_eta` is set\n            to be lower than 1. and the value of :attr:`nms_threshold` is set to\n            be higher than 0.5, everytime a bounding box is filtered out,\n            the adjustment for :attr:`nms_threshold` like :attr:`nms_threshold`\n            = :attr:`nms_threshold` * :attr:`nms_eta`  will not be stopped until\n            the actual value of :attr:`nms_threshold` is lower than or equal to\n            0.5.\n\n    **Notice**: In some cases where the image sizes are very small, it\'s possible\n    that there is no detection if :attr:`score_threshold` are used at all\n    levels. Hence, this OP do not filter out anchors from the highest FPN level\n    before NMS. And the last element in :attr:`bboxes`:, :attr:`scores` and\n    :attr:`anchors` is required to be from the highest FPN level.\n\n    Returns:\n        Variable(The data type is float32 or float64):\n            The detection output is a 1-level LoDTensor with shape :math:`[No, 6]`.\n            Each row has six values: [label, confidence, xmin, ymin, xmax, ymax].\n            :math:`No` is the total number of detections in this mini-batch.\n            The :math:`i`-th image has `LoD[i + 1] - LoD[i]` detected\n            results, if `LoD[i + 1] - LoD[i]` is 0, the :math:`i`-th image\n            has no detected results. If all images have no detected results,\n            LoD will be set to 0, and the output tensor is empty (None).\n\n    Examples:\n        .. code-block:: python\n\n           import paddle.fluid as fluid\n\n           bboxes_low = fluid.data(\n               name=\'bboxes_low\', shape=[1, 44, 4], dtype=\'float32\')\n           bboxes_high = fluid.data(\n               name=\'bboxes_high\', shape=[1, 11, 4], dtype=\'float32\')\n           scores_low = fluid.data(\n               name=\'scores_low\', shape=[1, 44, 10], dtype=\'float32\')\n           scores_high = fluid.data(\n               name=\'scores_high\', shape=[1, 11, 10], dtype=\'float32\')\n           anchors_low = fluid.data(\n               name=\'anchors_low\', shape=[44, 4], dtype=\'float32\')\n           anchors_high = fluid.data(\n               name=\'anchors_high\', shape=[11, 4], dtype=\'float32\')\n           im_info = fluid.data(\n               name="im_info", shape=[1, 3], dtype=\'float32\')\n           nmsed_outs = fluid.layers.retinanet_detection_output(\n               bboxes=[bboxes_low, bboxes_high],\n               scores=[scores_low, scores_high],\n               anchors=[anchors_low, anchors_high],\n               im_info=im_info,\n               score_threshold=0.05,\n               nms_top_k=1000,\n               keep_top_k=100,\n               nms_threshold=0.45,\n               nms_eta=1.0)\n    '
    check_type(bboxes, 'bboxes', list, 'retinanet_detection_output')
    for (i, bbox) in enumerate(bboxes):
        check_variable_and_dtype(bbox, 'bbox{}'.format(i), ['float32', 'float64'], 'retinanet_detection_output')
    check_type(scores, 'scores', list, 'retinanet_detection_output')
    for (i, score) in enumerate(scores):
        check_variable_and_dtype(score, 'score{}'.format(i), ['float32', 'float64'], 'retinanet_detection_output')
    check_type(anchors, 'anchors', list, 'retinanet_detection_output')
    for (i, anchor) in enumerate(anchors):
        check_variable_and_dtype(anchor, 'anchor{}'.format(i), ['float32', 'float64'], 'retinanet_detection_output')
    check_variable_and_dtype(im_info, 'im_info', ['float32', 'float64'], 'retinanet_detection_output')
    helper = LayerHelper('retinanet_detection_output', **locals())
    output = helper.create_variable_for_type_inference(dtype=helper.input_dtype('scores'))
    helper.append_op(type='retinanet_detection_output', inputs={'BBoxes': bboxes, 'Scores': scores, 'Anchors': anchors, 'ImInfo': im_info}, attrs={'score_threshold': score_threshold, 'nms_top_k': nms_top_k, 'nms_threshold': nms_threshold, 'keep_top_k': keep_top_k, 'nms_eta': 1.0}, outputs={'Out': output})
    output.stop_gradient = True
    return output