Last active
May 11, 2020 12:39
-
-
Save karthick965938/db170912883da036aac1210df7765c72 to your computer and use it in GitHub Desktop.
Test your model on google colab for detecto
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
# Specify the path to your image | |
from detecto import core, utils, visualize | |
image = utils.read_image('animals/cat48.jpg') | |
predictions = model.predict(image) | |
# predictions format: (labels, boxes, scores) | |
labels, boxes, scores = predictions | |
# ['alien', 'bat', 'bat'] | |
print(labels) | |
print(boxes) | |
# tensor([0.9952, 0.9837, 0.5153]) | |
print(scores) | |
visualize.show_labeled_image(image, boxes, labels) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment