Skip to content

Instantly share code, notes, and snippets.

@pranjalsatija
Last active July 9, 2018 23:11
Show Gist options
  • Save pranjalsatija/8ef59bbc09e17fe64a0e834309983dee to your computer and use it in GitHub Desktop.
Save pranjalsatija/8ef59bbc09e17fe64a0e834309983dee to your computer and use it in GitHub Desktop.
import os
import turicreate as tc
path = '../' # The path to the root of your project directory.
model_path = os.path.join(path, 'pascal.model') # The path to the trained model. See train_model.py for more.
result_sf_path = os.path.join(path, 'result_data.sframe') # The path to the result data from training the model.
# Loads the result data from training the model, along with the model itself.
data = tc.SFrame(result_sf_path)
model = tc.load_model(model_path)
# Draws bounding boxes based off of the model's predictions from testing data.
data['image'] = tc.object_detector.util.draw_bounding_boxes(data['image'], data['predictions'])
# Opens the data visualizer.
data.explore()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment