Skip to content

Instantly share code, notes, and snippets.

@OlafenwaMoses
Last active February 2, 2021 22:28
Show Gist options
  • Save OlafenwaMoses/03b9809717d5a89091a54e8ae2cfdc81 to your computer and use it in GitHub Desktop.
Save OlafenwaMoses/03b9809717d5a89091a54e8ae2cfdc81 to your computer and use it in GitHub Desktop.
from deepstack_sdk import Detection,ServerConfig
import os
config = ServerConfig("http://localhost:80")
detector = Detection(config=config, name="openlogo")
detections = detector.detectObject(image="fedex.jpg", output="fedex_new.jpg")
for detection in detections:
print("Name: {}".format(detection.label))
print("Confidence: {}".format(detection.confidence))
print("x_min: {}".format(detection.x_min))
print("x_max: {}".format(detection.x_max))
print("y_min: {}".format(detection.y_min))
print("y_max: {}".format(detection.y_max))
print("-----------------------")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment