Skip to content

Instantly share code, notes, and snippets.

@aravindpai
Created April 28, 2020 16:35
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save aravindpai/68d0fb86331a5dcdf5e8d9729a206ad3 to your computer and use it in GitHub Desktop.
Save aravindpai/68d0fb86331a5dcdf5e8d9729a206ad3 to your computer and use it in GitHub Desktop.
# Use `Visualizer` to draw the predictions on the image.
v = Visualizer(img[:, :, ::-1], MetadataCatalog.get(cfg.DATASETS.TRAIN[0]), scale=1.2)
v = v.draw_instance_predictions(outputs["instances"].to("cpu"))
cv2_imshow(v.get_image()[:, :, ::-1])
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment