Skip to content

Instantly share code, notes, and snippets.

Created May 11, 2021 12:45
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
What would you like to do?
import cv2
import numpy as np
import matplotlib.pyplot as plt
import cvlib as cv
from cvlib.object_detection import draw_bbox
from numpy.lib.polynomial import poly
image = cv2.imread("cars.jpeg")
box, label, count = cv.detect_common_objects(image)
output = draw_bbox(image, box, label, count)
print("Number of cars in this image are " +str(label.count('car')))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment