(img, gt_boxes, boxes)
return img
Given an img, draws the gt_boxes as green,
    and the predicted boxes as red.
Given an img, draws the gt_boxes as green,
    and the predicted boxes as red.
Given an img draws the gt_boxes as green and the predicted boxes as red .
def draw_boxes(img, gt_boxes, boxes):
    """
    Given an img, draws the gt_boxes as green,
    and the predicted boxes as red.
    """
    draw = ImageDraw.Draw(img)

    for box in gt_boxes:
        draw_rectangle(draw, box, 'green', 2)

    for box in boxes:
        box = np.array(box[:4], dtype=np.float32)
        draw_rectangle(draw, box, 'red', 2)

    return img
def draw_boxes ( img , gt_boxes , boxes ) : draw = ImageDraw . Draw ( img ) for box in gt_boxes : draw_rectangle ( draw , box , 'green' , 2 ) for box in boxes : box = np . array ( box [ : 4 ] , dtype = np . float32 ) draw_rectangle ( draw , box , 'red' , 2 ) return img