Decode the detection output
The output of the model prediction is a 1-dim tensor
The first element of tensor is the number(K) of objects detected,
followed by [label score x1 y1 x2 y2] * K
For example, if there are 2 detected objects, then K = 2, the tensor may
looks like
After decoding, it returns a 2-dim tensor, each row represents a detected object
2, 1, 0.5, 10, 20, 50, 80, 3, 0.3, 20, 10, 40, 70
1, 0.5, 10, 20, 50, 80
3, 0.3, 20, 10, 40, 70
Generate imInfo imInfo is a tensor that contains height, width, scaleInHeight, scaleInWidth
If the detection is normalized, for example, ssd detected bounding box is in [0, 1], need to scale the bbox according to the original image size.
used for image object detection visualize detected bounding boxes and their scores to image