YoloV2DetectionOutput

Input

  • coord_data:
    • Required: yes
    • Type: float16, float32
    • Description: predicted coordinates, with shape [batch, coords * boxes, height, width]
    • Restriction: Must be of type float16 and height * width * Dtype_Size >= 32 bytes.
  • obj_prob:
    • Required: yes
    • Type: float16, float32
    • Description: [batch, boxes, height, width], where each anchor has only one obj value
    • Restriction: Must be of type float16.
  • classes_prob:
    • Required: yes
    • Type: float16, float32
    • Description: [batch, boxes * classes, height, width]. The score of each anchor is rounded up to the nearest multiple of 16 for AI Core calculation convenience.
    • Restriction: Must be of type float16 and height * width * Dtype_Size >= 32 bytes.
  • img_info:
    • Required: yes
    • Type: float16, float32
    • Description: original image information, with shape [batch, 4-tuple], where the 4-tuple is formatted [netH, netW, scaleH, scaleW]. netH and netW are H and W of the network model input, and scaleH and scaleW are H and W of the original image.
    • Restriction: Must be of type float16.

Attribute

  • biases:
    • Required: yes
    • Type: ListFloat
    • Description: [boxes, 2-tuple], where the 2-tuple is x (w) and y (h)
    • Restrictions: none
  • boxes:
    • Required: no
    • Type: int
    • Description: number of anchor boxes in each grid (default = 5)
    • Restrictions: none
  • coords:
    • Required: no
    • Type: int
    • Description: number of coordinates. Fixed at 4, indicating x, y, h, and w.
    • Restriction: Must be 4.
  • classes:
    • Required: no
    • Type: int
    • Description: number of classes (default = 20)
    • Restriction: Must be within 1024.
  • relative:
    • Required: no
    • Type: bool
    • Description: whether the values in correct_region_boxes are relative values (default = True)
    • Restriction: either True or False
  • obj_threshold:
    • Required: no
    • Type: float
    • Description: threshold of the probability that an object exists, corresponding to the threshold in clsProb (default = 0.5)
    • Restriction: Must be in the range [0, 1].
  • pre_nms_topn:
    • Required: no
    • Type: int
    • Description: pre_nms_topn corresponds to multiClassNMS. For each class, the first pre_nms_topn items are processed. The maximum value is 512 for the SoC or 1024 for Mini/Cloud. Defaults to 512.
    • Restriction: Must be within 1024.
  • post_nms_topn:
    • Required: no
    • Type: int
    • Description: number of BBoxes after NMS, up to 1024 (default = 512)
    • Restriction: Must be within 1024.
  • score_threshold:
    • Required: no
    • Type: float
    • Description: score threshold of each class (default = 0.5)
    • Restriction: Must be in the range [0, 1].
  • iou_threshold:
    • Required: no
    • Type: float
    • Description: Intersection over Union threshold (default = 0.45)
    • Restriction: Must be in the range [0, 1].

Output

  • box_out:
    • Required: yes
    • Type: float16, float32
    • Description: [batch, 6-tuple, post_nms_topn], where the 6-tuple is [x1, y1, x2, y2, score, label(class)]. box_out_num applies.
    • Restriction: Must be of type float16.
  • box_out_num:
    • Required: yes
    • Type: int32
    • Description: number of valid boxes per batch, up to 1024. Has shape [batch, 8, 1, 1]. The value 8 indicates that only the first column in the eight columns is valid (data padding is performed for performance acceleration, and the rest seven columns are invalid data that is padded).

      For example, for shape [4, 8], only the first column is valid, indicating the number of valid boxes per batch.

      [0,0]...[0,7]

      [1,0]...[1,7]

      [2,0]...[2,7]

      [3,0]...[3,7]

    • Restrictions: none