def draw_boxes_and_labels_to_image(<EOL>image, classes, coords, scores, classes_list, is_center=True, is_rescale=True, save_name=None<EOL>):
if len(coords) != len(classes):<EOL><INDENT>raise AssertionError("<STR_LIT>")<EOL><DEDENT>if len(scores) > <NUM_LIT:0> and len(scores) != len(classes):<EOL><INDENT>raise AssertionError("<STR_LIT>")<EOL><DEDENT>image = image.copy()<EOL>imh, imw = image.shape[<NUM_LIT:0>:<NUM_LIT:2>]<EOL>thick = int((imh + imw) // <NUM_LIT>)<EOL>for i, _v in enumerate(coords):<EOL><INDENT>if is_center:<EOL><INDENT>x, y, x2, y2 = tl.prepro.obj_box_coord_centroid_to_upleft_butright(coords[i])<EOL><DEDENT>else:<EOL><INDENT>x, y, x2, y2 = coords[i]<EOL><DEDENT>if is_rescale:  <EOL><INDENT>x, y, x2, y2 = tl.prepro.obj_box_coord_scale_to_pixelunit([x, y, x2, y2], (imh, imw))<EOL><DEDENT>cv2.rectangle(<EOL>image,<EOL>(int(x), int(y)),<EOL>(int(x2), int(y2)),  <EOL>[<NUM_LIT:0>, <NUM_LIT:255>, <NUM_LIT:0>],<EOL>thick<EOL>)<EOL>cv2.putText(<EOL>image,<EOL>classes_list[classes[i]] + (("<STR_LIT>" % (scores[i])) if (len(scores) != <NUM_LIT:0>) else "<STR_LIT:U+0020>"),<EOL>(int(x), int(y)),  <EOL><NUM_LIT:0>,<EOL><NUM_LIT> * imh,  <EOL>[<NUM_LIT:0>, <NUM_LIT:0>, <NUM_LIT>],  <EOL>int(thick / <NUM_LIT:2>) + <NUM_LIT:1><EOL>)  <EOL><DEDENT>if save_name is not None:<EOL><INDENT>save_image(image, save_name)<EOL><DEDENT>return image<EOL>
Draw bboxes and class labels on image. Return or save the image with bboxes, example in the docs of ``tl.prepro``.

    Parameters
    -----------
    image : numpy.array
        The RGB image [height, width, channel].
    classes : list of int
        A list of class ID (int).
    coords : list of int
        A list of list for coordinates.
            - Should be [x, y, x2, y2] (up-left and botton-right format)
            - If [x_center, y_center, w, h] (set is_center to True).
    scores : list of float
        A list of score (float). (Optional)
    classes_list : list of str
        for converting ID to string on image.
    is_center : boolean
        Whether the coordinates is [x_center, y_center, w, h]
            - If coordinates are [x_center, y_center, w, h], set it to True for converting it to [x, y, x2, y2] (up-left and botton-right) internally.
            - If coordinates are [x1, x2, y1, y2], set it to False.
    is_rescale : boolean
        Whether to rescale the coordinates from pixel-unit format to ratio format.
            - If True, the input coordinates are the portion of width and high, this API will scale the coordinates to pixel unit internally.
            - If False, feed the coordinates with pixel unit format.
    save_name : None or str
        The name of image file (i.e. image.png), if None, not to save image.

    Returns
    -------
    numpy.array
        The saved image.

    References
    -----------
    - OpenCV rectangle and putText.
    - `scikit-image <http://scikit-image.org/docs/dev/api/skimage.draw.html#skimage.draw.rectangle>`__.