This file contains 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
def run(event, context): | |
""" | |
Sample code of a cloud function entrypoint that is called when a message | |
is published to a topic. This is run when there is a notification on a prefix | |
in cloud storage. | |
The message (event) contains the path to the objectId invoking the message. | |
""" | |
event_filename = event["attributes"]["objectId"] |
This file contains 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
BUCKET="gs://<your-bucket-name>" | |
TOPIC="projects/<your-project-id>/topics/<your-topic>" | |
PREFIX="your-prefix-path" | |
gsutil notification create \ | |
-f json \ | |
-t $TOPIC \ | |
-e OBJECT_FINALIZE \ | |
-p $PREFIX \ | |
$BUCKET |
This file contains 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 |