def dets2rects(dets):
    """
    convert dets type to rect type.
    left, top, width, height
"""

    rects = [[d.left(), d.top(), d.right()-d.left(), d.bottom()-d.top()] for d in dets]
    return rects