def render_bboxes(bboxes_batch, labels_batch, shape):
    renders = []
    for i in range(len(bboxes_batch)):
        bboxes = bboxes_batch[i]
        labels = labels_batch[i]
        canvas = np.zeros(shape, dtype=np.float32)
        canvas += 255
        for j in range(len(bboxes)):
            bbox = bboxes[j]
            (top, left, bottom, right) = bbox
            label = labels[j]
            color = ((np.where((label == 1))[0][0] + 1) * 10)
            canvas[top:bottom, left:right, 0] = color
        canvas /= 255
        renders.append(canvas)
    return np.array(renders)
def render_bboxes(bboxes_batch, labels_batch, shape):
    renders = []
    for i in range(len(bboxes_batch)):
        bboxes = bboxes_batch[i]
        labels = labels_batch[i]
        canvas = np.zeros(shape, dtype=np.float32)
        canvas += 255
        for j in range(len(bboxes)):
            bbox = bboxes[j]
            (top, left, bottom, right) = bbox
            label = labels[j]
            color = ((np.where((label == 1))[0][0] + 1) * 10)
            canvas[top:bottom, left:right, 0] = color
        canvas /= 255
        renders.append(canvas)
    return np.array(renders)