This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env python | |
| import cv2 | |
| import sys | |
| def drawBoundingBoxes(imageData, imageOutputPath, inferenceResults, color): | |
| """Draw bounding boxes on an image. | |
| imageData: image data in numpy array format | |
| imageOutputPath: output image file path | |
| inferenceResults: inference results array off object (l,t,w,h) | |
| colorMap: Bounding box color candidates, list of RGB tuples. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| """ | |
| author: Timothy C. Arlen | |
| date: 28 Feb 2018 | |
| Calculate Mean Average Precision (mAP) for a set of bounding boxes corresponding to specific | |
| image Ids. Usage: | |
| > python calculate_mean_ap.py | |
| Will display a plot of precision vs recall curves at 10 distinct IoU thresholds as well as output |