def imshow_det_bboxes(img,<EOL>bboxes,<EOL>labels,<EOL>class_names=None,<EOL>score_thr=<NUM_LIT:0>,<EOL>bbox_color='<STR_LIT>',<EOL>text_color='<STR_LIT>',<EOL>thickness=<NUM_LIT:1>,<EOL>font_scale=<NUM_LIT:0.5>,<EOL>show=True,<EOL>win_name='<STR_LIT>',<EOL>wait_time=<NUM_LIT:0>,<EOL>out_file=None):
assert bboxes.ndim == <NUM_LIT:2><EOL>assert labels.ndim == <NUM_LIT:1><EOL>assert bboxes.shape[<NUM_LIT:0>] == labels.shape[<NUM_LIT:0>]<EOL>assert bboxes.shape[<NUM_LIT:1>] == <NUM_LIT:4> or bboxes.shape[<NUM_LIT:1>] == <NUM_LIT:5><EOL>img = imread(img)<EOL>if score_thr > <NUM_LIT:0>:<EOL><INDENT>assert bboxes.shape[<NUM_LIT:1>] == <NUM_LIT:5><EOL>scores = bboxes[:, -<NUM_LIT:1>]<EOL>inds = scores > score_thr<EOL>bboxes = bboxes[inds, :]<EOL>labels = labels[inds]<EOL><DEDENT>bbox_color = color_val(bbox_color)<EOL>text_color = color_val(text_color)<EOL>for bbox, label in zip(bboxes, labels):<EOL><INDENT>bbox_int = bbox.astype(np.int32)<EOL>left_top = (bbox_int[<NUM_LIT:0>], bbox_int[<NUM_LIT:1>])<EOL>right_bottom = (bbox_int[<NUM_LIT:2>], bbox_int[<NUM_LIT:3>])<EOL>cv2.rectangle(<EOL>img, left_top, right_bottom, bbox_color, thickness=thickness)<EOL>label_text = class_names[<EOL>label] if class_names is not None else '<STR_LIT>'.format(label)<EOL>if len(bbox) > <NUM_LIT:4>:<EOL><INDENT>label_text += '<STR_LIT>'.format(bbox[-<NUM_LIT:1>])<EOL><DEDENT>cv2.putText(img, label_text, (bbox_int[<NUM_LIT:0>], bbox_int[<NUM_LIT:1>] - <NUM_LIT:2>),<EOL>cv2.FONT_HERSHEY_COMPLEX, font_scale, text_color)<EOL><DEDENT>if show:<EOL><INDENT>imshow(img, win_name, wait_time)<EOL><DEDENT>if out_file is not None:<EOL><INDENT>imwrite(img, out_file)<EOL><DEDENT>
Draw bboxes and class labels (with scores) on an image.

    Args:
        img (str or ndarray): The image to be displayed.
        bboxes (ndarray): Bounding boxes (with scores), shaped (n, 4) or
            (n, 5).
        labels (ndarray): Labels of bboxes.
        class_names (list[str]): Names of each classes.
        score_thr (float): Minimum score of bboxes to be shown.
        bbox_color (str or tuple or :obj:`Color`): Color of bbox lines.
        text_color (str or tuple or :obj:`Color`): Color of texts.
        thickness (int): Thickness of lines.
        font_scale (float): Font scales of texts.
        show (bool): Whether to show the image.
        win_name (str): The window name.
        wait_time (int): Value of waitKey param.
        out_file (str or None): The filename to write the image.