(dictGroundTruth, dictDetected)
Create representative images with bounding boxes.
Create representative images with bounding boxes.
Create representative images with bounding boxes .
def createImages(dictGroundTruth, dictDetected):
    """Create representative images with bounding boxes."""
    import numpy as np
    import cv2
    # Define image size
    width = 200
    height = 200
    # Loop through the dictionary with ground truth detections
    for key in dictGroundTruth:
        image = np.zeros((height, width, 3), np.uint8)
        gt_boundingboxes = dictGroundTruth[key]
        image = gt_boundingboxes.drawAllBoundingBoxes(image)
        detection_boundingboxes = dictDetected[key]
        image = detection_boundingboxes.drawAllBoundingBoxes(image)
        # Show detection and its GT
        cv2.imshow(key, image)
        cv2.waitKey()
def createImages ( dictGroundTruth , dictDetected ) : import numpy as np import cv2 # Define image size width = 200 height = 200 # Loop through the dictionary with ground truth detections for key in dictGroundTruth : image = np . zeros ( ( height , width , 3 ) , np . uint8 ) gt_boundingboxes = dictGroundTruth [ key ] image = gt_boundingboxes . drawAllBoundingBoxes ( image ) detection_boundingboxes = dictDetected [ key ] image = detection_boundingboxes . drawAllBoundingBoxes ( image ) # Show detection and its GT cv2 . imshow ( key , image ) cv2 . waitKey ( )