Skip to content

Instantly share code, notes, and snippets.

@karthick965938
Created May 11, 2020 12:44
Show Gist options
  • Save karthick965938/40988f5fd9e90939072e56de4ba8ce17 to your computer and use it in GitHub Desktop.
Save karthick965938/40988f5fd9e90939072e56de4ba8ce17 to your computer and use it in GitHub Desktop.
from detecto import core, utils, visualize
# Load you image
image = utils.read_image('cat.jpg')
model = core.Model.load('cat_model_weights', ['cat'])
labels, boxes, scores = model.predict_top(image)
##Test your Image
visualize.show_labeled_image(image, boxes, labels)
##Test your Video
# visualize.detect_video(model, 'cat.mp4', 'output.avi')
##Live Detection
# visualize.detect_live(model)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment