Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@aravindpai
Created April 28, 2020 16:16
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/4d75b4e9c031e0732a1df0436d07b14e to your computer and use it in GitHub Desktop.
Save aravindpai/4d75b4e9c031e0732a1df0436d07b14e to your computer and use it in GitHub Desktop.
# You may need to restart your runtime prior to this, to let your installation take effect
# Some basic setup:
# Setup detectron2 logger
import detectron2
from detectron2.utils.logger import setup_logger
setup_logger()
# import some common libraries
import numpy as np
import cv2
import random
from google.colab.patches import cv2_imshow
import matplotlib.pyplot as plt
# import some common detectron2 utilities
from detectron2 import model_zoo
from detectron2.engine import DefaultPredictor
from detectron2.config import get_cfg
from detectron2.utils.visualizer import Visualizer
from detectron2.data import MetadataCatalog
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment