Skip to content

Instantly share code, notes, and snippets.

@karthick965938
Last active May 11, 2020 12:39
Show Gist options
  • Save karthick965938/db170912883da036aac1210df7765c72 to your computer and use it in GitHub Desktop.
Save karthick965938/db170912883da036aac1210df7765c72 to your computer and use it in GitHub Desktop.
Test your model on google colab for detecto
# 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