Skip to content

Commit

Permalink
style: format code with autopep8
Browse files Browse the repository at this point in the history
Format code with autopep8

This commit fixes the style issues introduced in 7ab207e according to the output
from Autopep8.

Details: None
  • Loading branch information
deepsource-autofix[bot] committed Aug 10, 2023
1 parent a164133 commit c79c97a
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions Car Detection OpenCV/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@

height, width, _ = frame.shape


blob = cv2.dnn.blobFromImage(frame, 0.00392, (416, 416), (0, 0, 0), True, crop=False)
blob = cv2.dnn.blobFromImage(
frame, 0.00392, (416, 416), (0, 0, 0), True, crop=False)
yolo_net.setInput(blob)

layer_names = yolo_net.getUnconnectedOutLayersNames()
Expand All @@ -32,7 +32,7 @@

class_id = np.argmax(scores)
confidence = scores[class_id]
if confidence > 0.5 and class_id == 2:
if confidence > 0.5 and class_id == 2:
center_x = int(detection[0] * width)

center_y = int(detection[1] * height)
Expand All @@ -42,9 +42,9 @@

x = int(center_x - bbox_width / 2)
y = int(center_y - bbox_height / 2)
cv2.rectangle(frame, (x, y), (x + bbox_width, y + bbox_height), (0, 255, 0), 2)
cv2.rectangle(frame, (x, y), (x + bbox_width,
y + bbox_height), (0, 255, 0), 2)


resized_frame = cv2.resize(frame, (720, 480))

cv2.imshow('Car Tracking', frame)
Expand Down

0 comments on commit c79c97a

Please sign in to comment.