Created
October 23, 2018 15:23
-
-
Save f-rumblefish/e80824fd87f02c606bbe04c7668d8e75 to your computer and use it in GitHub Desktop.
SSD/MobileNet Prediction
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
# loop 100 bounding boxes | |
for detection in Net_SSD_pred[0,0,:,:]: | |
# get the class index | |
class_index = int(detection[1]) | |
# get the score | |
score = float(detection[2]) | |
# draw the bounding box | |
if score > threshold: | |
left = detection[3] * cols | |
top = detection[4] * rows | |
right = detection[5] * cols | |
bottom = detection[6] * rows | |
width = right - left | |
height = bottom - top | |
box = patch.Rectangle((int(left), int(top)), | |
width, | |
height, | |
linewidth=2, edgecolor='r', facecolor='none') | |
ax1.add_patch(box) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment