Skip to content

Commit

Permalink
Merge pull request #26 from KOSASIH/deepsource-transform-4fc32381
Browse files Browse the repository at this point in the history
style: format code with Autopep8, Black, ClangFormat, dotnet-format, Go fmt, Gofumpt, Google Java Format, isort, Ktlint, PHP CS Fixer, Prettier, RuboCop, Ruff Formatter, Rustfmt, Scalafmt, StandardJS, StandardRB, swift-format and Yapf
  • Loading branch information
KOSASIH committed May 11, 2024
2 parents 449b06b + f320027 commit 2e31b2b
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions computer_vision/object_detection.py
Original file line number Diff line number Diff line change
@@ -1,11 +1,14 @@
import cv2


def detect_objects(image, config):
# Load the object detection model
net = cv2.dnn.readNetFromDarknet(config['model_config'], config['model_weights'])
net = cv2.dnn.readNetFromDarknet(config["model_config"], config["model_weights"])

# Perform object detection on the image
blob = cv2.dnn.blobFromImage(image, config['input_scale'], config['input_size'], config['mean_subtraction'])
blob = cv2.dnn.blobFromImage(
image, config["input_scale"], config["input_size"], config["mean_subtraction"]
)
net.setInput(blob)
detections = net.forward()

Expand Down

0 comments on commit 2e31b2b

Please sign in to comment.