'Constructs box collection.
Args:
data: a numpy array of shape [N, 4] representing box coordinates
Raises:
ValueError: if bbox data is not a numpy array
ValueError: if invalid dimensions for bbox data'

def __init__(self, data):

    if (not isinstance(data, np.ndarray)):
        raise ValueError('data    must    be    a    numpy    array.')
    if ((len(data.shape) != 2) or (data.shape[1] != 4)):
        raise ValueError('Invalid    dimensions    for    box    data.')
    if ((data.dtype != np.float32) and (data.dtype != np.float64)):
        raise ValueError('Invalid    data    type    for    box    data:    float    is    required.')
    if (not self._is_valid_boxes(data)):
        raise ValueError('Invalid    box    data.    data    must    be    a    numpy    array    of    N*[y_min,    x_min,    y_max,    x_max]')
    self.data = {'boxes': data}
