def obj_box_imresize(im, coords=None, size=None, interp='<STR_LIT>', mode=None, is_rescale=False):
if coords is None:<EOL><INDENT>coords = []<EOL><DEDENT>if size is None:<EOL><INDENT>size = [<NUM_LIT:100>, <NUM_LIT:100>]<EOL><DEDENT>imh, imw = im.shape[<NUM_LIT:0>:<NUM_LIT:2>]<EOL>imh = imh * <NUM_LIT:1.0>  <EOL>imw = imw * <NUM_LIT:1.0><EOL>im = imresize(im, size=size, interp=interp, mode=mode)<EOL>if is_rescale is False:<EOL><INDENT>coords_new = list()<EOL>for coord in coords:<EOL><INDENT>if len(coord) != <NUM_LIT:4>:<EOL><INDENT>raise AssertionError("<STR_LIT>")<EOL><DEDENT>x = int(coord[<NUM_LIT:0>] * (size[<NUM_LIT:1>] / imw))<EOL>y = int(coord[<NUM_LIT:1>] * (size[<NUM_LIT:0>] / imh))<EOL>w = int(coord[<NUM_LIT:2>] * (size[<NUM_LIT:1>] / imw))<EOL>h = int(coord[<NUM_LIT:3>] * (size[<NUM_LIT:0>] / imh))<EOL>coords_new.append([x, y, w, h])<EOL><DEDENT>return im, coords_new<EOL><DEDENT>else:<EOL><INDENT>return im, coords<EOL><DEDENT>
Resize an image, and compute the new bounding box coordinates.

    Parameters
    -------------
    im : numpy.array
        An image with dimension of [row, col, channel] (default).
    coords : list of list of 4 int/float or None
        Coordinates [[x, y, w, h], [x, y, w, h], ...]
    size interp and mode : args
        See ``tl.prepro.imresize``.
    is_rescale : boolean
        Set to True, if the input coordinates are rescaled to [0, 1], then return the original coordinates. Default is False.

    Returns
    -------
    numpy.array
        A processed image
    list of list of 4 numbers
        A list of new bounding boxes.

    Examples
    --------
    >>> im = np.zeros([80, 100, 3])    # as an image with shape width=100, height=80
    >>> _, coords = obj_box_imresize(im, coords=[[20, 40, 30, 30], [10, 20, 20, 20]], size=[160, 200], is_rescale=False)
    >>> print(coords)
      [[40, 80, 60, 60], [20, 40, 40, 40]]
    >>> _, coords = obj_box_imresize(im, coords=[[20, 40, 30, 30]], size=[40, 100], is_rescale=False)
    >>> print(coords)
      [[20, 20, 30, 15]]
    >>> _, coords = obj_box_imresize(im, coords=[[20, 40, 30, 30]], size=[60, 150], is_rescale=False)
    >>> print(coords)
      [[30, 30, 45, 22]]
    >>> im2, coords = obj_box_imresize(im, coords=[[0.2, 0.4, 0.3, 0.3]], size=[160, 200], is_rescale=True)
    >>> print(coords, im2.shape)
      [[0.2, 0.4, 0.3, 0.3]] (160, 200, 3)