Skip to content

Instantly share code, notes, and snippets.

@evergreenllc2020
Created January 11, 2020 04:39
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 evergreenllc2020/12f1484c1a2466f8fe42573d019a31ed to your computer and use it in GitHub Desktop.
Save evergreenllc2020/12f1484c1a2466f8fe42573d019a31ed to your computer and use it in GitHub Desktop.
# loop over the testing images
for testingPath in paths.list_images(args["testing"]):
# load the image and make predictions
image = cv2.imread(testingPath)
boxes = detector(cv2.cvtColor(image, cv2.COLOR_BGR2RGB))
# loop over the bounding boxes and draw them
for b in boxes:
(x, y, w, h) = (b.left(), b.top(), b.right(), b.bottom())
cv2.rectangle(image, (x, y), (w, h), (0, 255, 0), 2)
# show the image
cv2.imshow("Image", image)
cv2.waitKey(0)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment